Skip to main content
POST
Generate Incremental Coupon Codes

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

campaign
string
required

The id or the vid of the associated coupon campaign

Query Parameters

number_of_codes
integer
required

The number of incremental codes required . Maximal number of codes allowed is 100.

Response

JSON - A list array with a data property that contains an array of up to limit campaign codes. Each entry in the array is a full campaign code object.
Also: "total_count": Integer count of the number of Campaigns objects in the returned list.

object
string
required

Value is "CampaignCode"

id
string
required

Primary redemption string (either a Promotion code or a Coupon code) used for redeeming CampaignCoode

vid
string

A Globally Unique Identifier (GUID) for this object. Assigned by CashBox

Maximum string length: 128
code_aliases
string

An array of alternative redemption codes specified on a Promotion Campaign

type
enum<string>

Type of Campaign associated with this CampaignCode

Available options:
Promotion,
Campaign
campaign
object

Campaign associated with the CampaignCode

sequence
integer

Unique sequence number for the CampaignCode in the parent code set.

state
enum<string>

State of the CampaignCode

Available options:
Not Yet Activated,
Activated,
Redeemed,
Expired,
Marked Used,
Retrieved,
Invalidated,
Initialized
last_chars
string

Last characters (typically 4) of the CampaignCode

redemption_count
integer

Number of times the (Coupon) CampaignCode has been redeemed

Example:

"{ \"object\": \"List\", \"data\": [ { \"object\": \"CampaignCode\", \"id\": \"-FC97CD6GM3K8JJDX\", \"vid\": \"3bbb0df7e8755b634460ce51190441dc618a1eee\", \"type\": \"Coupon\", \"state\": \"Not Yet Activated\", \"last_chars\": \"JJDX\", \"redemption_count\": 0 }, { \"object\": \"CampaignCode\", \"id\": \"-GHXWNKK4K3GEY7PW\", \"vid\": \"4e83681335c64b380681302ab002f40aee060504\", \"type\": \"Coupon\", \"state\": \"Not Yet Activated\", \"last_chars\": \"Y7PW\", \"redemption_count\": 0 }, { \"object\": \"CampaignCode\", \"id\": \"-FM4PUVCJGX5NUG7N\", \"vid\": \"9d512e1578039e25b4ae187d06d57e72d69600f6\", \"type\": \"Coupon\", \"state\": \"Not Yet Activated\", \"last_chars\": \"UG7N\", \"redemption_count\": 0 }, { \"object\": \"CampaignCode\", \"id\": \"-UVCEMUMXJNSU6YUV\", \"vid\": \"a6ba3886dbd15c4f5e4e49a1e890efbdfe5fda67\", \"type\": \"Coupon\", \"state\": \"Not Yet Activated\", \"last_chars\": \"6YUV\", \"redemption_count\": 0 }, { \"object\": \"CampaignCode\", \"id\": \"-3AKHBAFSDTAPJHN7\", \"vid\": \"aaca8c9c5b893e40c13c80f5dde8232745568b39\", \"type\": \"Coupon\", \"state\": \"Not Yet Activated\", \"last_chars\": \"JHN7\", \"redemption_count\": 0 } ], \"total_count\": 5 }"