Package Tracking API static sandbox guide
The Package Tracking API supports the Amazon Business API static sandbox. The static sandbox uses pattern matching to return static, mocked responses.
You can use the sandbox environment to securely test your integration with the Package Tracking API before moving to production. By sending requests to the sandbox endpoints instead of production endpoints, you can test standard workflows without triggering real-world events.
Prerequisites
Before calling the Package Tracking API static sandbox, complete the steps in Accessing the Amazon Business API sandbox environment to create a sandbox app and generate a sandbox API access token.
Once you've generated the access token, direct each sandbox call to the appropriate Amazon Business API sandbox endpoint for your region.
Sandbox Scenarios
Use the following sample requests to test the success and error scenarios in the Package Tracking API static sandbox. If you use input parameters other than the sample values below, an error will occur.
Path: GET /ab-tracking/2025-07-02/orders/{orderId}/shipments/{shipmentId}/packages/{packageId}
Scenario: Retrieving tracking details for a delivered package:
GET https://sandbox.na.business-api.amazon.com/ab-tracking/2025-07-02/orders/114-2589187-9801025/shipments/401971789238301/packages/1?region=US&locale=en-US
Response: A successful response returns a 200 status code and detailed tracking information for the package.
Response code: 200
{
"packageTrackingDetails": {
"trackingStatus": "DELIVERED",
"localizedDeliveryPromise": "Delivered April 29",
"deliveryWindow": {
"endDate": "2025-04-29T19:15:23Z"
},
"carrierDetails": {
"localizedCarrierName": "Delivery by Amazon",
"carrierTrackingId": "TBA321021468276"
},
"packageTrackingEvents": [
{
"localizedDescription": "Package delivered near the front door or porch.",
"localizedEventDate": "Tuesday, April 29",
"localizedEventTime": "12:15 PM",
"location": {
"city": "Bellevue",
"country": "US"
}
},
{
"localizedDescription": "Package is out for delivery.",
"localizedEventDate": "Tuesday, April 29",
"localizedEventTime": "10:50 AM",
"location": {
"city": "Kent",
"country": "US"
}
},
{
"localizedDescription": "Package being processed at carrier facility.",
"localizedEventDate": "Tuesday, April 29",
"localizedEventTime": "6:39 AM",
"location": {
"city": "Kent",
"country": "US"
}
},
{
"localizedDescription": "Package arrived at a carrier facility.",
"localizedEventDate": "Tuesday, April 29",
"localizedEventTime": "6:34 AM",
"location": {
"city": "Kent",
"country": "US"
}
},
{
"localizedDescription": "Package left the shipper facility.",
"localizedEventDate": "Tuesday, April 29"
}
],
"packageMilestones": [
{
"milestoneType": "DELIVERED",
"milestoneWindow": {
"endDate": "2025-04-29T12:15:23.101-07:00"
}
},
{
"milestoneType": "OUT_FOR_DELIVERY",
"milestoneWindow": {
"endDate": "2025-04-29T00:00:00-07:00"
}
},
{
"milestoneType": "SHIPPED",
"milestoneWindow": {
"endDate": "2025-04-29T05:27:59-07:00"
}
},
{
"milestoneType": "ORDERED",
"milestoneWindow": {
"endDate": "2025-04-28T23:06:38-07:00"
}
}
]
}
}
Scenario: Calling Package Tracking API to retrieve package details without required orderId, shipmentId and packageId parameters.
GET https://sandbox.na.business-api.amazon.com/ab-tracking/2025-07-02/orders//shipments//packages/
Response: Returns a 400 status code indicating invalid or missing parameters.
Response code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameters are missing: orderId, shipmentId, packageId.",
"details": "Please provide the required parameters (orderId, shipmentId, packageId) in the request."
}
]
}
Updated about 11 hours ago