PACKAGE_DELIVERY_IN_TRANSIT

📘

Buy with Prime API is now available for early access

Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.

The PACKAGE_DELIVERY_IN_TRANSIT event is published when one or more items in the specified order were shipped. Typically, this event is published when the item(s) are being delivered to the recipient's address.

For details on the schema and fields of an event, see Subscribe to Events.

The following examples are ways that you might use this event:

  • To enable customers to see on various touchpoints (for example, merchant order history, Amazon order history, Buy with Prime order details) that their item has been shipped. This helps customers be confident that the delivery estimate will be met.
  • To enable customer service agents to see that an item has shipped, so that they can give the customer updated information if the customer reaches out by phone or email.
  • To enable developers to write code to signal the order management system when to collect payment from the customer. Payment can only be collected when the item has shipped.
  • To enable supply chain managers to see when items are fulfilled, so that they can evaluate the performance of their logistics network to make more informed decisions about where to improve.

Required permission

To subscribe to this event, your API credentials must have at least Read Order permission. You choose permissions when you generate your API credentials. For details, see Authenticate to the Buy with Prime API.

Handling the event

When you receive this event, you typically query the order to fetch the delivery information for all line items in the order. Take the following steps:

  1. Parse the resources array of the event to get the order ID and delivery ID.
  2. Using the order ID that you found in the resources array in the previous step, make an API call to the order query. For examples of how to perform this query, see Query a Buy with Prime Order.
  3. In the response, navigate to the lineItems.packageInformation.details array and find the element with the ID that you found in the resources array of the event in step 1. There, you will find the details of delivery and a set of products delivered together to the customer. Several lines items can have the same delivery ID.
    Note: Depending on the moment that you call the Buy with Prime API with respect to delivery progress, the value of the state attribute in the delivery details is either IN_TRANSIT, CANCELLED, or DELIVERED. For more information, see PACKAGE_DELIVERY_CANCELLED and PACKAGE_DELIVERED.

Related topics