Skip to main content

Download Label Batch Labels

GET 

/api/shipping-label-batches/:shippingLabelBatch/labels

Download the batch's purchased labels as one file: a merged PDF, or a ZPL stream with each label closed by ^XZ, in the batch's label format. Voided, failed and unpurchased items are left out.

Required scope: orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Up to 100 labels: the file is returned directly (Content-Type application/pdf or application/zpl). Response headers X-Label-Count, X-Mismatched-Count, X-Mismatched-Item-Ids and X-Missing-Item-Ids describe the file. With output=url the response is JSON with download URLs instead.

More than 100 labels: the merge runs in the background and the response is 202 with a tracked_job_log_id. When the job completes its results carry download_url, download_filename, mismatched and (when some labels came back in the other format) mismatched_download_url.

Labels a provider returned in a format other than the batch's (for example PDF on a ZPL batch) are listed in mismatched and delivered in a second file (part=mismatched). Image labels (PNG/GIF) are listed but not merged; download them one at a time.

Each print stamps labels_printed_at and increments print_count on the batch, and stamps labels_printed_at on the printed items. Fetching part=mismatched does not count as another print. An identical re-print (same items, labels, sort and format) reuses the previously merged file.

Authentication: Requires Bearer token with orders:read and the fulfillment_orders.index permission.

Request​

Responses​

OK

Response Headers
    Content-Type