> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search CoworkerLedgerEntries

> Search and list CoworkerLedgerEntry records with filtering, sorting, and pagination.

A **CoworkerLedgerEntry** is an individual financial transaction line in a customer's ledger. Ledger entries record debits, credits, and the running balance between a location and a customer.

Each entry can be linked to a `CoworkerInvoice` and carries a `PaymentGatewayName` that identifies which payment provider processed the transaction.

The ledger balance reflects the net financial position between the location and the customer:

* A **positive** balance means the customer owes money (unpaid invoices).
* A **negative** balance means the customer has credited payments that will be applied to future invoices.
* A balance of **0** means the account is settled with no outstanding invoices or credits.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`CoworkerLedgerEntry-List`** role.
</Note>

## Enums

<Accordion title="ePaymentProvider">
  | Value | Name                       |
  | ----- | -------------------------- |
  | 1     | PayPalStandard             |
  | 2     | PaypalStandardSubscription |
  | 3     | GoCardless                 |
  | 4     | Stripe                     |
  | 5     | AuthorizeNetDirect         |
  | 6     | UsaEPay                    |
  | 7     | AuthorizeNetSubscription   |
  | 8     | Adyen                      |
  | 9     | MultiGateway               |
  | 11    | Manual                     |
  | 12    | Forte                      |
  | 13    | PayPalAdaptive             |
  | 14    | GoCardlessPro              |
  | 15    | CreditCard                 |
  | 16    | EPay                       |
  | 17    | Braintree                  |
  | 18    | MidTrans                   |
  | 19    | EziDebit                   |
  | 20    | LiqPay                     |
  | 21    | RazorPay                   |
  | 22    | SquareCash                 |
  | 23    | SquareCreditCard           |
  | 24    | StripeACH                  |
  | 25    | StripeDirectDebit          |
  | 26    | IZettleCreditCard          |
  | 27    | PeachPayments              |
  | 28    | Klarna                     |
  | 29    | StripeTerminal             |
  | 30    | PayPalStandardRest         |
  | 401   | HostedPaymentPage1         |
  | 402   | HostedPaymentPage2         |
  | 403   | HostedPaymentPage3         |
  | 500   | Xero                       |
  | 501   | Quickbooks                 |
  | 989   | ManualDirectDebit          |
  | 990   | BadDebt                    |
  | 991   | CreditCardManual1          |
  | 992   | CreditCardManual2          |
  | 993   | CreditCardManual3          |
  | 994   | Credit                     |
  | 995   | Gift                       |
  | 996   | Bank                       |
  | 997   | Cash                       |
  | 998   | Check                      |
  | 999   | Other                      |
</Accordion>

## Query Parameters

### Pagination & Sorting

<ParamField query="page" type="integer" default="1">
  The page number to retrieve.
</ParamField>

<ParamField query="size" type="integer" default="25">
  The number of records per page.
</ParamField>

<ParamField query="orderBy" type="string">
  The property name to sort results by (e.g. `Name`, `CreatedOn`).
</ParamField>

<ParamField query="dir" type="integer">
  Sort direction. `0` for ascending, `1` for descending.
</ParamField>

### Filters

<ParamField query="CoworkerLedgerEntry_Business" type="integer">
  Filter by Business Id.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Business_Name" type="string">
  Filter by location name.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Business_Currency_Code" type="string">
  Filter by location currency code.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Coworker" type="integer">
  Filter by Coworker Id.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Coworker_FullName" type="string">
  Filter by coworker full name.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice" type="integer">
  Filter by Coworker Invoice Id.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_InvoiceNumber" type="string">
  Filter by invoice number.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_TotalAmount" type="string">
  Filter by invoice total amount.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_BillToName" type="string">
  Filter by invoice bill-to name.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_Paid" type="boolean">
  Filter by whether the invoice has been paid.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_PaidOn" type="string">
  Filter by date the invoice was paid.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_Refunded" type="boolean">
  Filter by whether the invoice has been refunded.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_RefundedOn" type="string">
  Filter by date the invoice was refunded.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_DueDate" type="string">
  Filter by invoice due date.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_Draft" type="boolean">
  Filter by whether the invoice is a draft.
