Skip to content

Update a shipment

PATCH
/commerce/management/v1/orders/{orderId}/shipments/{shipmentId}
curl --request PATCH \
--url https://api.ebitex.io/commerce/management/v1/orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/shipments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "status": "example", "trackingNumber": "example", "trackingUrl": "example", "externalReference": "example", "labelUrl": "example" }'

Changes a shipment’s status (shipped, in_transit, delivered or exception), trackingNumber, trackingUrl, externalReference or labelUrl. Send only what changes. A shipment cannot be undone and its items stay shipped.

Call it from your own server with a management key (the Management keys section of Commerce’s delivery keys screen); it has no CORS policy, so a browser page cannot use it. The key belongs to the organization and works on every store’s orders. It has two tiers: commerce.management.read reads orders, finds a shipment by its carrier reference and reads an order’s fulfilment; commerce.orders.fulfil does all of that and also records and updates shipments. Neither can refund, cancel, move an order along, change stock, or read who bought: no answer carries a buyer’s name, email or address. The key’s budget is 300 requests a minute.

Key: a Commerce management key with commerce.orders.fulfil.

orderId
required
string format: uuid
shipmentId
required
string format: uuid
Media typeapplication/json
object
status
required
null | string
trackingNumber
required
null | string
trackingUrl
required
null | string
externalReference
required
null | string
labelUrl
required
null | string
Examplegenerated
{
"status": "example",
"trackingNumber": "example",
"trackingUrl": "example",
"externalReference": "example",
"labelUrl": "example"
}

OK

invalid_status, invalid_tracking, invalid_trackingUrl or invalid_labelUrl.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key holds only commerce.management.read.

scope_denied: the key lacks commerce.orders.fulfil. app_not_available: Commerce is not enabled for the organization. ip_denied: the key was used from an address outside its restrictions.

order_not_found or a shipment that is not this order’s.

rate_limited: the key spent its 300 requests a minute; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.