Upload a document for extraction
Use this to have Trackberry read a loading sheet, packing list, invoice or bill of lading and turn it into structured data, whether or not the shipment is tracked with Trackberry. Send the file as multipart/form-data. Give shipment_id to file it on a shipment you already have, or container_number to file it on the live shipment carrying that container; with neither, or with a container no live shipment carries, a new draft shipment is made for it and is not tracked. The answer is the document with parse_status: pending: the file is virus-scanned, then classified and extracted within a few minutes. Poll get_document until data_available is true, then read get_document_data, or subscribe to the document.processed webhook. Data goes to your ERP only after the same review as any other document. Needs the write scope. Send an Idempotency-Key header so a retry after a timeout returns the first document (200) instead of making a second one; uploading the same file to the same shipment again also returns the first document. A new shipment is refused with billing_blocked (403) when the organization's billing does not allow one. Recorded in the audit log as made through the API. Limited to 120 uploads an hour per token.
Request
- Base URL: https://trackberry.com/api/v1
- URL: https://trackberry.com/api/v1/documents
- Auth: HTTP bearer
Headers
The API version to build this response for, for example 2026-10-01. Optional: without it the organization's pinned version is used (and the organization is pinned to the latest version on its first request without the header). Applies to this request only. An unpublished version is a 400 with code invalid_version.
A value you generate per upload, such as a UUID or your own line id, 1 to 255 printable ASCII characters. Repeating it within 24 hours with the same file and target returns the first document; with a different file or target it is a 400 with code idempotency_key_reused.
Response
A replay: the Idempotency-Key was already used for this request, or this file is already on this shipment. The first document is returned as it is now.
Changes
No recorded changes to this operation across all 1 revision of this API.