Supported task types
API methods
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.

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 -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{

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
JSON with an error
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"