> ## 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.

# The Campaign Codes Object

The Campaign Codes object provides information about the campaign codes for both coupon and promotion codes.

## 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 specified**separator** 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](Campaigns) | 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"
    }
}
```

**Parent topic:**[Campaign Codes](../topics/Campaign_Codes)


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