Skip to content

List an order's shipments

GET
/stores/{storeRef}/orders/{id}/shipments
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

id
required
integer

The order ID.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
active
required

The shipment currently attached to the order, or null.

object
provider_code
required

Carrier platform that booked the shipment. Always allingo.

string
Allowed values: allingo
mode
required

Whether the booking was made on the carrier’s test or live environment.

string
Allowed values: test live
status
required

Normalized status of the shipment.

string
Allowed values: booked picked_up in_transit out_for_delivery delivered failed returned cancelled
id
required

Shipment ID.

number
provider_status
required

The carrier platform’s own status code.

string
track_id
required

Tracking ID of the shipment on the carrier platform, or null.

string
nullable
partner_track_id
required

Tracking ID issued by the delivery partner, or null until one is attached.

string
nullable
partner_code
required

Code of the delivery partner, such as ghn.

string
partner_name
required

Name of the delivery partner.

string
partner_logo_url
required

Logo URL of the delivery partner, or null.

string
nullable
service_id
required

ID of the carrier service that was booked.

string
service_name
required

Name of the carrier service.

string
track_link
required

Public tracking page on the carrier platform, or null.

string
nullable
partner_track_link
required

Public tracking page of the delivery partner, or null.

string
nullable
cod_amount
required

Amount the courier collects from the recipient; 0 for a prepaid order.

number
fee_total
required

Total carrier fee, or null while it is not known.

number
nullable
booked_at
required

When the shipment was booked, as an ISO 8601 timestamp.

string
cancelled_at
required

When the shipment was cancelled, or null.

string
nullable
cancel_reason
required

Why the shipment was cancelled, or null.

string
nullable
delivered_at
required

When the shipment was delivered, or null.

string
nullable
events
required

Tracking history, newest first.

Array<object>
object
source
required

What recorded the event: a carrier webhook, a manual change or the system.

string
Allowed values: webhook manual system
id
required

Event ID.

number
status
required

Normalized shipment status after this event.

string
status_name
required

The carrier’s name for the status, or null.

string
nullable
occurred_at
required

When the event happened, as an ISO 8601 timestamp.

string
location
required

Where the parcel was, or null.

string
nullable
note
required

A note from the carrier or the merchant, or null.

string
nullable
images
required

URLs of proof photos attached to the event.

Array<string>
history
required

Shipments that have ended (cancelled, failed or returned), newest first.

Array<object>
object
provider_code
required

Carrier platform that booked the shipment. Always allingo.

string
Allowed values: allingo
mode
required

Whether the booking was made on the carrier’s test or live environment.

string
Allowed values: test live
status
required

Normalized status of the shipment.

string
Allowed values: booked picked_up in_transit out_for_delivery delivered failed returned cancelled
id
required

Shipment ID.

number
provider_status
required

The carrier platform’s own status code.

string
track_id
required

Tracking ID of the shipment on the carrier platform, or null.

string
nullable
partner_track_id
required

Tracking ID issued by the delivery partner, or null until one is attached.

string
nullable
partner_code
required

Code of the delivery partner, such as ghn.

string
partner_name
required

Name of the delivery partner.

string
partner_logo_url
required

Logo URL of the delivery partner, or null.

string
nullable
service_id
required

ID of the carrier service that was booked.

string
service_name
required

Name of the carrier service.

string
track_link
required

Public tracking page on the carrier platform, or null.

string
nullable
partner_track_link
required

Public tracking page of the delivery partner, or null.

string
nullable
cod_amount
required

Amount the courier collects from the recipient; 0 for a prepaid order.

number
fee_total
required

Total carrier fee, or null while it is not known.

number
nullable
booked_at
required

When the shipment was booked, as an ISO 8601 timestamp.

string
cancelled_at
required

When the shipment was cancelled, or null.

string
nullable
cancel_reason
required

Why the shipment was cancelled, or null.

string
nullable
delivered_at
required

When the shipment was delivered, or null.

string
nullable
events
required

Tracking history, newest first.

Array<object>
object
source
required

What recorded the event: a carrier webhook, a manual change or the system.

string
Allowed values: webhook manual system
id
required

Event ID.

number
status
required

Normalized shipment status after this event.

string
status_name
required

The carrier’s name for the status, or null.

string
nullable
occurred_at
required

When the event happened, as an ISO 8601 timestamp.

string
location
required

Where the parcel was, or null.

string
nullable
note
required

A note from the carrier or the merchant, or null.

string
nullable
images
required

URLs of proof photos attached to the event.

Array<string>
draft
required

Booking defaults for the order.

object
cannot_book_reason
required

Why a shipment cannot be booked now, or null when it can.

string
nullable
Allowed values: feature_unavailable not_connected pickup_missing pickup_not_geocoded order_status already_fulfilled active_shipment
freight_payment_method
required

Who pays the carrier fee.

string
Allowed values: cash credit post_paid
can_book
required

Whether a shipment can be booked for the order now.

boolean
pickup
required

The store’s pickup address.

object
contact_name
required

Name of the person at the address.

string
contact_phone
required

Phone number of the person at the address.

string
address_line
required

Street address.

string
dropoff
required

The order’s delivery address.

object
geocode_precision
required

How precisely the address was located: street, ward, or null when it could not be.

string
nullable
Allowed values: street ward
contact_name
required

Name of the person at the address.

string
contact_phone
required

Phone number of the person at the address.

string
address_line
required

Street address.

string
weight_gr
required

Package weight in grams.

number
length_cm
required

Package length in centimetres.

number
width_cm
required

Package width in centimetres.

number
height_cm
required

Package height in centimetres.

number
cod_amount
required

Amount still owed on the order, to collect on delivery; 0 for prepaid.

number
declared_value
required

Declared value of the parcel: the order subtotal.

number
buyer_service_id
required

The carrier service the customer chose at checkout, or null.

string
nullable
buyer_paid_shipping
required

Shipping fee the customer paid on the order.

number

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

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.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}