Developers

Delivery

Markdown

Update an order shipment

Sets the delivery company, tracking number and stage of a paid physical order. The merchant and the customer see them on the order.

PATCH/stores/{storeId}/v1/orders/{id}/shipment

Send status every time; carrier, tracking_number, tracking_url and label_url keep their last value when omitted. label_url is the shipping label the merchant prints. Only this reply returns it: other apps and the customer never see it. The first shipped or out_for_delivery notifies the customer, and delivered completes the order. See Delivery companies.

Path parameters

idstringrequired

Request body

statusstringrequired
The shipment stage. delivered completes the order and tells the customer it arrived.shipped out_for_delivery delivery_attempted delivered returned
carrierstring
The delivery company name. Required on the first update of an order that has no delivery option.
tracking_numberstring
tracking_urlstring (uri)
An https link the customer opens.
label_urlstring (uri)
An https link to the shipping label the merchant prints. The customer does not see it.

Response

dataobjectrequired
order_idstring
statusstring
The shipment stage. delivered completes the order and tells the customer it arrived.shipped out_for_delivery delivery_attempted delivered returned
carrierstring
tracking_numberstring | null
tracking_urlstring | null
label_urlstring | null
updated_atstring (date-time)
executionobject
Who executed the request: the app, version, installation and store. Field names here are camelCase.
appIdstring (uuid)
versionIdstring (uuid)
installationIdstring (uuid)
storeIdstring (uuid)
requestIdstring (uuid)
generationinteger
routeEpochinteger
appAuthEpochinteger
grantRevisioninteger
metaobjectrequired
request_idstring (uuid)
The request ID; include it in any support request.

Errors

HTTPCodeMeaning
404RESOURCE_NOT_FOUNDThe ID does not exist in this store.
409SHIPMENT_OWNED_ELSEWHEREThe merchant or another app owns this shipment.
409SHIPPING_ORDER_NOT_ELIGIBLEThe order is unpaid, cancelled, refunded, delivered, or has nothing to ship.
409SHIPPING_LARM_LABEL_EXISTSThe order already has a Larm shipping label.
409SHIPPING_SELF_UNAVAILABLEThis store ships through Larm only.
422INVALID_SHIPMENT_STATUSUnknown stage.
422SHIPMENT_CARRIER_REQUIREDNo delivery company on the order or in the request.
422INVALID_TRACKING_URLThe tracking link is not https.
422INVALID_LABEL_URLThe label link is not https.
403SCOPE_REQUIREDThe token does not carry the required scope.
503APPS_SCOPE_RUNTIME_NOT_READYThe resource is not enabled on this merchant's store yet.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close