Skip to main content
POST
/
custom_field_definitions
Create a custom field definition
curl --request POST \
  --url https://api.terminal49.com/v2/custom_field_definitions \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "links": {
    "self": "<string>"
  }
}
Create a custom field definition to describe metadata you want to store on shipments or containers.

Request body

ParameterRequiredDescription
entity_typeYesThe entity type this field applies to (Shipment or Cargo)
api_slugYesUnique identifier for the field
display_nameYesHuman-readable name for the field
data_typeYesData type for values (for example: short_text, number, date)
descriptionNoOptional description of the field’s purpose
validationNoValidation rules (for example: required, pattern, max_length)
default_formatNoDefault format string for numbers or dates
default_valueNoDefault value for new custom fields
reference_typeNoRequired when data_type is reference

Authorizations

Authorization
string
header
required

Token YOUR_API_TOKEN

The APIs require authentication to be done using header-based API Key and Secret Authentication.

API key and secret are sent va the Authorization request header.

You send your API key and secret in the following way:

Authorization: Token YOUR_API_KEY

Body

application/json
data
object

Response

201 - application/json

Created

data
Custom field definition · object