</ParamField>

<ParamField query="CoworkerLedgerEntry_CoworkerInvoice_WaitingForInvoiceNumber" type="boolean">
  Filter by whether the invoice is waiting to be assigned an invoice number.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Description" type="string">
  Filter by description.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Code" type="string">
  Filter by ledger entry code.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Debit" type="number">
  Filter by debit amount.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Credit" type="number">
  Filter by credit amount.
</ParamField>

<ParamField query="CoworkerLedgerEntry_PaymentGatewayName" type="integer">
  Filter by payment gateway name.
</ParamField>

<ParamField query="CoworkerLedgerEntry_PaymentMethodNumber" type="string">
  Filter by payment method number.
</ParamField>

<ParamField query="CoworkerLedgerEntry_TransactionDate" type="string">
  Filter by transaction date.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Balance" type="number">
  Filter by balance.
</ParamField>

<ParamField query="CoworkerLedgerEntry_Billed" type="boolean">
  Filter by whether this entry has been billed.
</ParamField>

<ParamField query="CoworkerLedgerEntry_TransactionDateLocal" type="string">
  Filter by transaction date in the location's local time.
</ParamField>

<ParamField query="CoworkerLedgerEntry_ConnectedTransactionGuid" type="string">
  Filter by connected transaction GUID.
</ParamField>

### Range Filters

<ParamField query="from_CoworkerLedgerEntry_CoworkerInvoicePaidOn" type="string">
  Filter by date the invoice was paid greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_CoworkerInvoicePaidOn" type="string">
  Filter by date the invoice was paid less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_CoworkerInvoiceRefundedOn" type="string">
  Filter by date the invoice was refunded greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_CoworkerInvoiceRefundedOn" type="string">
  Filter by date the invoice was refunded less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_CoworkerInvoiceDueDate" type="string">
  Filter by invoice due date greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_CoworkerInvoiceDueDate" type="string">
  Filter by invoice due date less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_Debit" type="number">
  Filter by debit amount greater than or equal to this value.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_Debit" type="number">
  Filter by debit amount less than or equal to this value.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_Credit" type="number">
  Filter by credit amount greater than or equal to this value.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_Credit" type="number">
  Filter by credit amount less than or equal to this value.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_TransactionDate" type="string">
  Filter by transaction date greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_TransactionDate" type="string">
  Filter by transaction date less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_Balance" type="number">
  Filter by balance greater than or equal to this value.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_Balance" type="number">
  Filter by balance less than or equal to this value.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_TransactionDateLocal" type="string">
  Filter by transaction date in the location's local time greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_TransactionDateLocal" type="string">
  Filter by transaction date in the location's local time less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_CreatedOn" type="string">
  Filter records created on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_CreatedOn" type="string">
  Filter records created on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CoworkerLedgerEntry_UpdatedOn" type="string">
  Filter records updated on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CoworkerLedgerEntry_UpdatedOn" type="string">
  Filter records updated on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

## Code Examples

