Overview

Reward Code Validation API

What is this API for?

The Reward Code Validation API serves as an endpoint dedicated to validate a reward code (commonly referred to as a coupon) intended for a specific promotion.

API Details

Endpoint URL: https://api.aklamio.com/api/v1/reward_code/validate
Method: POST
Header: Api-Secret

Authentication

This endpoint needs an additional header with the request: Api-Secret. This header key is used to validate the brand and promotion used in payload. Ask your Aklamio Customer Success Manager or Integration Manager for your brand's API Secret Key.

Request Parameters

Field name
Description
Type
Mode
partnerId
Promotion UID: Identifies your program within Aklamio.
string
required provided by Aklamio
code
Reward code (coupon)
string
required

Sample Responses

Response sample: Success (default)

            {
    "message": "success"
}
          

Response sample: Invalid

            {{
    "errors": [
        "Invalid or expired coupon code"
    ]
}
          

Response sample: Error

            Status Code: 401
{
  "error": "unauthorized"
}
          
            Status Code: 404
{
  "error": "unknown"
}
          

Code examples

Code examples

Code copied!

            curl --location 'https://api.aklamio.com/api/v1/reward_code/validate' \
--header 'API_SECRET: a8c45e104xxc90cdxx0ff00ec379e7' \
--form 'partnerID="188f24dafa9ccfb259d96a1033798f0e"' \
--form 'code="IKDIZJPC"'