> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CouponCode Object

Created by Subscribe in response to a Generate Coupon Codes request, this object stores the randomly generated string Codes for the Coupon Campaign.

Each coupon code may be redeemed a fixed number of times. When a coupon code is applied to multiple `AutoBillItems` within a single AutoBill, or multiple transaction items on a single Transaction, it will count as a single Redemption. If a Coupon Code is applied to multiple AutoBills, or multiple Transactions, it will count as multiple redemptions. (Applying a Coupon Code to a single AutoBill at multiple points in time will also count as multiple redemptions.)

For more information on generating Coupon Codes, see Working with Campaigns in the Subscribe Programming Guide.

| Data Members | Data Type | Description |
| - | - | - |
| `campaignId` | string | **Read only.** A unique identifier for the `Campaign` object. |
| `code` | string | The Coupon value, which consists of \`\`\<separator (if defined)>\<randomly generated string>. This field is available only when creating the `Coupon`. When retrieving the `CouponCode` object, this field will always be returned blank. |
| `note` | string | An optional memo regarding the `CouponCode`. |
| `redeemedBy` | `CouponRedeemedBy` | An array of `CouponRedeemedBy` objects, which lists the Account and date on which the Coupon was redeemed. Fields include: - `merchantAccountId` (string) - `accountVID` (string) - `date` (dateTime) |
| `sequence` | int | A unique number for each Coupon Code generated, starting with 1. |
| `state` | `CouponCodeState` | The state of the Coupon Code: - `Not Yet Activated` - `Activated` - `Redeemed` - `Expired` - `Marked Used` - `Retrieved` - `Invalidated` - `Initialized` |
| `VID` | string | Vindicia's Globally Unique Identifier (GUID) for this object. When creating a new `CouponCode` object, leave this field blank; it will be automatically populated by Subscribe. |
| **Parent topic:**[Campaign Related Object](../topics/Campaign_Related_Object) | | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.