# Get Custom Fields

This operation retrieves the list of custom fields defined on the platform. <br/>
Custom fields are additional package fields that can be displayed on PitneyTrack workflow pages.Custom fields can be created from `My Settings > Custom Fields > Add Custom Field` in the platform settings.

Endpoint: GET /api/v1/customfields
Version: 1.0.0
Security: bearerAuth

## Query parameters:

  - `skip` (integer)
    The page number of the results to retrieve. Pagination starts from 0.

  - `limit` (integer)
    The number of custom fields to retrieve per page.

  - `searchBy` (string)
    Search criteria for custom fields.

  - `query` (string)
    Search by name for custom fields.

## Response 200 fields (application/json):

  - `pageInfo` (object)

  - `pageInfo.totalCount` (integer)
    The total number of items available across all pages.
    Example: 30

  - `pageInfo.startCount` (integer)
    The starting position of the first item on the current page.
    Example: 1

  - `pageInfo.limit` (integer)
    The maximum number of items that can be displayed on a single page.
    Example: 20

  - `customFields` (array)

  - `customFields.customFieldId` (string)
    A unique identifier assigned to the custom field.
    Example: mMa0VjWvqbk8

  - `customFields.name` (string)
    The name of the custom field used for identification.
    Example: Shelf#

  - `customFields.customFieldType` (string)
    Specifies the type of custom field.
    Enum: "TEXT", "RADIO", "CHECKBOX"

  - `customFields.defaultValue` (string)
    The default value assigned to the custom field if no input is provided.
    Example: top

  - `customFields.status` (string)
    Current status of Custom field.
    Enum: "ACTIVE", "INACTIVE"

  - `customFields.archived` (boolean)
    If the custom field has been deleted or archived.
    Example: false

  - `customFields.values` (any)
    The value(s) assigned to the custom field. This parameter can hold either a single value or multiple values .

  - `customFields.assignPageForm` (array)
    A list of pages where the custom field is applied or assigned.

## Response 400 fields (application/json):

  - `errors` (array)
    List of errors.

  - `errors.errorCode` (string)
    This error can be validation_error or internal_error or not_found or already_exists
    Example: validation_error

  - `errors.errorDescription` (string)
    The HTTP 400 Bad Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
    Example: Custom Fields not found

## Response 401 fields (application/json):

  - `message` (string, required)
    This is HTTP 401 Unauthorized response status code, that indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

