> For the complete documentation index, see [llms.txt](https://integrations.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.impact.com/brand-api-reference/advocate-api-reference-v1/reference/referral-code-overview/models.md).

# Models

## The RewardTemplate object

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Referral Code","version":"1.0.0"},"components":{"schemas":{"RewardTemplate":{"description":"Details of the reward that could be earned, but is not yet earned.","type":"object","properties":{"type":{"type":"string","description":"The type of reward.","enum":["PCT_DISCOUNT","FUELTANK","CREDIT","INTEGRATION"]},"unit":{"type":"string","description":"An identifier for the unit of the reward. For example `CENTS`, `freemb`, `freemonth`. Only present for `CREDIT` rewards."},"credit":{"type":"integer","description":"The amount of credit this referral code is valid for. For example, for $20 this would be `credit=2000`, `unit=\"CENTS\"`. Only works with `CREDIT`."},"discountPercent":{"type":"integer","description":"The percent discount the referral code is valid for. For example, `10` for `10%`. Only works with `PCT_DISCOUNT`."},"monthsDiscountIsValid":{"type":"integer","description":"The number of months the discount is valid for. Only works with `PCT_DISCOUNT`."},"valueInCents":{"type":"integer","description":"The value of the reward in cents. Works with `INTEGRATION`."},"rewardDetails":{"type":"string","description":"JSON object containing details about the reward. Works with `INTEGRATION`."}}}}}}
```

## The ClassicRewardTemplate object

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Referral Code","version":"1.0.0"},"components":{"schemas":{"ClassicRewardTemplate":{"description":"<span class=\"label\">Classic Only</span> Details of the reward that could be earned, but is not yet earned.","allOf":[{"$ref":"#/components/schemas/RewardTemplate"}]},"RewardTemplate":{"description":"Details of the reward that could be earned, but is not yet earned.","type":"object","properties":{"type":{"type":"string","description":"The type of reward.","enum":["PCT_DISCOUNT","FUELTANK","CREDIT","INTEGRATION"]},"unit":{"type":"string","description":"An identifier for the unit of the reward. For example `CENTS`, `freemb`, `freemonth`. Only present for `CREDIT` rewards."},"credit":{"type":"integer","description":"The amount of credit this referral code is valid for. For example, for $20 this would be `credit=2000`, `unit=\"CENTS\"`. Only works with `CREDIT`."},"discountPercent":{"type":"integer","description":"The percent discount the referral code is valid for. For example, `10` for `10%`. Only works with `PCT_DISCOUNT`."},"monthsDiscountIsValid":{"type":"integer","description":"The number of months the discount is valid for. Only works with `PCT_DISCOUNT`."},"valueInCents":{"type":"integer","description":"The value of the reward in cents. Works with `INTEGRATION`."},"rewardDetails":{"type":"string","description":"JSON object containing details about the reward. Works with `INTEGRATION`."}}}}}}
```

## The Code object

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Referral Code","version":"1.0.0"},"components":{"schemas":{"Code":{"description":"A referral code, the referrer it belongs to, and details of the reward it unlocks.","type":"object","properties":{"code":{"type":"string","description":"The unique identifier for the code. For example `BOBTESTERSON`."},"dateCreated":{"type":"integer","format":"int64","description":"Unix timestamp (milliseconds) when the code was created."},"programId":{"type":"string","nullable":true,"description":"The ID of the program that the code belongs to. Null if not associated with a specific program."},"referrerName":{"type":"string","description":"The display name of the owner of this code. For example `Bob Testerson`."},"reward":{"$ref":"#/components/schemas/RewardTemplate"}}},"RewardTemplate":{"description":"Details of the reward that could be earned, but is not yet earned.","type":"object","properties":{"type":{"type":"string","description":"The type of reward.","enum":["PCT_DISCOUNT","FUELTANK","CREDIT","INTEGRATION"]},"unit":{"type":"string","description":"An identifier for the unit of the reward. For example `CENTS`, `freemb`, `freemonth`. Only present for `CREDIT` rewards."},"credit":{"type":"integer","description":"The amount of credit this referral code is valid for. For example, for $20 this would be `credit=2000`, `unit=\"CENTS\"`. Only works with `CREDIT`."},"discountPercent":{"type":"integer","description":"The percent discount the referral code is valid for. For example, `10` for `10%`. Only works with `PCT_DISCOUNT`."},"monthsDiscountIsValid":{"type":"integer","description":"The number of months the discount is valid for. Only works with `PCT_DISCOUNT`."},"valueInCents":{"type":"integer","description":"The value of the reward in cents. Works with `INTEGRATION`."},"rewardDetails":{"type":"string","description":"JSON object containing details about the reward. Works with `INTEGRATION`."}}}}}}
```

## The CodeClassicReward object

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Referral Code","version":"1.0.0"},"components":{"schemas":{"CodeClassicReward":{"description":"A referral code, the referrer it belongs to, and details of the reward it unlocks (Classic reward format).","type":"object","properties":{"code":{"type":"string","description":"The unique identifier for the code. For example `BOBTESTERSON`."},"dateCreated":{"type":"integer","format":"int64","description":"Unix timestamp (milliseconds) when the code was created."},"programId":{"type":"string","nullable":true,"description":"The ID of the program that the code belongs to. Null if not associated with a specific program."},"referrerName":{"type":"string","description":"The display name of the owner of this code. For example `Bob Testerson`."},"reward":{"$ref":"#/components/schemas/ClassicRewardTemplate"}}},"ClassicRewardTemplate":{"description":"<span class=\"label\">Classic Only</span> Details of the reward that could be earned, but is not yet earned.","allOf":[{"$ref":"#/components/schemas/RewardTemplate"}]},"RewardTemplate":{"description":"Details of the reward that could be earned, but is not yet earned.","type":"object","properties":{"type":{"type":"string","description":"The type of reward.","enum":["PCT_DISCOUNT","FUELTANK","CREDIT","INTEGRATION"]},"unit":{"type":"string","description":"An identifier for the unit of the reward. For example `CENTS`, `freemb`, `freemonth`. Only present for `CREDIT` rewards."},"credit":{"type":"integer","description":"The amount of credit this referral code is valid for. For example, for $20 this would be `credit=2000`, `unit=\"CENTS\"`. Only works with `CREDIT`."},"discountPercent":{"type":"integer","description":"The percent discount the referral code is valid for. For example, `10` for `10%`. Only works with `PCT_DISCOUNT`."},"monthsDiscountIsValid":{"type":"integer","description":"The number of months the discount is valid for. Only works with `PCT_DISCOUNT`."},"valueInCents":{"type":"integer","description":"The value of the reward in cents. Works with `INTEGRATION`."},"rewardDetails":{"type":"string","description":"JSON object containing details about the reward. Works with `INTEGRATION`."}}}}}}
```

## The Error object

```json
{"openapi":"3.1.0","info":{"title":"impact.com API - Referral Code","version":"1.0.0"},"components":{"schemas":{"Error":{"properties":{"statusCode":{"description":"The HTTP status code of the error.","type":"integer","format":"int32"},"message":{"description":"The human-readable description of what went wrong. Use this to help you debug.","type":"string"},"apiErrorCode":{"description":"A machine-readable error code.","type":"string"},"rsCode":{"description":"A secondary machine-readable error code.","type":"string"}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.impact.com/brand-api-reference/advocate-api-reference-v1/reference/referral-code-overview/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
