> ## Documentation Index
> Fetch the complete documentation index at: https://developers.everflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Offers & Affiliates

> Tools for retrieving offer and affiliate details, including caps, targeting, payout rules, and access lists.

## get\_offer

Retrieves full details for a single offer. Use the `include` parameter to fetch caps, targeting rules, payout structure, and affiliate-specific data.

**Parameters:**

| Parameter       | Type   | Required | Description                                                                                               |
| --------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------- |
| `offer_id`      | number | Yes      | Numeric offer ID                                                                                          |
| `affiliate_id`  | number | No       | Required when `include` contains `tracking_url`                                                           |
| `include`       | string | No       | Comma-separated: `caps`, `targeting`, `payout`, `affiliate`, `affiliates`, `tracking_url` — max 256 chars |
| `affiliate_ids` | string | No       | For `include=affiliates` only — comma-separated affiliate IDs to filter — max 1,024 chars                 |
| `cursor`        | string | No       | Pagination cursor for `include=affiliates` — max 1,024 chars                                              |

**Response fields:**

| Field                       | Type    | Description                                                                                                                                                                       |
| --------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `offer_id`                  | number  | Numeric offer ID                                                                                                                                                                  |
| `name`                      | string  | Offer name                                                                                                                                                                        |
| `status`                    | string  | Offer status                                                                                                                                                                      |
| `visibility`                | string  | Offer visibility setting (`public`, `require_approval`, `private`)                                                                                                                |
| `currency`                  | string  | Offer currency                                                                                                                                                                    |
| `advertiser_id`             | number  | Advertiser ID                                                                                                                                                                     |
| `advertiser_name`           | string  | Advertiser name                                                                                                                                                                   |
| `destination_url`           | string  | Offer destination URL (contains the `{transaction_id}` macro)                                                                                                                     |
| `conversion_method`         | string  | How conversions are tracked (e.g. `server_postback`)                                                                                                                              |
| `session_duration`          | number  | Attribution session/cookie window (hours)                                                                                                                                         |
| `attribution_method`        | string  | Attribution model (e.g. `last_touch`)                                                                                                                                             |
| `category_id`               | number  | Category ID (if set)                                                                                                                                                              |
| `category_name`             | string  | Category name (if set)                                                                                                                                                            |
| `labels`                    | array   | Labels assigned to this offer                                                                                                                                                     |
| `offer_group_id`            | number  | Offer group ID — present only when the offer is in a group                                                                                                                        |
| `preview_url`               | string  | Offer preview URL — present only when set                                                                                                                                         |
| `description`               | string  | Offer's marketing description — present only when set. May be plain text or raw HTML (see `is_description_plain_text`)                                                            |
| `is_description_plain_text` | boolean | Present only alongside `description`. `true` = plain text; `false` = raw HTML (tags, iframes, entities) — render or strip it before showing it to a user, don't quote it verbatim |

**Include: `caps`** — click, conversion, payout, and revenue budget limits and current consumption.

**Include: `targeting`** — geo restrictions, device rules, day-parting, and eligibility conditions.

**Include: `payout`** — payout tiers, events, and rules.

**Include: `affiliate`** — this affiliate's approval status (`approval_status`) and visibility for the offer (requires `affiliate_id`). Treat the `tracking_url` include — not `approval_status` — as the authority on whether the partner can actually run the offer.

**Include: `tracking_url`** — the affiliate's unique tracking link (requires `affiliate_id`).

**Include: `affiliates`** — paginated list of affiliates with their visibility and approval status for this offer.

<Note>
  To inspect the full nested field structure returned by each `include` option, call `get_entity_schema(type="offer")` — it lists all available relationships and their field descriptions.
</Note>

***

## list\_offers

Lists offers with optional filters. Returns a paginated compact view.

**Filters:**

