Printing | Freight API
Freight API reference for printing: fetch con-notes and labels for a booked shipment in the format your printer needs.
Returns active (non-revoked) Datashift print devices registered for the tenant, each with its full list of reported printers.
Use the id of the desired device as deviceId when calling POST /shipments/{id}/print. Optionally use one of that device's printers[].id as printerId to override which physical printer on the device receives the label — omit it to use the device's preferred printer (isPreferred: true).
Devices are registered from the Datashift portal (Settings → Freight → Print Devices). Each device runs the Datashift label client software and listens for print jobs. Revoked devices are excluded from this list. A device that hasn't reported its printer list yet (older label-client versions) has an empty printers array.
FreightApiKeyAuthorizationBearer <dsfrt_<64-hex-chars>>API key issued from Settings → Freight → API Keys. The raw key is shown once at creation.
Active print devices for this tenant
application/json- response
devices*array<>curl -X GET 'https://datashift.com.au/api/freight/print-devices'{ "devices": [ { "id": "dev_abc123", "label": "Warehouse A", "printerName": "Zebra ZT411", "lastUsedAt": "2026-06-25T06:00:00.000Z", "createdAt": "2026-01-10T00:00:00.000Z", "printers": [ { "id": "prn_abc123", "name": "Zebra ZT411", "isPreferred": true, "isOnline": true, "lastSeenAt": "2026-09-08T00:00:00.000Z" }, { "id": "prn_def456", "name": "HP LaserJet Office", "isPreferred": false, "isOnline": true, "lastSeenAt": "2026-09-08T00:00:00.000Z" } ] }, { "id": "dev_def456", "label": "Dispatch Desk", "printerName": null, "lastUsedAt": null, "createdAt": "2026-03-01T00:00:00.000Z", "printers": [] } ]}Fetches the shipment label from the carrier and queues a print job to the specified device.
Prerequisites:
- Direct print must be enabled for the tenant in Settings → Freight.
- The target device must be registered, active, and running the Datashift label client.
Typical flow: Call GET /print-devices once during setup, store each device's id (and, if you need per-job printer overrides, its relevant printers[].id) in your WMS/ERP config keyed by workstation, then pass the relevant IDs in this request after booking.
Handling DEVICE_NOT_FOUND: If the response is 404 with code: DEVICE_NOT_FOUND, the stored device ID is stale (device was revoked or replaced). Re-fetch GET /print-devices, overwrite your stored device list, and prompt the user to select a device before retrying.
Handling LABEL_NOT_AVAILABLE: The label is not yet ready from the carrier — poll GET /shipments/{id}/label with exponential backoff and retry once available.
FreightApiKeyAuthorizationBearer <dsfrt_<64-hex-chars>>API key issued from Settings → Freight → API Keys. The raw key is shown once at creation.
id*stringDatashift shipment ID (from booking response or GET /shipments)
application/json- body
deviceId*stringID of the print device to send the label to (from GET /print-devices)
printerId?stringOptional id of a specific printer on the target device; defaults to the device's preferred printer when omitted.
Print job queued successfully
application/json- response
jobId*stringDatashift print job ID
curl -X POST 'https://datashift.com.au/api/freight/shipments/string/print' \ -H 'Content-Type: application/json' \ -d '{ "deviceId": "dev_abc123", "printerId": "prn_def456"}'{ "jobId": "pj_xyz789"}Pickups | Freight API
Freight API reference for pickups: book, list and check carrier pickups, and see which ones failed before a driver doesn't turn up.
Schemas | Freight API
Freight API schemas: every request and response object used by the DataShift Freight API, with field types and required properties.