> ## Documentation Index
> Fetch the complete documentation index at: https://terminal49.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List account custom field definitions

> List the custom field definitions configured for your Terminal49 account, including data type, api_slug, and the entity type each definition applies to.

Lists the custom field definitions configured for your account. The list is not paginated. The API ignores `page[number]` and `page[size]` and returns every row, but still sends pagination `links`. Do not follow `links.next`.

The API always returns the definitions of the authenticated user's account, whatever `account_id` you pass.

## Query filters

| Filter | Description |
| - | - |
| `filter[entity_type]` | Filter by entity type: `Shipment` or `Cargo` (containers) |
| `filter[data_type]` | Filter by data type |
| `filter[display_name]` | Filter by display name (prefix match) |


## OpenAPI

````yaml get /accounts/{account_id}/custom_field_definitions
openapi: 3.0.0
info:
  title: Terminal49 API Reference
  version: 0.2.0
  contact:
    name: Terminal49 API support
    url: https://www.terminal49.com
    email: support@terminal49.com
  description: >-
    The Terminal 49 API offers a convenient way to programmatically track your
    shipments from origin to destination.


    Please enter your API key into the "Variables" tab before using these
    endpoints within Postman.
  x-label: Beta
  termsOfService: https://www.terminal49.com/terms
servers:
  - url: https://api.terminal49.com/v2
    description: Production
security:
  - authorization: []
tags:
  - name: Containers
  - name: Custom Field Definitions
  - name: Custom Field Options
  - name: Custom Fields
  - name: Shipments
  - name: Locations
  - name: Events
  - name: Tracking Requests
  - name: Webhooks
  - name: Webhook Notifications
  - name: Ports
  - name: Metro Areas
  - name: Terminals
  - name: Routing (Paid)
  - name: Documents
  - name: Email Submissions
  - name: Document Schemas
  - name: Search
  - name: Parties
  - name: Account
paths:
  /accounts/{account_id}/custom_field_definitions:
    parameters:
      - schema:
          type: string
          format: uuid
        name: account_id
        in: path
        required: true
        description: >-
          Your account ID. The API always uses the account of the authenticated
          user.
    get:
      tags:
        - Custom Field Definitions
      summary: List custom field definitions
      description: >-
        Lists the custom field definitions configured for your account. The list
        is not paginated. The API ignores `page[number]` and `page[size]` and
        returns every row, but still sends pagination `links`. Do not follow
        `links.next`.
      operationId: get-account-custom-field-definitions
      parameters:
        - schema:
            type: string
            enum:
              - Shipment
              - Cargo
          in: query
          name: filter[entity_type]
          description: Filter by entity type. `Cargo` means containers.
        - schema:
            type: string
          in: query
          name: filter[data_type]
          description: Filter by data type
        - schema:
            type: string
          in: query
          name: filter[display_name]
          description: Filter by display name (prefix match)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/custom_field_definition'
                  links:
                    $ref: '#/components/schemas/links'
components:
  schemas:
    custom_field_definition:
      title: Custom field definition
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - custom_field_definition
        attributes:
          type: object
          properties:
            entity_type:
              type: string
              enum:
                - Shipment
                - Cargo
              description: >-
                The entity type this definition applies to. `Cargo` means
                containers.
            api_slug:
              type: string
            display_name:
              type: string
            description:
              type: string
              nullable: true
            data_type:
              type: string
              enum:
                - short_text
                - number
                - date
                - datetime
                - boolean
                - enum
                - enum_multi
                - reference
            reference_type:
              type: string
              nullable: true
            validation:
              type: object
              nullable: true
              additionalProperties: true
            default_format:
              type: string
              nullable: true
            default_value:
              $ref: '#/components/schemas/custom_field_value'
            reference_number:
              type: boolean
              description: >-
                Whether values are reference numbers. Terminal49 indexes
                reference-number values on account definitions for global search
                and document matching.
            sensitive:
              type: boolean
              description: >-
                Whether the field is sensitive. Sensitive fields are hidden from
                recipients of externally shared container views.
            inline_option_creation:
              type: boolean
              description: >-
                Whether users can add a new option while entering an `enum` or
                `enum_multi` value in the Terminal49 app.
            template_id:
              type: string
              format: uuid
              nullable: true
              description: ID of the Terminal49 template this definition was copied from.
            has_data:
              type: boolean
              description: Whether any entity has a value for this definition.
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            discarded_at:
              type: string
              format: date-time
              nullable: true
              description: When the definition was archived.
          required:
            - entity_type
            - api_slug
            - display_name
            - data_type
        relationships:
          type: object
          properties:
            account:
              type: object
              description: The owning account. `null` for Terminal49 templates.
              properties:
                data:
                  type: object
                  nullable: true
                  required:
                    - type
                    - id
                  properties:
                    id:
                      type: string
                      format: uuid
                    type:
                      type: string
                      enum:
                        - account
            created_by:
              type: object
              description: The user who created the definition.
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - user
                    id:
                      type: string
                      format: uuid
                  required:
                    - type
                    - id
                  nullable: true
            options:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    required:
                      - type
                      - id
                    properties:
                      id:
                        type: string
                        format: uuid
                      type:
                        type: string
                        enum:
                          - custom_field_option
      required:
        - id
        - type
    links:
      title: links
      type: object
      properties:
        self:
          type: string
        current:
          type: string
        first:
          type: string
        prev:
          type: string
        next:
          type: string
        last:
          type: string
      description: >-
        Pagination links. Each value is an absolute URL. `self` repeats the
        request URL as sent, including its query string and its encoding.
        `current`, `first`, `prev`, `next`, and `last` repeat the request's
        query parameters, with `page[number]` and `page[size]` in unencoded
        brackets.
    custom_field_value:
      description: Raw custom field value (type depends on definition)
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: array
          items:
            type: string
        - type: object
          additionalProperties: true
  securitySchemes:
    authorization:
      name: Authorization
      type: apiKey
      in: header
      description: >-
        Use a Terminal49 API key in the `Authorization` header with the `Token`
        prefix.


        `Authorization: Token YOUR_API_KEY`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.