Skip to main content

Get Shipment Tracking

Returns the latest tracking status and tracking events for a shipment on an order.

HTTP Request​

  • URL: /orders/shipments/tracking
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_ORDER or READ_WRITE_ORDER

Request Body​

The request body is a JSON object with the order and the tracking number.

FieldTypeRequiredDescription
orderIdStringYesID of the order.
trackingNumberStringYesTracking number to look up.
carrierCodeStringNoCarrier code. Defaults to the carrier of the shipment with this tracking number.

cURL Example​

curl --location '<BASE_URL>/orders/shipments/tracking' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "664f2310d5775459152d6dd8",
"trackingNumber": "1Z999AA10123456784",
"carrierCode": "ups"
}'

Response​

  • 200 OK: The tracking information was returned. Check data.available to see whether tracking was found.
  • 400 Bad Request: The order ID or tracking number is missing or not valid.
  • 404 Not Found: No order exists with this ID.

Sample JSON Response​

{
"success": true,
"data": {
"available": true,
"trackingNumber": "1Z999AA10123456784",
"carrierCode": "ups",
"carrierId": "se-140286",
"status": "IT",
"statusCode": "IT",
"statusDescription": "In Transit",
"estimatedDelivery": "2024-05-28T00:00:00Z",
"actualDelivery": null,
"trackingUrl": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
"source": "customShipping",
"events": [
{
"occurredAt": "2024-05-25T09:41:00Z",
"description": "Departed from facility",
"statusCode": "IT",
"statusDescription": "In Transit",
"cityLocality": "Dallas",
"stateProvince": "TX",
"postalCode": "75261",
"countryCode": "US"
}
],
"error": null
}
}

Response Details​

Tracking Data​

FieldTypeDescription
availableBooleanWhether tracking information was found.
trackingNumberStringTracking number.
carrierCodeStringCarrier code.
carrierIdStringCarrier account ID.
statusStringCurrent status code.
statusCodeStringCurrent status code.
statusDescriptionStringCurrent status in words.
estimatedDeliveryStringEstimated delivery date.
actualDeliveryStringDelivery date, once delivered.
trackingUrlStringCarrier tracking page.
sourceStringShipping integration that provided the data.
eventsArrayTracking events. See Event Object.
errorStringReason tracking is not available, when available is false.

Event Object​

FieldTypeDescription
occurredAtStringDate and time of the event.
descriptionStringEvent description.
statusCodeStringStatus code at this event.
statusDescriptionStringStatus in words.
cityLocalityStringCity.
stateProvinceStringState or province.
postalCodeStringPostal code.
countryCodeStringCountry code.

Notes​

  • When tracking cannot be found, available is false, events is empty and error explains why.
  • Tracking is available for shipments sent through the store's custom shipping integration.