| Filter            | Type   | Description                                                                                                                                                                                                                                        |
| ----------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search`          | string | Search by offer name — max 256 chars                                                                                                                                                                                                               |
| `status`          | string | `active`, `paused`, `pending`, `deleted` — max 256 chars                                                                                                                                                                                           |
| `advertiser_id`   | string | Filter by advertiser ID (numeric string)                                                                                                                                                                                                           |
| `advertiser`      | string | Search by advertiser name — max 256 chars                                                                                                                                                                                                          |
| `category`        | string | Filter by category name (substring match) — max 256 chars                                                                                                                                                                                          |
| `label`           | string | Filter by label name (substring match, case-insensitive) — max 256 chars                                                                                                                                                                           |
| `destination_url` | string | Only offers whose destination (landing) URL contains this substring, case-insensitive (e.g. `appsflyer`) — max 256 chars. Pair with `status=active` for live offers; the matched `destination_url` is echoed on each row when this filter is used. |
| `created_after`   | string | Only offers created on or after this date, **inclusive** of that day (`YYYY-MM-DD`; day boundaries use the network timezone)                                                                                                                       |
| `created_before`  | string | Only offers created on or before this date, **inclusive** of that day (`YYYY-MM-DD`; day boundaries use the network timezone). For a strictly-before / exclusive bound (e.g. "created before Jul 10"), pass the previous day (Jul 09).             |
| `page_size`       | number | Rows per page (1–200, default 25)                                                                                                                                                                                                                  |
| `cursor`          | string | Pagination cursor from a prior response — max 1,024 chars                                                                                                                                                                                          |

**Response envelope:**

| Field            | Type    | Description                                 |
| ---------------- | ------- | ------------------------------------------- |
| `has_more`       | boolean | `true` if additional pages exist            |
| `next_cursor`    | string  | Pass as `cursor` to retrieve the next page  |
| `rows_returned`  | number  | Number of records in this page              |
| `total_matching` | number  | Total records matching the query            |
| `page_size`      | number  | Rows-per-page applied to this response      |
| `offset`         | number  | Zero-based offset of the first returned row |

**Per-row fields:**

| Field             | Type   | Description                   |
| ----------------- | ------ | ----------------------------- |
| `offer_id`        | number | Numeric offer ID              |
| `name`            | string | Offer name                    |
| `status`          | string | Offer status                  |
| `visibility`      | string | Visibility setting            |
| `advertiser_id`   | number | Advertiser ID                 |
| `advertiser_name` | string | Advertiser name               |
| `currency`        | string | Offer currency                |
| `encoded_value`   | string | Encoded offer ID              |
| `category_id`     | number | Category ID (if set)          |
| `category_name`   | string | Category name (if set)        |
| `date_live_until` | string | Expiry date (if set)          |
| `labels`          | array  | Labels assigned to this offer |

***

## get\_affiliate

Retrieves full details for a single affiliate. Use the `include` parameter to fetch activity metrics, users, offer access, tracking domains, and coupon codes.

**Parameters:**

| Parameter      | Type   | Required | Description                                                                                                    |
| -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| `affiliate_id` | number | Yes      | Numeric affiliate ID                                                                                           |
| `timezone`     | string | No       | IANA timezone for activity timestamps — max 64 chars                                                           |
| `include`      | string | No       | Comma-separated: `activity`, `users`, `offers` — max 256 chars                                                 |
| `offer_ids`    | string | No       | For `include=offers` only — comma-separated offer IDs to check visibility for this affiliate — max 1,024 chars |
| `can_run`      | string | No       | For `include=offers` only — filter by runnable status: `yes` or `no` — max 8 chars                             |
| `cursor`       | string | No       | For `include=offers` only — pagination cursor from a prior response — max 1,024 chars                          |

**Response fields:**

| Field            | Type   | Description                                                                                                                                  |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `affiliate_id`   | number | Numeric affiliate ID                                                                                                                         |
| `name`           | string | Affiliate name                                                                                                                               |
| `status`         | string | Account status: `active`, `inactive`, `suspended`, `pending` (a new-partner signup awaiting network approval — i.e. a "partner application") |
| `currency`       | string | Default currency                                                                                                                             |
| `manager_id`     | number | Account manager employee ID                                                                                                                  |
| `manager_name`   | string | Account manager name                                                                                                                         |
| `tier_id`        | number | Tier ID (if assigned)                                                                                                                        |
| `tier_name`      | string | Tier name (if assigned)                                                                                                                      |
| `labels`         | array  | Labels assigned to this affiliate                                                                                                            |
| `internal_notes` | string | Internal notes — present only when set                                                                                                       |

**Include: `activity`** — portal login frequency, API usage, 7-day click/conversion performance, and last active date.

**Include: `users`** — contact details (names, titles, emails) for the affiliate's team.

**Include: `offers`** — paginated list of offers the affiliate can run, with visibility type and approval status.

<Note>
  To retrieve coupon codes for an affiliate, use `list_entities` with `type=coupon_code` and filter by `affiliate_id`.
</Note>

***

## list\_affiliates

Lists affiliates with optional filters. Returns a paginated compact view.

**Filters:**

| Filter           | Type   | Description                                                                                                                                                                                                                                |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `search`         | string | Search by affiliate name or company — max 256 chars                                                                                                                                                                                        |
| `status`         | string | `active`, `inactive`, `suspended`, `pending` — max 256 chars. Use `pending` to find **partner applications** (new-partner signups awaiting approval)                                                                                       |
| `manager_id`     | number | Filter by account manager employee ID                                                                                                                                                                                                      |
| `label`          | string | Filter by label name (substring match) — max 256 chars                                                                                                                                                                                     |
| `tier`           | string | Filter by tier name (substring match) — max 256 chars                                                                                                                                                                                      |
| `created_after`  | string | Only affiliates created on or after this date, **inclusive** of that day (`YYYY-MM-DD`; day boundaries use the network timezone)                                                                                                           |
| `created_before` | string | Only affiliates created on or before this date, **inclusive** of that day (`YYYY-MM-DD`; day boundaries use the network timezone). For a strictly-before / exclusive bound (e.g. "created before Jul 10"), pass the previous day (Jul 09). |
| `referred_by`    | number | Only affiliates referred by this affiliate ID (their "Referred By")                                                                                                                                                                        |
| `page_size`      | number | Rows per page (1–200, default 25)                                                                                                                                                                                                          |
| `cursor`         | string | Pagination cursor from a prior response — max 1,024 chars                                                                                                                                                                                  |

**Response envelope:**

| Field            | Type    | Description                                |
| ---------------- | ------- | ------------------------------------------ |
| `has_more`       | boolean | `true` if additional pages exist           |
| `next_cursor`    | string  | Pass as `cursor` to retrieve the next page |
| `rows_returned`  | number  | Number of records in this page             |
| `total_matching` | number  | Total records matching the query           |
| `page_size`      | number  | Rows-per-page applied to this response     |

**Per-row fields:**

| Field                 | Type   | Description                                                                                                |
| --------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |
| `affiliate_id`        | number | Numeric affiliate ID                                                                                       |
| `name`                | string | Affiliate name                                                                                             |
| `status`              | string | Account status                                                                                             |
| `manager_id`          | number | Account manager employee ID                                                                                |
| `default_currency_id` | string | Default currency                                                                                           |
| `tier_id`             | number | Tier ID (if assigned)                                                                                      |
| `tier_name`           | string | Tier name (if assigned)                                                                                    |
| `time_created`        | string | Signup timestamp in the **network timezone** (matches the `created_after`/`created_before` day boundaries) |
| `referrer_id`         | number | The affiliate who referred this one — their "Referred By" (present only when referred)                     |
| `referrer_name`       | string | Name of the referring affiliate (present only when referred)                                               |
| `labels`              | array  | Labels assigned to this affiliate                                                                          |
