Attributes
| Name | Type | Description |
|---|---|---|
| object | string | Value is “CampaignCode” |
| id | string | The campaign code id is the code the customer uses to redeem the campaign.- Coupon codes: The id would include the merchant specified prefix, merchant specifiedseparator and the random code generated by the system. - Promotion code: The merchant specified promotion code. |
| vid | string | A Globally Unique Identifier (GUID) for this object. Assigned by Subscribe. |
| code_aliases | string | An alternate promotion code that Subscribe accepts to redeem the promotional discount. This is a read-only code that displays the aliases defined in the campaign object. |
| type | enum | The type of the campaign code. - Coupon: allow you to generate multiple unique campaign codes that are used to redeem the special offer. - Promotion: allow you to generate a single campaign code that can be distributed to multiple customers. This one code can be redeemed by multiple customers. |
| campaign | Campaign | The campaign object associated with the code. |
| sequence | integer | The sequential numbering of the coupon codes to show how many coupons were generated. |
| state | enum | The state of the campaign code. Can be:- Not Yet Activated - Activated - Redeemed - Expired - Mark used - Retrieved - Invalidated - Initialized |
| note | string | Reserved for additional info. |
| last_chars | string | The last 4 characters of the campaign code. |
| redemption_count | enum | The number of times the campaign code has been redeemed. |
Example Object
{
"object": "CampaignCode",
"id": "Tasty_4",
"type": "Promotion",
"campaign": {
"object": "Campaign",
"id": "Tasty_2021_0921_02",
"vid": "fadfd6ece9788cb77e318d1774cbd2ec283d05f9"
}
}

