Offers API
This API is triggered by the offers system to verify the unique ID in the offers URL for coupon access. When the URL loads, an API call is made to the affiliate callback URL to validate the ID. The response’s “data” parameter provides transaction details, including the customer’s name (displayed on the offers page) and the amount, which determines the number of coupons shown:
-
Amount > 2000: 8 coupons.
-
2000 > Amount > 1000: 4 coupons.
-
1000 > Amount > 500: 2 coupons.
Otherwise, show the default token count.
If “expiryday” is present, use it as the expiry period; otherwise, use the standard expiry from affiliate data. Expiry day will be considered from the day of transaction datetime. The URL’s accessibility period is set during affiliate onboarding.
https://offers.airpay.co.in/app/<affiliatecode>/<uniqueid>Header
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| Content-Type required | String | application/json | |
| checksum required | Text ( 64) | Checksum value(length 64) hash(‘sha256’,<affiliateid+airpaykey+allvalues>); | 91f5evhk72f5 |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| affiliateid required | String (10) | affilate identification code | 91fc5evhk7 |
| uniqueid required | String | unique id entered in url in base64 format(max length 10) (required) |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| status required | Number | Sattus Code(400- fail,200-success)(required)(length 3) | |
| message required | String | Status Message(success,fail)(required) | |
| data required | json | Response data(required) Example: { “transactiontime”:“Y:m:d H:i:s”,“customer”:“ravi dubey”,“amount”:“1000.00”,“expiryday”:“4”, } | |
| checksum required | String | Checksum value(required)(length 64) hash(‘sha256’,<affiliateid+airpaykey+allvalues>); |
Request Example
Section titled “Request Example” curl --location --request POST '{{Affiliate Verification Url}}' \ --header 'Content-Type: application/json' \ --header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \ --data-raw '{ "affiliateid":"91fc5evhk7","uniqueid":"30912508233b7r37562g2hps" }'Success Response
Section titled “Success Response”{ "status": 200, "message": "success", "data": { "transactiontime": "2021-04-18 00:00:00", "customer": "ravi dubey", "amount": "1000.00", "expiry": "72" }, "checksum": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"}