RETURN_COMPLETED
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 RETURN_COMPLETED
event is published when a return that was initiated earlier was successfully completed.
The following examples are ways that you might use this event:
- To enable shoppers to see that their returned items were received, so that they don't have to worry about whether they can receive their refund.
- To enable customer service representatives to see that a shopper is eligible for a refund, so that they can give the shopper accurate information if the shopper reaches out by phone or email.
- To enable developers to update their order management system and all of the downstream systems. Examples of downstream systems are analytics and reporting on business performance, accounting for remitting taxes, customer service representatives helping shoppers who reach out, and so on.
- To enable e-commerce managers to be confident that their shopper experience meets their high bar, so that they don't have to worry that some shoppers aren't able to return the items.
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.
Schema
Schema for webhook destinations
{
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "RETURN_COMPLETED",
"resources": [
"businessProduct/business-product-id/order/order-id/return/return-id"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {
"order": {
"id": "example-order-id",
"aliases": [
{
"aliasId": "example-order-alias-id",
"aliasType": "example-order-alias-type"
}
],
"returns": {
"details": [
{
"id": "example-return-id",
"createdAt": "example-created-at-datetime-string",
"updatedAt": "example-updated-at-datetime-string",
"state": "COMPLETED",
"returnPackageDetails": [
{
"id": "example-return-package-details-id",
"state": "example-return-package-details-state",
"packageTracker": {
"packageTrackerIdentifier": {
"trackingNumber": "example-package-tracker-tracking-number",
"carrierCode": "example-packager-tracker-carrier-code"
},
"latestMilestone": {
"status": {
"code": "example-package-milestone-status-code",
"message": {
"locale": "example-package-milestone-status-message-locale",
"value": "example-package-milestone-status-message-value"
}
},
"occurredAt": "2025-03-28T19:11:14.755Z"
},
"trackingUrl": null
}
}
],
"returnLineItems": [
{
"id": "example-return-line-item-id",
"grading": {
"summary": {
"gradedAmount": {
"value": 1
},
"unitWiseCondition": [
{
"amount": {
"value": 1
},
"condition": "example-graded-condition"
}
]
}
},
"returnReason": {
"reasonCode": "example-return-reason-code",
"description": {
"locale": "example-return-reason-description-locale",
"value": "example-return-reason-description-value"
}
},
"lineItem": null
}
]
}
]
}
}
},
}
Schema for Amazon EventBridge destinations
{
"version": "0",
"id": "example-event-id",
"detail-type": "RETURN_COMPLETED",
"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/order/order-id/return/return-id"
],
"detail": {
"idempotencyKey":"example-idempotency-key",
"eventDescriptor": "RETURN_COMPLETED",
"resources": [
"businessProduct/business-product-id/order/order-id/return/return-id"
],
"eventId":"example-event-id",
"apiVersion": "2024-11-01",
"subscriptionId": "example-subscription-id",
"eventTime":"2025-01-20T12:34:56Z",
"data": {
"order": {
"id": "example-order-id",
"aliases": [
{
"aliasId": "example-order-alias-id",
"aliasType": "example-order-alias-type"
}
],
"returns": {
"details": [
{
"id": "example-return-id",
"createdAt": "example-created-at-datetime-string",
"updatedAt": "example-updated-at-datetime-string",
"state": "COMPLETED",
"returnPackageDetails": [
{
"id": "example-return-package-details-id",
"state": "example-return-package-details-state",
"packageTracker": {
"packageTrackerIdentifier": {
"trackingNumber": "example-package-tracker-tracking-number",
"carrierCode": "example-packager-tracker-carrier-code"
},
"latestMilestone": {
"status": {
"code": "example-package-milestone-status-code",
"message": {
"locale": "example-package-milestone-status-message-locale",
"value": "example-package-milestone-status-message-value"
}
},
"occurredAt": "2025-03-28T19:11:14.755Z"
},
"trackingUrl": null
}
}
],
"returnLineItems": [
{
"id": "example-return-line-item-id",
"grading": {
"summary": {
"gradedAmount": {
"value": 1
},
"unitWiseCondition": [
{
"amount": {
"value": 1
},
"condition": "example-graded-condition"
}
]
}
},
"returnReason": {
"reasonCode": "example-return-reason-code",
"description": {
"locale": "example-return-reason-description-locale",
"value": "example-return-reason-description-value"
}
},
"lineItem": null
}
]
}
]
}
}
},
}
}
Schema for Amazon EventBridge destinations (Deprecated)
{
"version": "0",
"id": "example-event-id",
"detail-type": "RETURN_COMPLETED",
"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/order/order-id/return/return-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 RETURN_COMPLETED . |
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. You can call the Buy with Prime API to find further information about the resource(s) specified in the resources array. 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 RETURN_COMPLETED event's data payload contains the package's associated order object. |
Handling the event
When you receive this event, you typically parse the included order
information found in the data
object to fetch information about which products the shopper returned. For details, see Steps to Process Returns.
If you require information not found in the data
object, query the order
using the order ID found in the resources
array.
Related topics
Updated 1 day ago