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:
- Parse the
resources
array of the event to get the order ID and delivery ID. - Using the order ID that you found in the
resources
array in the previous step, make an API call to theorder
query. For examples of how to perform this query, see Query a Buy with Prime Order. - In the response, navigate to the
lineItems.packageInformation.details
array and find the element with the ID that you found in theresources
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 thestate
attribute in the delivery details is eitherIN_TRANSIT
,CANCELLED
, orDELIVERED
. For more information, seePACKAGE_DELIVERY_CANCELLED
andPACKAGE_DELIVERED
.
Related topics
Updated 2 days ago