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

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

A Pass (internally TimePass) is a prepaid check-in allowance for a location, configured as either a day pass or a time-limited pass with availability, customer, pricing, and access-control rules.

## 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 **`TimePass-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="TimePass_Business" type="integer">
  Filter by iD of the location that owns this pass and supplies its default location scope and local check-in schedule..
</ParamField>

<ParamField query="TimePass_Business_Name" type="string">
  Filter by display value for Business.Name..
</ParamField>

<ParamField query="TimePass_Name" type="string">
  Filter by required pass name, up to 254 characters; this is the customer-facing name used to identify the pass..
</ParamField>

<ParamField query="TimePass_InvoiceLineDisplayAs" type="string">
  Filter by optional custom text shown on invoice lines instead of the pass name..
</ParamField>

<ParamField query="TimePass_Price" type="number">
  Filter by base amount charged in the selected currency; the lowest matching plan-specific special price overrides this amount for eligible members..
</ParamField>

<ParamField query="TimePass_MinutesIncluded" type="integer">
  Filter by non-negative total check-in allowance in minutes; leave null for a day pass that can be used repeatedly during one calendar day..
</ParamField>

<ParamField query="TimePass_CountsTowardsPlanLimits" type="boolean">
  Filter by whether check-ins made with this pass count against the customer's plan check-in and time limits..
</ParamField>

<ParamField query="TimePass_UseAsPayAsYouGoForMembers" type="boolean">
  Filter by whether this pass can be automatically sold to members who check in without a valid pass when pay-as-you-go check-in is enabled..
</ParamField>

<ParamField query="TimePass_UseAsPayAsYouGoForContacts" type="boolean">
  Filter by whether this pass can be automatically sold to contacts without an active contract who check in without a valid pass when pay-as-you-go check-in is enabled..
</ParamField>

<ParamField query="TimePass_UsePriority" type="integer">
  Filter by optional pass-selection priority when a customer has multiple valid passes; higher values are used first and null is treated as normal priority (0)..
</ParamField>

<ParamField query="TimePass_Currency" type="integer">
  Filter by iD of the ISO 4217 currency used for the pass price and plan-specific special prices..
</ParamField>

<ParamField query="TimePass_Currency_Code" type="string">
  Filter by display value for Currency.Code..
</ParamField>

<ParamField query="TimePass_TaxRate" type="integer">
  Filter by optional ID of the standard tax rate applied when this pass is invoiced..
</ParamField>

<ParamField query="TimePass_TaxRate_Name" type="string">
  Filter by display value for TaxRate.Name..
</ParamField>

<ParamField query="TimePass_ReducedTaxRate" type="integer">
  Filter by optional ID of the reduced tax rate applied when the customer qualifies for reduced taxation..
</ParamField>

<ParamField query="TimePass_ExemptTaxRate" type="integer">
  Filter by optional ID of the tax rate applied when the customer is tax exempt..
</ParamField>

<ParamField query="TimePass_FinancialAccount" type="integer">
  Filter by optional ID of the financial account used to record pass revenue..
</ParamField>

<ParamField query="TimePass_FinancialAccount_Name" type="string">
  Filter by display value for FinancialAccount.Name..
</ParamField>

<ParamField query="TimePass_KisiGroupId" type="string">
  Filter by optional external Kisi access-control group ID assigned to customers using this pass..
</ParamField>

<ParamField query="TimePass_DoorGuardGroupId" type="string">
  Filter by optional external DoorGuard access-control group ID assigned to customers using this pass..
</ParamField>

<ParamField query="TimePass_AccessControlGroupId" type="string">
  Filter by legacy single access-control group ID; do not use this field because provider-specific access groups are managed through the current access-control integration..
</ParamField>

<ParamField query="TimePass_AccessControlGroupIds" type="string">
  Filter by internal serialized mapping of access-control providers to external group IDs; managed by access-control integrations and not directly editable..
</ParamField>

<ParamField query="TimePass_AllowNetworkCheckIn" type="boolean">
  Filter by whether a customer holding this pass can check in to the location's connected IT network..
</ParamField>

