Skip to main content

Redeem Offer Code API

Customer will share the offer code (barcode or numeric code) with the 3P as discussed in the onboarding section. 3P clients will make a call to Prime’s redeem offer code API to mark the offer code as redeemed. The redeem call does the required verification before marking the offer code as redeemed The Benefit ID to be passed as part of the request will be provided by Amazon Prime team during the onboarding process.

Redeem Offer Code API Request

POST https://prime-apis.amazon.com/v1/customer/benefit/{benefit-id}/offer-code/{offer-code}/redeem

Request Parameters

Parameter NameData typeDescription
benefit-idstringbenefit-id that Prime provides during the time of client onboarding based on the deal construct.
offer-codestringoffer code shared by customer which needs to be redeemed

HTTP Headers

All conventional request headers for Prime APIs that need to be passed to Redeem Offer Code API, are highlighted in detail here.

Additionally client can also pass: x-amz-time-zone (Optional) TimeZone from where request is being made : required only if client has requirement to provide offer on specific day of week It takes the string in Time Zone format for example: "UTC", "America/Los_Angeles", "Asia/Kolkata" etc.

x-amz-offer-code-redemption-time (Optional) Required only for failure scenarios where client can pass the redemption time when they were able to successfully verify but couldn't redeem it. Client can pass the time stamp of the successful verify call to redeem at a later point of time. The date is specified in UTC time zone. The format is YYYYMMDD'T'HHMM'Z'.

Sample API Request

The following details give a view of how a sample request has to be passed to Prime Redeem Offer Code API in the US marketplace.

curl -i

-H "Authorization: AWS4-HMAC-SHA256 Credential=A*************F/20210504/us-east-1/execute-
api/aws4_request, SignedHeaders=x-amz-marketplace;host;x-amz-date,
Signature=9160882a20351d49ae497e7a37367c6165c62ec5060f7361050f43ec064410bc"

-H "x-amz-date: 20210504T201012Z"

-H "x-amz-marketplace: US"

-H "x-amz-request-id: 1234"

-H "Host: prime-apis.amazon.com"

-X POST

'https://prime-apis.amazon.com/v1/customer/benefit/PRIME_3P_PARTNER_BENEFIT/offer-code/123456789/redeem'

Redeem Offer Code API Response

1. Success

When a call to the redeem offer code API is successful, clients will get one of the responses below:

HTTP status code : 200
{
"message" : "SUCCESS"
}

Below is the another sample success response when offer code is invalid or expired.

HTTP status code : 200
{
"message" : "INVALID_OFFER_CODE"
}

Below is the another sample success response when customer has exceeded the allowed usage limit of the offer in the defined time period.

HTTP status code : 200
{
"message" : "FAILURE:DENIED:EXCEEDED_USAGE_LIMIT"
}

Below is the another sample success response when deal is inactive on that particular day of week

HTTP status code : 200
{
"message" : "FAILURE:DENIED:DEAL_INACTIVE"
}

2. Failure

Response when there is error:

Http Status Code: <code>
Body:
{
"error":{
"code": "<code>",
"message": "<message>"
}
}

Error codes are highlighted in detail here.