Skip to main content

Update Label Batch

PATCH 

/api/shipping-label-batches/:shippingLabelBatch

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.

Required scope: orders:write

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

Body (all optional):

  • name (string, 1-255)
  • rate_strategy: cheapest or fixed_service
  • integration_instance_ids (array of label account IDs, or null for every connected account). fixed_service needs exactly one.
  • service_token (string, max 191, nullable): the service for fixed_service.
  • allowed_service_tokens (array of service tokens, or null for any): limits cheapest rating to these services.
  • max_delivery_days (integer 1-30, nullable): cheapest rating skips slower rates.
  • package (object; package.mode required when sent): mode from_products or fixed; preset_id (max 64), name (max 120); length, width, height (> 0, max 1000) and dimension_unit (in, cm); weight (> 0, max 5000; required when mode=fixed) and weight_unit (lb, oz, kg, g); tare_weight (0-5000, added to the product weight in from_products mode). The package is replaced as a whole.
  • label_format: pdf or zpl.
  • ship_date (Y-m-d): today up to 6 days ahead.
  • marketplace_labels: include, prefer or exclude — how the batch uses Ship with Walmart and Amazon Buy Shipping labels for the orders that can have one (see Get Label Batch).
  • amazon_prefer_protected (boolean): when preferring Amazon Buy Shipping, take only rates with A-to-z claim protection; without one, the order falls back to the label accounts.

Returns the updated batch (as Get Label Batch). 409 while a rate or buy job holds the batch (only name can change then). 422 for a label account that is not connected, a marketplace_labels value other than include, prefer or exclude, a fixed service without one account and one service, a fixed package without a weight, or a ship date in the past or too far ahead.

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

With rate_strategy: cheapest, an account that gives no price before booking (Shiptheory) is refused in integration_instance_ids with a 422 — use it with fixed_service instead.

Request​

Responses​

OK

Response Headers
    Content-Type