> ## 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 Charges

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

A **Charge** is a generic debit item applied to a customer account. Prefer more specific entities when available — use `CoworkerProduct` for product sales, `Booking` for room/resource bookings, `EventAttendee` for event registrations, and `CoworkerContract` for recurring plan charges.

Charges can reference the originating sale from another entity via its `UniqueId` (a GUID, not an integer ID). This is how items billed to a non-paying team member are passed through to the team's paying member: the charge appears on the paying member's account with a `UniqueId` reference back to the original `CoworkerProduct`, `Booking`, `EventAttendee`, or `CoworkerTimePass`.

Booking-related extra-service charges are represented by `CoworkerExtraService` records and referenced via `CoworkerExtraServiceUniqueId`.

## 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 **`Charge-List`** role.
</Note>

## 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="Charge_Coworker" type="integer">
  Filter by Coworker Id.
</ParamField>

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

<ParamField query="Charge_Business_Name" type="string">
  Filter by business name.
</ParamField>

<ParamField query="Charge_Business_Currency_Code" type="string">
  Filter by business currency code.
</ParamField>

<ParamField query="Charge_ChargeNumber" type="string">
  Filter by charge number.
</ParamField>

<ParamField query="Charge_Quantity" type="integer">
  Filter by quantity.
</ParamField>

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

<ParamField query="Charge_InvoiceLineDisplayAs" type="string">
  Filter by display text on invoice line.
</ParamField>

<ParamField query="Charge_RegularCharge" type="boolean">
  Filter by whether this is a regular charge.
</ParamField>

<ParamField query="Charge_DiscountAmount" type="number">
  Filter by discount amount.
</ParamField>

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

<ParamField query="Charge_DiscountCode" type="string">
  Filter by discount code.
</ParamField>

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

<ParamField query="Charge_TotalAmount" type="number">
  Filter by total amount.
</ParamField>

<ParamField query="Charge_PurchaseOrder" type="string">
  Filter by purchase order.
</ParamField>

<ParamField query="Charge_TaxRate" type="integer">
  Filter by Tax Rate Id.
</ParamField>

<ParamField query="Charge_FinancialAccount" type="integer">
  Filter by Financial Account Id.
</ParamField>

<ParamField query="Charge_Invoiced" type="boolean">
  Filter by whether the charge has been invoiced.
</ParamField>

<ParamField query="Charge_InvoicedOn" type="string">
  Filter by date the charge was invoiced.
</ParamField>

<ParamField query="Charge_SaleDate" type="string">
  Filter by sale date.
</ParamField>

<ParamField query="Charge_FromTeamMember" type="boolean">
  Filter by From Team Member.
</ParamField>

<ParamField query="Charge_CoworkerExtraServiceName" type="string">
  Filter by Coworker Extra Service Name.
</ParamField>

<ParamField query="Charge_CoworkerTimePassName" type="string">
  Filter by Coworker Time Pass Name.
</ParamField>

<ParamField query="Charge_CoworkerProductName" type="string">
  Filter by Coworker Product Name.
</ParamField>

<ParamField query="Charge_TariffName" type="string">
  Filter by Tariff Name.
</ParamField>

<ParamField query="Charge_CoworkerProductUniqueId" type="string">
  Filter by Coworker Product Unique Id.
</ParamField>

<ParamField query="Charge_BookingUniqueId" type="string">
  Filter by Booking Unique Id.
</ParamField>

<ParamField query="Charge_CoworkerContractUniqueId" type="string">
  Filter by uniqueId of the CoworkerContract that originated this charge.
</ParamField>

<ParamField query="Charge_CoworkerExtraServiceUniqueId" type="string">
  Filter by uniqueId of the CoworkerExtraService (booking extra-service charge) that originated this charge.
</ParamField>

<ParamField query="Charge_ExtraServiceUniqueId" type="string">
  Filter by uniqueId of the ExtraService that originated this charge.
</ParamField>

<ParamField query="Charge_CoworkerTimePassUniqueId" type="string">
  Filter by uniqueId of the CoworkerTimePass that originated this charge.
</ParamField>

