Documentation menu

generateCoupons: generate coupons for specified value and count

This method is available only for our resellers. To become a reseller, register your website in our Resellers Center.

Method generates one or more coupons for specified amount.

Address: https://api.anti-captcha.com/generateCoupons
Method: POST
Content-type: application-json

Request properties

Property Type Required Purpose
clientKey String Yes
count Integer Yes Number of coupons to generate.
amount Double Yes USD amount for each coupon.
purchaseLink String Yes Web address where customers can buy this coupon.
isVerifiedOnly Boolean No Generate coupons for activation by verified customers only.

Request example

CURL
          curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "count":2,
    "amount":10,
    "purchaseLink":"https://myshop.com/anticaptcha_coupons/coupon10bucks"
}' https://api.anti-captcha.com/generateCoupons
        


Response structure

Property Type Purpose
errorId Integer Error identifier.
0 - no errors, operation completed successfully.
>1 - error identifier. Error code and short description transferred in errorCode and errorDescription properties.
errorCode String
errorDescription String Short description of the error
coupons Array List of generated coupons.

Response example

JSON with no errors
          {
    "errorId":0,
    "coupons":["CBKL-FP9Q-9MDV-L4NC-VWEF","DYRY-ESR8-YND3-G7D3-TS3T"]
}
        
JSON with an error
          {
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"
}