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

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

A **CustomField** defines an additional field available for a specific entity type. Nexudus supports attaching arbitrary data to any entity type via the CustomFields array.

Each custom field targets a single `RecordType` (e.g. Coworker, Team, Booking, Product) and has a `FieldType` that determines how the value is captured and stored (Text, LongText, Boolean, Dropdown, Date, Integer, or Decimal).

For Dropdown fields, populate `AvailableOptions` with a comma-separated list of choices. Set `AllowMultipleOptions` to `true` to let users select more than one.

The `CustomFieldIndex` uniquely identifies the field within its record type and business, and is used to map values in the entity's `CustomFields` array.

Use the `Visibility` property to control whether the field is Visible, ReadOnly, or Internal (admin-only). The various `DisplayIn*` flags control where the field appears: sign-up forms, profile forms, tour forms, event sign-up, booking forms, directory search, and public profiles.

Custom fields targeting the Coworker record type can be placed in a specific tab using `CoworkerFieldPosition` (General, Contact, Profile, Billing, Access, or Notes).

When `RecordType` is FloorPlanDesk or Resource, link specific resources via the `Resources` many-to-many list.

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

## Enums

<Accordion title="eCustomFieldRecordType — RecordType values">
  | Value | Name               |
  | ----- | ------------------ |
  | 1     | Coworker           |
  | 2     | Team               |
  | 3     | FloorPlanDesk      |
  | 4     | CrmOpportunity     |
  | 5     | Visitor            |
  | 6     | Proposal           |
  | 7     | CoworkerInternal   |
  | 8     | HelpDeskMessage    |
  | 9     | HelpDeskDepartment |
  | 10    | Product            |
  | 11    | Booking            |
  | 12    | CoworkerInvoice    |
  | 13    | Business           |
  | 14    | CoworkerContract   |
  | 15    | Tariff             |
  | 16    | Resource           |
  | 17    | FloorPlan          |
  | 18    | InventoryAsset     |
</Accordion>

<Accordion title="eFieldType — FieldType values">
  | Value | Name     |
  | ----- | -------- |
  | 1     | Text     |
  | 2     | LongText |
  | 3     | Boolean  |
  | 4     | Dropdown |
  | 5     | Date     |
  | 6     | Integer  |
  | 7     | Decimal  |
</Accordion>

<Accordion title="eCoworkerFieldPosition — CoworkerFieldPosition values">
  | Value | Name    |
  | ----- | ------- |
  | 1     | General |
  | 2     | Contact |
  | 3     | Profile |
  | 4     | Billing |
  | 5     | Access  |
  | 6     | Notes   |
</Accordion>

<Accordion title="eFieldVisibility — Visibility values">
  | Value | Name     |
  | ----- | -------- |
  | 1     | Visible  |
  | 2     | ReadOnly |
  | 3     | Internal |
</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="CustomField_Business" type="integer">
  Filter by business this custom field belongs to.
</ParamField>

<ParamField query="CustomField_Name" type="string">
  Filter by field label displayed to users.
</ParamField>

<ParamField query="CustomField_DisplayOrder" type="integer">
  Filter by sort order when multiple custom fields are shown together.
</ParamField>

<ParamField query="CustomField_RecordType" type="integer">
  Filter by entity type this field applies to: Coworker, Team, Booking, Product, Resource, etc..
</ParamField>

<ParamField query="CustomField_FieldType" type="integer">
  Filter by data type of the field: Text, LongText, Boolean, Dropdown, Date, Integer, or Decimal.
</ParamField>

<ParamField query="CustomField_CoworkerFieldPosition" type="integer">
  Filter by tab where this field appears on the coworker record: General, Contact, Profile, Billing, Access, or Notes.
</ParamField>

<ParamField query="CustomField_AvailableOptions" type="string">
  Filter by comma-separated list of choices for Dropdown fields.
</ParamField>

<ParamField query="CustomField_AllowMultipleOptions" type="boolean">
  Filter by whether multiple options can be selected for Dropdown fields.
</ParamField>

<ParamField query="CustomField_CustomFieldIndex" type="integer">
  Filter by unique index identifying this field within its record type and business.
</ParamField>

<ParamField query="CustomField_Required" type="boolean">
  Filter by whether a value must be provided when saving the parent entity.
</ParamField>

<ParamField query="CustomField_GroupName" type="string">
  Filter by optional group name used to visually group related custom fields together.
</ParamField>

<ParamField query="CustomField_DisplayInPublicProfile" type="boolean">
  Filter by show this field on the coworker's public profile page.
</ParamField>

