Skip to main content
POST
/
custom_fields
Create a custom field
curl --request POST \
  --url https://api.terminal49.com/v2/custom_fields \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "links": {
    "self": "<string>"
  }
}
Use this endpoint to create a custom field value on a shipment or container. The field must reference an existing custom field definition.

Request body

ParameterRequiredDescription
entityYesPolymorphic relationship to a Shipment or Container
api_slugYesThe slug of the custom field definition
valueYesThe field value (must match the definition’s data type)

Value formats by data type

Data typeExpected value format
short_textAny string
numberNumeric value
dateDate string (parsed using definition’s default_format or flexible parsing)
datetimeDateTime string
booleantrue or false
enumString matching one of the definition’s option values
enum_multiArray of strings matching the definition’s option values

Validation

  • Values are validated against the definition’s data type
  • Enum values must match one of the definition’s configured options
  • The api_slug must reference a definition belonging to your account or a Terminal49 template

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 · object