PACKAGE_TRACKER_MILESTONE_CHANGED
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_TRACKER_MILESTONE_CHANGED
event is published when a milestone of a Buy with Prime tracking number is updated. A milestone represents an event that occurs during the delivery process for the associated tracking number.
The following examples are ways that you might use this event:
- To enable customers to see on various touch points (for example, merchant order history, Amazon order history, Buy with Prime order details) that package tracking information has been updated.
- To enable developers to write code to signal the internal notification system to send notifications to customers upon package tracking milestone updates.
- To enable customer service agents to see that package tracking information was updated 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 to build a timeline view of all the events occurred for the package.
Required permission
To subscribe to this event, your API credentials must have at least View Package Tracker Data permission. You choose permissions when you generate your API credentials.
Schema
Schema for webhook destinations
{
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "PACKAGE_TRACKER_MILESTONE_CHANGED",
"resources": [
"businessProduct/businessProductId/carrier/carrierCode/tracker/trackingNumber"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {}
}
Schema for Amazon EventBridge destinations
{
"version": "0",
"id": "example-event-id",
"detail-type": "PACKAGE_TRACKER_MILESTONE_CHANGED",
"source": "aws.partner/buywithprime/partner-event-source-name",
"account": "example-aws-account-id",
"time": "2025-01-20T12:34:56Z",
"region": "us-east-1",
"resources": [
"businessProduct/businessProductId/carrier/carrierCode/tracker/trackingNumber"
],
"detail": {
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "PACKAGE_TRACKER_MILESTONE_CHANGED",
"resources": [
"businessProduct/businessProductId/carrier/carrierCode/tracker/trackingNumber"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {}
}
}
Fields
Key | Data type | Description |
---|---|---|
version | String | Amazon EventBridge event version. |
id | String | Amazon EventBridge-generated UUID for an event. |
detail-type | String | Type schema for the detail of the event, which in this case is PACKAGE_TRACKER_MILESTONE_CHANGED . |
source | String | Name of the partner event source in Amazon EventBridge. For details, see Subscribe to Events. |
account | String | AWS account ID that hosts the partner event source. |
time | String | ISO 8601 timestamp that indicates when the event was published. |
region | String | AWS region from which the event is published. |
resources | Array of strings | Array of identifiers for the resources that triggered the event, in key-value pair format. Each resource identifier is a string that starts with businessProduct/{businessProductId}/ , followed by resource types (keys) and resource IDs (values) separated by slashes. For details about how to interpret resources , see Subscribe to Events. |
detail | Object | JSON object that contains details about the event. For details, see detail fields. |
Detail fields
Key | Data type | Description |
---|---|---|
idempotencyKey | String | Unique identifier to detect duplicate events. |
eventDescriptor | String | Event type that determines the default query. |
resources | Array of strings | Array of identifiers for the resources that triggered the event, in key-value pair format. Each resource identifier is a string that starts with businessProduct/{businessProductId}/ , followed by resource types (keys) and resource IDs (values) separated by slashes. This field is the same value as resources at the top level. |
eventId | String | Unique identifier for this event. This field is the same value as id at the top level. |
apiVersion | String | Buy with Prime API version associated with this event. |
subscriptionId | String | Unique identifier for an event subscription. |
eventTime | String | ISO 8601 timestamp that indicates when the event was published. This field is the same value as time at the top level. |
data | Object | JSON object that can contain API response data. |
Handling the event
When you receive a PACKAGE_TRACKER_MILESTONE_CHANGED
event, take the following steps:
- Parse the resources array of the event to get the tracking number and carrier code.
- Use the tracking number and carrier code from the resources array to Track the Package.
Related topics
Updated about 10 hours ago