# 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: 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://integrations.impact.com/brand-api-reference/advocate-api-reference-v1/reference/referral-code-overview/models.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.
