Delivery
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.
shippedout_for_deliverydelivery_attempteddeliveredreturned - 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.
shippedout_for_deliverydelivery_attempteddeliveredreturned - 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
| HTTP | Code | Meaning |
|---|---|---|
| 404 | RESOURCE_NOT_FOUND | The ID does not exist in this store. |
| 409 | SHIPMENT_OWNED_ELSEWHERE | The merchant or another app owns this shipment. |
| 409 | SHIPPING_ORDER_NOT_ELIGIBLE | The order is unpaid, cancelled, refunded, delivered, or has nothing to ship. |
| 409 | SHIPPING_LARM_LABEL_EXISTS | The order already has a Larm shipping label. |
| 409 | SHIPPING_SELF_UNAVAILABLE | This store ships through Larm only. |
| 422 | INVALID_SHIPMENT_STATUS | Unknown stage. |
| 422 | SHIPMENT_CARRIER_REQUIRED | No delivery company on the order or in the request. |
| 422 | INVALID_TRACKING_URL | The tracking link is not https. |
| 422 | INVALID_LABEL_URL | The label link is not https. |
| 403 | SCOPE_REQUIRED | The token does not carry the required scope. |
| 503 | APPS_SCOPE_RUNTIME_NOT_READY | The resource is not enabled on this merchant's store yet. |
Shared codes are listed in Errors.