Create Custom Field
POST/custom-field
Create a new customizable field
Available Custom Field Entities
The Custom Field supports the following entities:
- FLEET_TASK_INSTANT- Represents a custom field for fleet task instant entities.
- Typically used for storing additional information related to fleet task instants.
- For example, a custom field for Shipment ID or Invoice Number.
 
Available Custom Field Types
The Custom Field supports the following data types:
- TEXT- Represents a text-based custom field.
- Typically used for storing string values.
 
- TIMESTAMPTZ- Represents a timestamp with timezone custom field.
- Typically used for storing date and time values with timezone information.
 
- NUMERIC- Represents a numeric custom field.
- Typically used for storing integer or decimal values.
 
- FLOAT- Represents a floating-point custom field.
- Typically used for storing decimal values with higher precision.
These constants define the valid types that can be assigned to the typefield in theCustom Field.
 
Example
| Type Name | Example Value | 
|---|---|
| TEXT | "Custom Text" | 
| TIMESTAMPTZ | "2023-10-01T12:00:00Z" | 
| NUMERIC | 12345 | 
| FLOAT | 123.45 | 
Custom Field Key Generation
The key field in the Custom Field is a unique identifier for the custom field.
The key is automatically generated when creating a new custom field, and it follows a specific format:
- The key is generated based on the custom field name.
- The key is in lowercase and uses underscores to separate words (lower snakecase).
- The key is unique within the context of the entity.
- The key is used to reference the custom field in various operations, such as creating or updating custom field values.
Example
| Name | Generated Key | 
|---|---|
| Shipment ID | shipment_id | 
| Invoice No | invoice_no | 
Request
Responses
- 200
- 400
- 401
- 403
- 404
OK
Bad Request
Unauthorized
Forbidden
Not Found