Skip to main content

Create Custom Field

POST 

/custom-field

Create a new customizable field

Available Custom Field Entities

The Custom Field supports the following entities:

  1. 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:

  1. TEXT
    • Represents a text-based custom field.
    • Typically used for storing string values.
  2. TIMESTAMPTZ
    • Represents a timestamp with timezone custom field.
    • Typically used for storing date and time values with timezone information.
  3. NUMERIC
    • Represents a numeric custom field.
    • Typically used for storing integer or decimal values.
  4. 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 type field in the Custom Field.

Example

Type NameExample Value
TEXT"Custom Text"
TIMESTAMPTZ"2023-10-01T12:00:00Z"
NUMERIC12345
FLOAT123.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

NameGenerated Key
Shipment IDshipment_id
Invoice Noinvoice_no

Request

Responses

OK