<ParamField query="Charge_CoworkerChargeUniqueId" type="string">
  Filter by uniqueId of the original charge passed from a non-paying team member to the team's paying member.
</ParamField>

<ParamField query="Charge_EventAttendeeUniqueId" type="string">
  Filter by uniqueId of the EventAttendee that originated this charge.
</ParamField>

<ParamField query="Charge_InvoiceFromDate" type="string">
  Filter by invoice period start date.
</ParamField>

<ParamField query="Charge_InvoiceToDate" type="string">
  Filter by invoice period end date.
</ParamField>

<ParamField query="Charge_RepeatFrom" type="string">
  Filter by repeat from date.
</ParamField>

<ParamField query="Charge_RepeatUntil" type="string">
  Filter by repeat until date.
</ParamField>

<ParamField query="Charge_CoworkerDiscountCodeUniqueId" type="string">
  Filter by uniqueId of the CoworkerDiscountCode applied to this charge.
</ParamField>

### Range Filters

<ParamField query="from_Charge_Quantity" type="integer">
  Filter by quantity greater than or equal to this value.
</ParamField>

<ParamField query="to_Charge_Quantity" type="integer">
  Filter by quantity less than or equal to this value.
</ParamField>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<ParamField query="to_Charge_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/charges?page=1&size=15&orderBy=CreatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/charges?' + new URLSearchParams({
      page: 1,
      size: 15,
      orderBy: 'CreatedOn',
      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/charges',
      params={
          'page': 1,
          'size': 15,
          'orderBy': 'CreatedOn',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

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

### Filtering by CreatedOn

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

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/charges?' + new URLSearchParams({
      Charge_CreatedOn: 'example-value',
      orderBy: 'CreatedOn',
      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/charges',
      params={
          'Charge_CreatedOn': 'example-value',
          'orderBy': 'CreatedOn',
          '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/charges?from_Charge_UpdatedOn=2025-01-01T00:00&to_Charge_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/charges?' + new URLSearchParams({
      from_Charge_UpdatedOn: '2025-01-01T00:00',
      to_Charge_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/charges',
      params={
          'from_Charge_UpdatedOn': '2025-01-01T00:00',
          'to_Charge_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="Charge[]">
  The list of Charge records matching the query. See the [Get one Charge](/rest-api/billing/get-charges-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 Charge. The following fields are **not populated** in the `Records[]` response: `DiscountAmount`, `CreditAmount`, `PurchaseOrder`.

  To get all fields, fetch the full record using the [Get one Charge](/rest-api/billing/get-charges-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": [
    {
      "CoworkerId": 0,
      "BusinessId": 0,
      "BusinessName": null,
      "BusinessCurrencyCode": null,
      "ChargeNumber": null,
      "Quantity": 0,
      "Description": null,
      "InvoiceLineDisplayAs": null,
      "RegularCharge": false,
      "DiscountCode": null,
      "DueDate": null,
      "TotalAmount": 0,
      "TaxRateId": null,
      "FinancialAccountId": null,
      "Invoiced": false,
      "InvoicedOn": null,
      "SaleDate": null,
      "FromTeamMember": false,
      "CoworkerExtraServiceName": null,
      "CoworkerTimePassName": null,
      "CoworkerProductName": null,
      "TariffName": null,
      "CoworkerProductUniqueId": null,
      "BookingUniqueId": null,
      "CoworkerContractUniqueId": null,
      "CoworkerExtraServiceUniqueId": null,
      "ExtraServiceUniqueId": null,
      "CoworkerTimePassUniqueId": null,
      "CoworkerChargeUniqueId": null,
      "EventAttendeeUniqueId": null,
      "InvoiceFromDate": null,
      "InvoiceToDate": null,
      "RepeatFrom": null,
      "RepeatUntil": null,
      "CoworkerDiscountCodeUniqueId": 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": "Charge Example",
      "LocalizationDetails": null,
      "CustomFields": null
    }
  ],
  "CurrentPageSize": 15,
  "CurrentPage": 1,
  "CurrentOrderField": "CreatedOn",
  "CurrentSortDirection": 1,
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 15,
  "TotalItems": 1,
  "TotalPages": 1
}
```