### Simple listing

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/coworkerledgerentries?page=1&size=15&orderBy=Description&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/coworkerledgerentries?' + new URLSearchParams({
      page: 1,
      size: 15,
      orderBy: 'Description',
      dir: 1 // Ascending
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/coworkerledgerentries',
      params={
          'page': 1,
          'size': 15,
          'orderBy': 'Description',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Filtering by Description

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/coworkerledgerentries?CoworkerLedgerEntry_Description=example-value&orderBy=Description&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/coworkerledgerentries?' + new URLSearchParams({
      CoworkerLedgerEntry_Description: 'example-value',
      orderBy: 'Description',
      dir: 1
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/coworkerledgerentries',
      params={
          'CoworkerLedgerEntry_Description': 'example-value',
          'orderBy': 'Description',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Range filters

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/coworkerledgerentries?from_CoworkerLedgerEntry_UpdatedOn=2025-01-01T00:00&to_CoworkerLedgerEntry_UpdatedOn=2025-12-31T23:59&orderBy=UpdatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/coworkerledgerentries?' + new URLSearchParams({
      from_CoworkerLedgerEntry_UpdatedOn: '2025-01-01T00:00',
      to_CoworkerLedgerEntry_UpdatedOn: '2025-12-31T23:59',
      orderBy: 'UpdatedOn',
      dir: 1 // Descending
     }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/coworkerledgerentries',
      params={
          'from_CoworkerLedgerEntry_UpdatedOn': '2025-01-01T00:00',
          'to_CoworkerLedgerEntry_UpdatedOn': '2025-12-31T23:59',
          'orderBy': 'UpdatedOn',
          'dir': 1 // Descending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Records" type="CoworkerLedgerEntry[]">
  The list of CoworkerLedgerEntry records matching the query. See the [Get one CoworkerLedgerEntry](/rest-api/billing/get-coworkerledgerentries-by-id) endpoint for the full list of properties returned for each record.
</ResponseField>

<Warning>
  **Partial records** — The listing endpoint returns a summary representation of each CoworkerLedgerEntry. The following fields are **not populated** in the `Records[]` response: `Description`, `PaymentMethodNumber`.

  To get all fields, fetch the full record using the [Get one CoworkerLedgerEntry](/rest-api/billing/get-coworkerledgerentries-by-id) endpoint.

  **Important for updates:** When updating a record via `PUT`, always retrieve the full record with a `GET` request first, apply your changes to that complete data, and then send the updated record. Do not use data from a listing response as the base for a `PUT` request, as missing fields may be unintentionally cleared.
</Warning>

<ResponseField name="CurrentPage" type="integer">
  Current page number.
</ResponseField>

<ResponseField name="CurrentPageSize" type="integer">
  Number of records per page.
</ResponseField>

<ResponseField name="CurrentOrderField" type="string">
  The field used for sorting.
</ResponseField>

<ResponseField name="CurrentSortDirection" type="integer">
  The sort direction (`0` = ascending, `1` = descending).
</ResponseField>

<ResponseField name="FirstItem" type="integer">
  Index of the first item on the current page.
</ResponseField>

<ResponseField name="LastItem" type="integer">
  Index of the last item on the current page.
</ResponseField>

<ResponseField name="TotalItems" type="integer">
  Total number of matching records across all pages.
</ResponseField>

<ResponseField name="TotalPages" type="integer">
  Total number of pages.
</ResponseField>

<ResponseField name="HasNextPage" type="boolean">
  Whether there is a next page of results.
</ResponseField>

<ResponseField name="HasPreviousPage" type="boolean">
  Whether there is a previous page of results.
</ResponseField>

```json Example Response theme={null}
{
  "Records": [
    {
      "BusinessId": 0,
      "BusinessName": null,
      "BusinessCurrencyCode": null,
      "CoworkerId": 0,
      "CoworkerFullName": null,
      "CoworkerInvoiceId": null,
      "CoworkerInvoiceInvoiceNumber": null,
      "CoworkerInvoiceTotalAmount": null,
      "CoworkerInvoiceBillToName": null,
      "CoworkerInvoicePaid": null,
      "CoworkerInvoicePaidOn": null,
      "CoworkerInvoiceRefunded": null,
      "CoworkerInvoiceRefundedOn": null,
      "CoworkerInvoiceDueDate": null,
      "CoworkerInvoiceDraft": null,
      "CoworkerInvoiceWaitingForInvoiceNumber": null,
      "Code": "",
      "Debit": 0,
      "Credit": 0,
      "PaymentGatewayName": 0,
      "TransactionDate": null,
      "Balance": 0,
      "Billed": false,
      "TransactionDateLocal": null,
      "ConnectedTransactionGuid": null,
      "Id": 87654321,
      "UpdatedOn": "2025-01-15T10:30:00Z",
      "CreatedOn": "2025-01-10T08:00:00Z",
      "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "UpdatedBy": "admin@example.com",
      "IsNew": false,
      "SystemId": null,
      "ToStringText": "CoworkerLedgerEntry Example",
      "LocalizationDetails": null,
      "CustomFields": null
    }
  ],
  "CurrentPageSize": 15,
  "CurrentPage": 1,
  "CurrentOrderField": "Description",
  "CurrentSortDirection": 1,
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 15,
  "TotalItems": 1,
  "TotalPages": 1
}
```
