List an order's shipments
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/orders/1/shipments';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/stores/example/orders/1/shipments \ --header 'x-api-key: <x-api-key>'Returns the shipment currently attached to the order (or null), the history of shipments that have ended, and the defaults a booking would start from, including whether a shipment can be booked now and, if not, why. Shipments are booked through the AllinGo carrier integration.
Required scopes: read:orders
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The order ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The shipment currently attached to the order, or null.
object
Carrier platform that booked the shipment. Always allingo.
Whether the booking was made on the carrier’s test or live environment.
Normalized status of the shipment.
Shipment ID.
The carrier platform’s own status code.
Tracking ID of the shipment on the carrier platform, or null.
Tracking ID issued by the delivery partner, or null until one is attached.
Code of the delivery partner, such as ghn.
Name of the delivery partner.
Logo URL of the delivery partner, or null.
ID of the carrier service that was booked.
Name of the carrier service.
Public tracking page on the carrier platform, or null.
Public tracking page of the delivery partner, or null.
Amount the courier collects from the recipient; 0 for a prepaid order.
Total carrier fee, or null while it is not known.
When the shipment was booked, as an ISO 8601 timestamp.
When the shipment was cancelled, or null.
Why the shipment was cancelled, or null.
When the shipment was delivered, or null.
Tracking history, newest first.
object
What recorded the event: a carrier webhook, a manual change or the system.
Event ID.
Normalized shipment status after this event.
The carrier’s name for the status, or null.
When the event happened, as an ISO 8601 timestamp.
Where the parcel was, or null.
A note from the carrier or the merchant, or null.
URLs of proof photos attached to the event.
Shipments that have ended (cancelled, failed or returned), newest first.
object
Carrier platform that booked the shipment. Always allingo.
Whether the booking was made on the carrier’s test or live environment.
Normalized status of the shipment.
Shipment ID.
The carrier platform’s own status code.
Tracking ID of the shipment on the carrier platform, or null.
Tracking ID issued by the delivery partner, or null until one is attached.
Code of the delivery partner, such as ghn.
Name of the delivery partner.
Logo URL of the delivery partner, or null.
ID of the carrier service that was booked.
Name of the carrier service.
Public tracking page on the carrier platform, or null.
Public tracking page of the delivery partner, or null.
Amount the courier collects from the recipient; 0 for a prepaid order.
Total carrier fee, or null while it is not known.
When the shipment was booked, as an ISO 8601 timestamp.
When the shipment was cancelled, or null.
Why the shipment was cancelled, or null.
When the shipment was delivered, or null.
Tracking history, newest first.
object
What recorded the event: a carrier webhook, a manual change or the system.
Event ID.
Normalized shipment status after this event.
The carrier’s name for the status, or null.
When the event happened, as an ISO 8601 timestamp.
Where the parcel was, or null.
A note from the carrier or the merchant, or null.
URLs of proof photos attached to the event.
Booking defaults for the order.
object
Why a shipment cannot be booked now, or null when it can.
Who pays the carrier fee.
Whether a shipment can be booked for the order now.
The store’s pickup address.
object
Name of the person at the address.
Phone number of the person at the address.
Street address.
The order’s delivery address.
object
How precisely the address was located: street, ward, or null when it could not be.
Name of the person at the address.
Phone number of the person at the address.
Street address.
Package weight in grams.
Package length in centimetres.
Package width in centimetres.
Package height in centimetres.
Amount still owed on the order, to collect on delivery; 0 for prepaid.
Declared value of the parcel: the order subtotal.
The carrier service the customer chose at checkout, or null.
Shipping fee the customer paid on the order.
Example
{ "active": { "provider_code": "allingo", "mode": "test", "status": "booked", "events": [ { "source": "webhook" } ] }, "history": [ { "provider_code": "allingo", "mode": "test", "status": "booked", "events": [ { "source": "webhook" } ] } ], "draft": { "cannot_book_reason": "feature_unavailable", "freight_payment_method": "cash", "dropoff": { "geocode_precision": "street" } }}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}