Skip to main content

Verify 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 verify offer code API to verify if the offer code is valid or not. The Benefit ID to be passed as part of the request will be provided by Amazon Prime team during the onboarding process.

Verify Offer Code API Request

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

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 verified

HTTP Headers

All conventional request headers for Prime APIs that need to be passed to Verify 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.

Sample API Request

The following details give a view of how a sample request has to be passed to Prime Verify 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 GET

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

Verify Offer Code API Response

1. Success

When a call to the verify 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.