Label Batches
List Label Batches
Paginated label batches, newest first. Each row carries `counts` ({total, purchased, failed}: failed includes no-rate items; removed items are not counted), `purchased_total` (cost of the bought labels) and `currency`. `quoted_total` and `failure_codes` are null in the list; Get Label Batch returns them.
Create Label Batches
Creates label batches from own-warehouse fulfillment orders: one batch per ship-from warehouse, each in `draft` status with today's ship date and the account's default options (see Get Label Batch Options). Orders that cannot go in a batch are left out and returned in `skipped[]` with a `reason` and `reason_code`: not_open, not_own_warehouse (a 3PL or provider-fulfilled warehouse), already_shipped, in_batch (already in another open batch), missing_address, warehouse_address_incomplete, not_found.
Get Label Batch Options
What a batch can be configured with: the connected label accounts (`label_accounts[]`, each with its `provider`, whether it is a test account, whether it supports SCAN forms / manifests, and its `services[]` as {token, name, carrier}), the saved `package_presets`, the `defaults` a new batch starts with (from the account's shipping label settings, plus `print_sort`, `marketplace_labels` and `amazon_prefer_protected`), the allowed `rate_strategies` and `label_formats`, the `marketplace_rules` for `marketplace_labels` (include, prefer, exclude, each with its label), `marketplace_accounts` (the connected Walmart and Amazon stores that can sell their own labels: `integration_instance_id`, `name`, `provider` walmart_sww or amazon_buy_shipping, `provider_label`, `enabled` = whether the store offers its labels, set on the store's own settings, and `settings_route` = the SKU.io app page of that setting), `max_items` (orders per batch) and `max_future_ship_days` (how far ahead a ship date may be).
Preview Label Batches
Shows what Create Label Batches would do with the same body, without creating anything: how many fulfillment orders the body names (`fulfillment_order_count`), how many can go in a batch (`eligible_count`), how they split into one batch per ship-from warehouse (`warehouses[]`), and what would be skipped (`skipped[]`, `skipped_sales_orders[]`, with the same reason codes as create). When more orders match than one batch holds, `too_many` is true, `fulfillment_order_count` is the number that matched, and nothing else is worked out.
Get Label Batch Presets
Per own warehouse that has orders ready to ship, how many orders each create preset would pick: `ready_to_ship` (every open order not yet in a batch or shipped — includes the other two), `ordered_today` (sales order date is today in the account timezone) and `due_today` (requested ship date or ship-by date is today or earlier). Warehouses with nothing ready are left out. `default_warehouse_id` is the warehouse with the most ready orders; `max_items` is the most orders one batch holds.
Get Label Batch
One label batch with exact counters and totals. `counts`: total (excluding removed items), pending, rated, purchasing, purchased, failed (failed + no_rate), no_rate, voided (voided + void_pending), void_pending, test (labels bought on a test account) and unrecorded (live labels bought whose shipment was never recorded; the next buy records them without buying again). `failure_codes` counts the failed and no-rate items per failure code. `quoted_total` sums the rates of the rated, purchasing and purchased items, `buyable_quoted_total` the rates of exactly what a buy without `item_ids` takes: the rated items plus those still purchasing (failed rows are retried only by id), `buyable_by_provider` splits that buy by label provider (`provider`, `provider_label`, `is_marketplace`, `count`, `protected_count` = rates with A-to-z claim protection, `total`, `currency`; null on the list endpoint), `purchased_total` the cost of the bought labels; `currency` is null when the labels are in more than one currency. `warehouse.address_complete` is false (with `address_missing_fields`) when the ship-from address cannot be used for rating. `created_by` names the user who created the batch.
Update Label Batch
Renames a batch and/or changes its options. Only the fields you send change. Changing a rating option (anything but `name` and `label_format`, including `marketplace_labels` and `amazon_prefer_protected`) on a batch that already has rated items sets `rates_stale`, and buying is refused until the batch is rated again.
Delete Label Batch
Deletes a batch that holds no bought label (voided labels are fine) and releases its fulfillment orders so they can go in another batch. 422 when a label is bought, being bought or pending a void: void those first. 409 while a rate or buy job holds the batch.
Rate Label Batch
Gets rates for the batch's pending, rated, no-rate and failed items (or only `item_ids`) in the background. Returns 202 with a background job id (`tracked_job_log_id`); poll the job, then read the batch and its items. While the job runs the batch is `rating` and `is_busy` is true. Each item ends `rated` (see its `quoted` rate) or `no_rate` / `failed` with a `failure_code`. Rating clears `rates_stale`.
Buy Label Batch Labels
Buys labels in the background, at each item's quoted rate. Without `item_ids` it buys the batch's rated items and resumes those still `purchasing`; failed rows are bought only when named in `item_ids` (e.g. Retry). An item whose purchase was already started at the provider is always resumed on the same attempt, never bought twice. Returns 202 with a background job id (`tracked_job_log_id`); poll the job, then read the batch and its items. While the job runs the batch is `purchasing`. Each bought label records a shipment on its fulfillment order (`sales_order_fulfillment_id`); an item whose label could not be bought ends `failed` with a `failure_code`. The batch then ends `completed` or `completed_with_failures`. Items bought earlier whose shipment was not recorded are finished too.
Void Label Batch Labels
Voids the bought labels of `item_ids` with their providers, one item at a time. `results[]` says what happened to each: `status` voided, void_pending (the provider accepted the void and the refund settles later) or, with `error: true`, the item's unchanged status and the provider's `message`. A voided label's shipment is removed from its fulfillment order, which can then go in another batch. `voided` and `errors` count the outcomes and `batch` is the updated batch (as Get Label Batch).
List Label Batch Items
Paginated items (one per fulfillment order) of a batch, in the order they were added. Removed items are left out unless `filter[status]` names `removed`.
Add Label Batch Items
Adds fulfillment orders to a batch. Only open own-warehouse orders that ship from the batch's warehouse and are not in another open batch are added; the rest come back in `skipped[]` with a `reason` and `reason_code` (not_open, not_own_warehouse, already_shipped, in_batch, missing_address, warehouse_address_incomplete, not_found). New items are `pending`: rate the batch to price them. A completed batch reopens.
Remove Label Batch Items
Removes items from a batch and releases their fulfillment orders. Only items without a bought label (pending, rated, no_rate, failed) are removed; items with a bought or in-progress label stay (void them first) and are counted in `kept`. Removed items keep status `removed`.
Get Label Batch Item
One item of a label batch, in the same shape as a row of List Label Batch Items: its `status`, fulfillment and sales order, `ship_to`, `lines[]` with product weights, the `quoted` rate, the `purchased` label, `ship_date`, the recorded shipment and any `failure_code` / `failure_label` / `failure_reason`. The batch page uses it to refresh the open order panel after a rate or buy job.
Update Label Batch Item
Fixes one item: its own package and/or service. The item goes back to `pending` (its quote and failure are cleared), so rate the batch again to price it.
List Label Batch Item Rates
Every rate for one item's order, cheapest first, across the batch's label accounts (every connected label account for a fixed-service batch) and the order's marketplace label program (Ship with Walmart for a Walmart order, Amazon Buy Shipping for an Amazon order). The batch's allowed services and max delivery days are not applied, so you can pick any of them. To use one, send its `service_token` as `service_override` and its `integration_instance_id` as `service_override_integration_instance_id` to Update Label Batch Item, then rate the batch again.
Get Label Batch Customs
Gets what a batch's international orders need for their customs declarations: the declaration in effect (contents type, if-undeliverable, incoterm, signer), every product in those orders with its HTS code and country of origin and where each came from (`product`, `product_type` = the product type's default, `override` = entered for this batch, or null = missing), and every order with its declared lines, customs value total in the order currency and what it is missing.
Update Label Batch Customs
Saves customs values for some of a batch's international orders, then (with `rate: true`) gets rates for them in the background.
Download Label Batch 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.
Download Label Batch Item Label
Download one item's label in its stored format (PDF, ZPL, or PNG). Without index, a multi-package label is returned as one file (merged PDF or concatenated ZPL); with index, only that package's label (0-based). Stamps labels_printed_at on the item. The item must belong to the batch, otherwise 404.