<ParamField query="TimePass_OnlyForContacts" type="boolean">
  Filter by whether this pass is restricted to contacts without an active contract; do not combine with OnlyForMembers..
</ParamField>

<ParamField query="TimePass_OnlyForMembers" type="boolean">
  Filter by whether this pass is restricted to members with an active contract; when Tariffs is non-empty, the member must have an active contract on one of those plans, and this must not be combined with OnlyForContacts..
</ParamField>

<ParamField query="TimePass_Archived" type="boolean">
  Filter by whether this pass is archived and should no longer appear in active pass lists..
</ParamField>

### Range Filters

<ParamField query="from_TimePass_Price" type="number">
  Filter by base amount charged in the selected currency; the lowest matching plan-specific special price overrides this amount for eligible members. greater than or equal to this value.
</ParamField>

<ParamField query="to_TimePass_Price" type="number">
  Filter by base amount charged in the selected currency; the lowest matching plan-specific special price overrides this amount for eligible members. less than or equal to this value.
</ParamField>

<ParamField query="from_TimePass_MinutesIncluded" type="integer">
  Filter by non-negative total check-in allowance in minutes; leave null for a day pass that can be used repeatedly during one calendar day. greater than or equal to this value.
</ParamField>

<ParamField query="to_TimePass_MinutesIncluded" type="integer">
  Filter by non-negative total check-in allowance in minutes; leave null for a day pass that can be used repeatedly during one calendar day. less than or equal to this value.
</ParamField>

<ParamField query="from_TimePass_UsePriority" type="integer">
  Filter by optional pass-selection priority when a customer has multiple valid passes; higher values are used first and null is treated as normal priority (0). greater than or equal to this value.
</ParamField>

<ParamField query="to_TimePass_UsePriority" type="integer">
  Filter by optional pass-selection priority when a customer has multiple valid passes; higher values are used first and null is treated as normal priority (0). less than or equal to this value.
</ParamField>

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

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

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

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

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

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

### Filtering by Name

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

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/timepasses?' + new URLSearchParams({
      TimePass_Name: 'example-value',
      orderBy: 'Name',
      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/timepasses',
      params={
          'TimePass_Name': 'example-value',
          'orderBy': 'Name',
          '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/timepasses?from_TimePass_UpdatedOn=2025-01-01T00:00&to_TimePass_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/timepasses?' + new URLSearchParams({
      from_TimePass_UpdatedOn: '2025-01-01T00:00',
      to_TimePass_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/timepasses',
      params={
          'from_TimePass_UpdatedOn': '2025-01-01T00:00',
          'to_TimePass_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="TimePass[]">
  The list of TimePass records matching the query. See the [Get one TimePass](/rest-api/billing/get-timepasses-by-id) endpoint for the full list of properties returned for each record.
</ResponseField>

<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,
      "Name": "",
      "InvoiceLineDisplayAs": null,
      "Price": 0,
      "MinutesIncluded": null,
      "CountsTowardsPlanLimits": false,
      "UseAsPayAsYouGoForMembers": false,
      "UseAsPayAsYouGoForContacts": false,
      "UsePriority": null,
      "CurrencyId": 0,
      "CurrencyCode": null,
      "TaxRateId": null,
      "TaxRateName": null,
      "ReducedTaxRateId": null,
      "ExemptTaxRateId": null,
      "FinancialAccountId": null,
      "FinancialAccountName": null,
      "Businesses": [],
      "KisiGroupId": null,
      "DoorGuardGroupId": null,
      "AccessControlGroupId": null,
      "AccessControlGroupIds": null,
      "AllowNetworkCheckIn": false,
      "OnlyForContacts": false,
      "OnlyForMembers": false,
      "Tariffs": [],
      "Archived": false,
      "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": "TimePass Example",
      "LocalizationDetails": null,
      "CustomFields": null
    }
  ],
  "CurrentPageSize": 15,
  "CurrentPage": 1,
  "CurrentOrderField": "Name",
  "CurrentSortDirection": 1,
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 15,
  "TotalItems": 1,
  "TotalPages": 1
}
```
