> For the complete documentation index, see [llms.txt](https://developers.rewardful.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.rewardful.com/rest-api/affiliate-coupons/the-affiliate-coupon-object.md).

# The affiliate coupon object

```json
{
   "id": "75434e84-255b-4314-a278-820df5e76813",
   "external_id": "promo_1a2b3c",
   "token": "CODE",
   "leads": 0,
   "conversions": 0,
   "affiliate_id": "95d48f70-f1d4-42d9-b929-21996b6d9eb4"
}
```

## Attributes

| Name           | Data type  | Description                                                                                                                                 |
| -------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`           | `string`   | Unique identifier for this affiliate coupon.                                                                                                |
| `external_id`  | `string`   | The technical ID of the coupon on the payment processor (e.g. Stripe). Automatically set by Rewardful when the affiliate coupon is created. |
| `archived`     | `boolean`  | Indicates whether the coupon code has been deactivated                                                                                      |
| `archived_at`  | `datetime` | When was the coupon code deactivated                                                                                                        |
| `token`        | `string`   | The unique coupon code for this affiliate coupon.                                                                                           |
| `leads`        | `string`   | The number of leads attributed to this coupon.                                                                                              |
| `conversions`  | `string`   | The number of conversions attributed to this coupon.                                                                                        |
| `affiliate_id` | `string`   | The ID of the affiliate this link belongs to.                                                                                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.rewardful.com/rest-api/affiliate-coupons/the-affiliate-coupon-object.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
