Buy Fulfillment Order Label
POST/api/fulfillment-orders/:fulfillmentOrder/labels
Buys the label for one rate from Get Fulfillment Order Label Rates, right away. The rate is re-quoted on exactly that service first, so a rate the provider no longer offers fails here instead of at the carrier. A marketplace rate (walmart_sww, amazon_buy_shipping) is bought through Walmart or Amazon; any other through the label account.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
item_id(integer, required): theitem_idreturned by Get Fulfillment Order Label Rates for this order. It may also be theidof a label already bought for this order in any label batch (from Get Fulfillment Order Label): then nothing is bought or re-rated, and Buy only records the order's shipment for that label (a retry when recording it failed).service_token(string, max 191, required): the rate'sservice_token.provider(required): the rate'sprovider— easypost, shippo, shipstation, starshipit, shiprush, shiptheory, shippit, walmart_sww or amazon_buy_shipping.integration_instance_id(integer, required): the rate'sintegration_instance_id(the label account, or the Walmart / Amazon store).benefits(array of strings, optional, max 10, each max 64): the protections the chosen rate showed, e.g. ["claims_protected"]. The label is only bought while the re-quoted rate still has them; if it lost one, nothing is bought and the call returns 422 (statusno_rate) saying so. A rate Get Fulfillment Order Label Rates showed as A-to-z protected is held to that even whenbenefitsis not sent.
Returns data (the label batch item, as Get Label Batch Item: status, quoted, purchased with tracking numbers, cost and benefits, marketplace_label, failure fields) and a message. 200 when the label is bought, and also when it already was (repeating the call never buys twice). 422 with the same data and the reason when it was not bought (status no_rate or failed; get rates again). Print the label with Download Label Batch Item Label and void it with Void Label Batch Labels, using shipping_label_batch_id and the item id.
Also 422 (with errors.item_id) when item_id is not this order's row from Get Fulfillment Order Label Rates, or its label was voided (get rates again), and for missing or invalid fields.
Requires the orders write scope and the fulfillment_orders.index and fulfillment_orders.ship permissions.
Request
Responses
- 200
- 401
- 403
- 404
- 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.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
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.