<ParamField query="CustomField_DisplayInDirectorySearch" type="boolean">
  Filter by show this field as a filter in the member directory search.
</ParamField>

<ParamField query="CustomField_NameInSearch" type="string">
  Filter by alternative label shown when this field appears in directory search filters.
</ParamField>

<ParamField query="CustomField_Visibility" type="integer">
  Filter by visibility level: Visible (editable by customer), ReadOnly (shown but not editable), or Internal (admin only).
</ParamField>

<ParamField query="CustomField_DisplayInSignUpForm" type="boolean">
  Filter by show this field on the member sign-up form.
</ParamField>

<ParamField query="CustomField_DisplayInProfileForm" type="boolean">
  Filter by show this field on the member profile edit form.
</ParamField>

<ParamField query="CustomField_DisplayInTourForm" type="boolean">
  Filter by show this field on the tour booking form.
</ParamField>

<ParamField query="CustomField_DisplayInEventSignUpForm" type="boolean">
  Filter by show this field on the event sign-up form.
</ParamField>

<ParamField query="CustomField_ShowInBookingForm" type="boolean">
  Filter by show this field on the resource booking form.
</ParamField>

<ParamField query="CustomField_DisplayInProductSignUpForm" type="boolean">
  Filter by show this field on the product purchase form.
</ParamField>

<ParamField query="CustomField_DisplayInTeamSignUpForm" type="boolean">
  Filter by show this field on the team sign-up form.
</ParamField>

<ParamField query="CustomField_DisplayInCourseSignUpForm" type="boolean">
  Filter by show this field on the course sign-up form.
</ParamField>

<ParamField query="CustomField_DisplayInTariffSignUpForm" type="boolean">
  Filter by show this field on the pricing plan (tariff) sign-up form.
</ParamField>

<ParamField query="CustomField_DisplayInBookingSignUpForm" type="boolean">
  Filter by show this field on the booking sign-up form.
</ParamField>

<ParamField query="CustomField_DisplayInResourceSearch" type="boolean">
  Filter by show this field as a filter in resource search.
</ParamField>

### Range Filters

<ParamField query="from_CustomField_DisplayOrder" type="integer">
  Filter by sort order when multiple custom fields are shown together greater than or equal to this value.
</ParamField>

<ParamField query="to_CustomField_DisplayOrder" type="integer">
  Filter by sort order when multiple custom fields are shown together less than or equal to this value.
</ParamField>

<ParamField query="from_CustomField_CustomFieldIndex" type="integer">
  Filter by unique index identifying this field within its record type and business greater than or equal to this value.
</ParamField>

<ParamField query="to_CustomField_CustomFieldIndex" type="integer">
  Filter by unique index identifying this field within its record type and business less than or equal to this value.
</ParamField>

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

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

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

<ParamField query="to_CustomField_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/crm/customfields?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/crm/customfields?' + 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/crm/customfields',
      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/crm/customfields?CustomField_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/crm/customfields?' + new URLSearchParams({
      CustomField_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/crm/customfields',
      params={
          'CustomField_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/crm/customfields?from_CustomField_UpdatedOn=2025-01-01T00:00&to_CustomField_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/crm/customfields?' + new URLSearchParams({
      from_CustomField_UpdatedOn: '2025-01-01T00:00',
      to_CustomField_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/crm/customfields',
      params={
          'from_CustomField_UpdatedOn': '2025-01-01T00:00',
          'to_CustomField_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="CustomField[]">
  The list of CustomField records matching the query. See the [Get one CustomField](/rest-api/crm/get-customfields-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 CustomField. The following fields are **not populated** in the `Records[]` response: `CoworkerFieldPosition`, `AvailableOptions`, `AllowMultipleOptions`, `Required`, `DisplayInPublicProfile`, `DisplayInDirectorySearch`, `NameInSearch`, `DisplayInSignUpForm`, `DisplayInProfileForm`, `DisplayInTourForm`, `DisplayInEventSignUpForm`, `ShowInBookingForm`, `DisplayInProductSignUpForm`, `DisplayInTeamSignUpForm`, `DisplayInCourseSignUpForm`, `DisplayInTariffSignUpForm`, `DisplayInBookingSignUpForm`, `DisplayInResourceSearch`.

  To get all fields, fetch the full record using the [Get one CustomField](/rest-api/crm/get-customfields-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,
      "Name": "",
      "DisplayOrder": 0,
      "RecordType": 0,
      "FieldType": 0,
      "CustomFieldIndex": 0,
      "GroupName": null,
      "Visibility": 0,
      "Resources": [],
      "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": "CustomField 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
}
```
