BUYABILITY_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 BUYABILITY_CHANGED
event is published when an item that was previously eligible for Buy with Prime is no longer eligible for Buy with Prime, or vice versa.
Required permission
To subscribe to this event, your API credentials must have at least Read Buyability permission. You choose permissions when you generate your API credentials. For details, see Authenticate to the Buy with Prime API.
Schema
Schema for webhook destinations
{
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "BUYABILITY_CHANGED",
"resources": [
"businessProduct/business-product-id/items/item-id"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {
"product": {
"externalId": {
"value": "example-external-id"
},
"id": "example-product-id",
"amazonSku": {
"value": "example-amazon-sku"
},
"sku": {
"value": "example-sku"
},
"buyability": {
"status": "BUYABLE"
}
}
},
}
Schema for Amazon EventBridge destinations
{
"version": "0",
"id": "example-event-id",
"detail-type": "BUYABILITY_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/business-product-id/items/item-id"
],
"detail": {
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "BUYABILITY_CHANGED",
"resources": [
"businessProduct/business-product-id/items/item-id"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {
"product": {
"externalId": {
"value": "example-external-id"
},
"id": "example-product-id",
"amazonSku": {
"value": "example-amazon-sku"
},
"sku": {
"value": "example-sku"
},
"buyability": {
"status": "BUYABLE"
}
}
}
}
}
Schema for Amazon EventBridge destinations (Deprecated)
{
"version": "0",
"id": "example-event-id",
"detail-type": "BUYABILITY_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/business-product-id/items/item-id"
],
"detail": {}
}
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 BUYABILITY_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. The BUYABILITY_CHANGED event's data payload contains the item's associated product object. |
Handling the event
When you receive this event, parse the included product
information in the data
object to find the buyability
of the item.
If you require information not found in the data
object, query the product
using the item ID found in the resources
array.
Troubleshoot errors
In some cases, you might receive a BUYABILITY_CHANGED
event with an empty data
object. A missing data
object occurs when the item's productId
is missing or not valid. If you use the product
query and the queried item's productId
is missing or not valid, you receive a ResourceNotFoundException
error. After receiving an event with empty data or an error response to a product
query, allow time for the system to update and then retry the query to verify that the productId
remains not valid.
Related topics
Updated 14 days ago