Skip to main content

Start Shipment Import via File

POST 

/api/v1/shipments/imports/file

  • Supported formats: CSV, XLS, XLSX
  • Minimum rows: Your file must contain at least two rows (one header row and one data row).
  • Maximum rows: You can import up to 300 rows per file. For larger datasets, please split them into multiple files.
  • Header requirements: Headers are case-sensitive and must match the defined format exactly.
File Headers
Header (Case sensitive)RequiredExampleDescription
tracking_numberDFSU7162007The B/L, booking, or container number.
tracking_typecontainerThe type of number being tracked. Choices are bill_of_lading, booking, container, and without_tracking.
carrierMSCUThe SCAC code for the shipping line. Recommended for container tracking to bypass auto-detection. This field is required for the tracking type: bl and bk
referenceABC345678A client-generated unique identifier for the shipment. This field is required for creating 'without tracking' shipments.
nameYour desired name for this shipment. If the shipment already exists, its name will be updated.
viewers[email protected], [email protected]List of comma-separated emails to share this shipment with (as viewers).
tagsGoods, ImportList of comma-separated strings to use as a tag for each shipment. Behaviour for setting tags is get or create, so if the tag does not exist, we create it. (case Insensitive).
assignees[email protected], [email protected]A list of comma-separated emails to assign them to this shipment. Each email should be a member of the workspace; otherwise, it will be ignored.
cf\_{custom_field_slug}PO#111Your custom fields for this shipment with this format: cf_<custom_field_slug>. Custom field slugs are available on the custom fields settings page in the dashboard.
origin_country_codeGB
destination_country_codeUS

Addtional Information

Reference:

  • Allowed characters: A-Z a-z 0-9 . _ - / and space
  • Length: 1-255 characters
  • Whitespace: Leading and trailing spaces are trimmed and internal spaces are preserved
  • Case: Stored as provided (case-preserving) and matching is case-insensitive
Errors
CodeTRACKING_NUMBER_REQUIRED
MessageThe tracking_number field cannot be empty.
Suggested FixPlease provide a valid tracking number for this shipment.
Targettracking_number
CodeREFERENCE_INVALID_FORMAT
MessageThe reference 'example' contains invalid characters.
Suggested FixPlease use only letters (a-Z), numbers (0-9), and the special characters: -, _, /.
Targetreference
CodeCARRIER_INVALID_FORMAT
MessageThe carrier 'invalid' has an invalid format. Expected a string.
Suggested FixA SCAC must be exactly 4 alphanumeric characters (e.g., 'MSCU'). Use 'AUTO' for automatic carrier detection.
Targetcarrier
CodeCARRIER_NOT_SUPPORTED
MessageThe carrier with SCAC 'INVALID' is not currently supported.
Suggested FixPlease check our list of supported carriers. If you'd like us to support this carrier, please contact our team.
Targetcarrier_scac
CodeNAME_TOO_LONG
MessageThe name field for this shipment is too long. The maximum allowed length is 255 characters.
Suggested FixPlease shorten the shipment name to 255 characters or fewer.
Targetname
CodeREFERENCE_REQUIRED
MessageReference is required for this tracking_type
Suggested FixPlease provide a reference for this shipment.
Targetreference
CodeTRACKING_TYPE_INVALID
MessageThe tracking type 'invalid_type' is invalid.
Suggested FixPlease provide a valid tracking type for this shipment. Choices are : container, bill_of_lading, booking, and order.
Targettracking_type
CodeTRACKING_NUMBER_INVALID
MessageThe tracking number 'invalid_number' is invalid.
Suggested FixPlease provide a valid tracking number for this shipment.
Targettracking_number
CodeAUTO_NOT_APPLICABLE
MessageAUTO is not applicable for bill_of_lading.
Suggested FixPlease provide a valid carrier SCAC code.
Targetcarrier_scac
CodeCARRIER_SCAC_REQUIRED
MessageCarrier SCAC is required for bill_of_lading.
Suggested FixPlease provide a valid carrier SCAC code.
Targetcarrier_scac
CodeTAG_NAME_TOO_LONG
MessageThe tag name 'very_long_tag_name_that_exceeds_limit' is too long.
Suggested FixPlease shorten the tag name to 128 characters or fewer.
Targettags
CodeREFERENCE_DUPLICATE_IN_BATCH
MessageThe reference 'duplicate_ref' is used for more than one shipment in this import file.
Suggested FixEach shipment within a single import file must have a unique reference.
Targetreference
CodeREFERENCE_ALREADY_EXISTS
MessageThe reference 'existing_ref' is already in use by another shipment in your workspace.
Suggested FixTo update an existing shipment, ensure the tracking number and carrier match. To create a new shipment, please use a new, unique reference.
Targetreference
CodeSHIPMENT_DUPLICATE_IN_BATCH
MessageThe combination of tracking number 'tracking123' and carrier 'MSCU' appears multiple times in this import file.
Suggested FixPlease remove the duplicate shipment entry from your import file.
Targettracking_request
Warnings
Warning CodeCUSTOM_FIELD_INVALID_TYPE
MessageThe value for the custom field 'field_slug' has the wrong type. Expected a 'string'
Suggested FixPlease ensure the value matches the data type defined for this custom field (e.g., Number, Date, Text).
Targetcustom_fields
Warning CodeCUSTOM_FIELD_TOO_LONG
MessageThe value for the custom field 'field_slug' is too long.
Suggested FixPlease shorten the value for the custom field '{field_slug}'.
Targetcustom_fields
Warning CodeCUSTOM_FIELD_IGNORED_UNKNOWN
MessageThe shipment was processed, but the custom field 'unknown_field' was ignored because it is not defined in your workspace.
Suggested FixTo include this data, please create the custom field in your workspace settings and then update this shipment.
Targetcustom_fields
Warning CodeEMAIL_IGNORED_INVALID_FORMAT
MessageThe shipment was processed, but the email address 'invalid_email' was ignored because it has an invalid format.
Suggested FixPlease check the email address for typos. You can re-share or re-assign the shipment from the dashboard.
Targetshared_with, assignees
Warning CodeSHARING_IGNORED_INCORRECT_ROLE
MessageThe shipment was processed, but it could not be shared with 'invalid_email' because their account does not have permissions to view shipments.
Suggested FixPlease ensure you are sharing with users who have 'viewer' permissions, or contact your workspace administrator to adjust the user's role.
Targetshared_with

Request

Responses

Accepted