Tutorial: Track a Shipment

How to track a previously created shipment.

API Version: v2

This tutorial shows how to track a previously created shipment. The getTracking operation provides tracking information for packages shipped with Amazon, including the most recent status and package status history.

Note: This operation only returns a response for packages shipped with Amazon, and is unavailable for Direct Fulfillment shipments. To track Amazon orders shipped with another carrier, please call the respective carrier's tracking API directly. For packages shipped with Amazon, you can retrieve tracking details for up to 45 days after the shipment creation date. After this period, only the last tracking status is returned.

Prerequisites

To complete this tutorial, you will need:

  • Enrollment in an eligible program.
  • A selling-partner account if you are an Amazon seller or are working with an Amazon seller to create and manage shipments.
  • Authorization from the selling-partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.

Step 1. Track a shipment

To get the tracking status and package status history:

Call the getTracking operation for a shipment, passing the following parameters:

Request query parameters

Name Description Required
carrierID A carrier identifier originally returned by the getRates operation for the selected rate.

Type: string

Yes
trackingID A carrier-generated tracking identifier originally returned by the purchaseShipment operation.

Type: string

Yes

Request header parameters

Name Description Required
x-amzn-shipping-business-id Amazon shipping business to assume for this request. The default is AmazonShipping_UK.

Type: enum (X-amzn-shipping-business-id)

No
x-amzn-access-token Amazon shipping request token Yes

Response

A successful response includes the following:

NameDescriptionSchema
payloadThe payload for the getTracking operation.GetTrackingResult

Sample API Request

GET https://sellingpartnerapi-eu.amazon.com/shipping/v2/tracking?carrierId=AMZN_UK&trackingId=1582657452914
x-amzn-shipping-business-id: [x-amzn-shipping-business-id](https://developer-docs.amazon.com/amazon-shipping/docs/frequently-asked-questions#which-x-amzn-shipping-business-id-to-use-as-request-header-while-calling-shipping-v2-api)
x-amz-access-token: Atza|IwEBIGorlXXX

API Response example

{
  "payload": {
    "eventHistory": [
      {
        "eventTime": "2019-03-12T14:04:50Z",
        "eventCode": "ReadyForReceive",
        "location": null
      },
      {
        "eventTime": "2019-04-12T05:23:29Z",
        "eventCode": "PickupDone",
        "location": {
          "stateOrRegion": "Leicestershire",
          "countryCode": "GB",
          "city": "Bardon",
          "postalCode": "LE67 1LD"
        }
      },
      {
        "eventTime": "2019-04-13T16:23:29Z",
        "eventCode": "DeliveryAttempted",
        "location": {
          "stateOrRegion": "Leicestershire",
          "countryCode": "GB",
          "city": "Bardon",
          "postalCode": "LE67 1LD"
        }
      },
      {
        "eventTime": "2019-04-14T16:23:29Z",
        "eventCode": "Delivered",
        "location": {
          "stateOrRegion": "Leicestershire",
          "countryCode": "GB",
          "city": "Bardon",
          "postalCode": "LE67 1LD"
        }
      }
    ],
    "summary": {
      "status": "Delivered"
    },
    "trackingId": "1582657452914",
    "promisedDeliveryDate": "2019-03-13T20:00:00Z"
  }
}

Note: Please find the upcoming announcement for additional information to provide finer level of details about tracking a package Pre-launch announcement for tracking APIs.