# List custom field

Endpoint: POST /v3/companies/{companyId}/custom-fields/list
Version: v3
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Path parameters:

  - `companyId` (string, required)
    Identifier for company.

## Query parameters:

  - `companyRole` (string, required)

## Request fields (application/json):

  - `paginationParams` (object, required)
    Pagination parameters for requests.

  - `paginationParams.offset` (integer)
    The starting index in the list from which results are returned. The value must be greater than or equal to 0.

  - `paginationParams.limit` (integer)
    Maximum number of results to be fetched.

  - `searchText` (string)
    Search text to filter the custom fields.

  - `filter` (object)

  - `filter.definedAtList` (array)
    List of entity levels at which the custom field is defined.

  - `filter.enabled` (boolean)
    Boolean to enable or disable custom field.
    Example: true

  - `filter.customFieldIds` (array)
    Specific custom fields ids to filter.

  - `filter.tripUsageTypes` (array)
    List of trip usage types to filter custom fields.

  - `filter.captureSteps` (array)
    Filter by capture step (e.g. pre-search fields only). Empty means no filter.

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `paginationParams` (object)
    Pagination parameters for response.

  - `paginationParams.totalNumResults` (integer, required)
    Total number of results.

  - `fields` (array)
    List of custom field info

  - `fields.id` (string, required)
    Custom field id.

  - `fields.name` (string, required)
    Name of this field to be viewed by the user and consumed by mid-office systems.
    Example: Air Reason Code

  - `fields.description` (object)
    User-facing description of the custom field.

  - `fields.description.value` (string, required)
    Description of the custom field.
    Example: This field will capture the reason for out of policy booking

  - `fields.includeLocations` (array)

  - `fields.managementTags` (array)

  - `fields.managementTags.key` (string, required)
    The name or identifier of the tag.
    Example: OOP Reason Code

  - `fields.managementTags.value` (string, required)
    The display name of the tag, used as an alternative on the management page.
    Example: Out of Policy Code

  - `fields.respondOnlyOnceLevel` (string)
    User can respond this field only once at given level.
    Enum: "TRIP"

  - `fields.captureStep` (string)
    Point in the booking flow at which a custom field's answer is captured.
    Enum: "AT_CHECKOUT", "AFTER_SEARCH_CLICK", "BEFORE_SEARCH_CRITERIA"

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

## Response 404:

  - `404` (unknown)
    The specified resource was not found.

## Response 404 fields (application/json):

  - `debugIdentifier` (string)
    Link to debug the error internally.

  - `errorMessages` (array)

  - `errorMessages.errorCode` (string)
    Error code to identify the specific errors.

  - `errorMessages.message` (string)
    Message containing details of error.

  - `errorMessages.errorParameters` (array)
    Error message parameters.

  - `errorMessages.errorParameters.name` (string)
    Parameter name

  - `errorMessages.errorParameters.value` (string)
    Parameter value

  - `errorMessages.errorDetail` (string)
    More details about the error.

