> ## Documentation Index
> Fetch the complete documentation index at: https://terminal49-vorflux-dev-12120-supported-document-types.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a custom field definition

> Create a new custom field definition in the Terminal49 API to attach structured metadata like reference codes or enums to shipments and containers.

Create a custom field definition to describe metadata you want to store on shipments or containers.

## Request body

| Parameter        | Required | Description                                                                     |
| ---------------- | -------- | ------------------------------------------------------------------------------- |
| `entity_type`    | Yes      | The entity type this field applies to (`Shipment` or `Container`)               |
| `api_slug`       | Yes      | Unique identifier for the field                                                 |
| `display_name`   | Yes      | Human-readable name for the field                                               |
| `data_type`      | Yes      | Data type for values (for example: `short_text`, `number`, `date`, `reference`) |
| `description`    | No       | Optional description of the field's purpose                                     |
| `validation`     | No       | Validation rules (for example: `required`, `pattern`, `max_length`)             |
| `default_format` | No       | Default format string for numbers or dates                                      |
| `default_value`  | No       | Default value for new custom fields                                             |
| `reference_type` | No       | Required when `data_type` is `reference`                                        |
