Skip to main content

Create Label Batches

POST 

/api/shipping-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.

Required scope: orders:write

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

Body — pick the orders from one of three sources (source, default fulfillment_orders):

  • fulfillment_orders: scope selected (default) uses fulfillment_order_ids (at most 500); scope all uses every fulfillment order matching filters — the List Fulfillment Orders filters as bare column keys, e.g. {"status": "open", "warehouse_id": 1}; filter_groups and search may be included.
  • sales_orders: scope selected uses sales_order_ids (at most 500); scope all uses every sales order matching filters (the List Sales Orders filters). Each sales order's open fulfillment orders are batched; a sales order with none is returned in skipped_sales_orders[] with a reason_code: cancelled, already_shipped, no_open_fulfillment_order, not_found.
  • preset: preset + warehouse_id. ready_to_ship = every open, own-warehouse order at that warehouse not yet in a batch or shipped; ordered_today = those whose sales order date is today (account timezone); due_today = those whose requested ship date or ship-by date is today or earlier. See Get Label Batch Presets for the counts.
  • name (optional, max 200): batch name. Defaults to "<warehouse> · <date> · <n> orders"; when several warehouses are involved, each batch is named "<name> · <warehouse>".

Returns 201 with batches[] (full batch detail, as Get Label Batch), skipped[] and skipped_sales_orders[]. 422 when no label account is connected, nothing is eligible, or more than 500 orders match.

Requires the orders write scope and the fulfillment_orders.index and fulfillment_orders.ship permissions.

Request​

Responses​

Created

Response Headers
    Content-Type