Preview Label Batches
POST/api/shipping-label-batches/preview
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.
orders:writeGrant 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:scopeselected(default) usesfulfillment_order_ids(at most 500);scopealluses every fulfillment order matchingfilters— the List Fulfillment Orders filters as bare column keys, e.g. {"status": "open", "warehouse_id": 1};filter_groupsandsearchmay be included.sales_orders:scopeselectedusessales_order_ids(at most 500);scopealluses every sales order matchingfilters(the List Sales Orders filters). Each sales order's open fulfillment orders are batched; a sales order with none is returned inskipped_sales_orders[]with areason_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 200. 422 when the body is invalid.
Requires the orders write scope and the fulfillment_orders.index and fulfillment_orders.ship permissions.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.