Skip to content

Find a shipment by its carrier reference

GET
/commerce/management/v1/shipments
curl --request GET \
--url https://api.ebitex.io/commerce/management/v1/shipments \
--header 'Authorization: Bearer <token>'

Finds the shipment a carrier integration recorded under its own reference (externalReference), and the order it belongs to, so the integration can then read that order’s fulfilment. Send externalReference (at most 200 characters). A reference nothing was recorded under answers an empty items; a reference shared by several shipments returns each of them (at most 50).

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.management.read or commerce.orders.fulfil.

{ "items": [ { "shipmentId", "orderId", "orderNumber", "storeId", "number", "carrier", "trackingNumber", "externalReference", "status" } ] }

validation_failed: externalReference is missing, empty or too long.

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 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.

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.