Shipments

Poll a queued label batch

GET /v2/file-history?id=88213 Bearer token

Reads one generated-file record. You need this when GET /v2/shipments/waybill or GET /v2/shipments/sticker-waybill answers with pdf_queued: true: the PDF is being built in the background and this is where the finished file appears.

Any request for more than one shipment is queued, so on a batch print this is part of the normal path rather than an edge case.

Parameters

Name Type Required Notes
id integer yes The file_history_id from the label response. An id that is not on your account fails with No file history found.

Response

See the example response.

Field Notes
file_status processing, success or failed.
file_url The finished document, once file_status is success. Null before that. The link works for 24 hours.
failed_reason Why generation failed.
file_type pdf-waybills for A4/A5/A6 waybills, pdf-sticker-waybills for stickers.
metadata.has_multiple True when the file covers more than one shipment.
metadata.sent_by_email Always false for an API key. It is only set when a file asked for from the Bob Go app takes more than a minute, and is emailed instead.

Poll every few seconds until file_status leaves processing. A batch of several hundred labels takes appreciably longer than a handful, so back off rather than polling tightly. Records are kept for a month, so collect the file when it is ready rather than keeping the id for later.