> 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/affiliates/list.md).

# List affiliates

## Request

| Method | URL                                          |
| ------ | -------------------------------------------- |
| `GET`  | `https://api.getrewardful.com/v1/affiliates` |

### Optional parameters

| Parameter            | Description                                                                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `campaign_id`        | A filter based on the affiliate's campaign.                                                                                                             |
| `email`              | A filter based on the affiliate's email address.\*                                                                                                      |
| `stripe_customer_id` | A filter based on the affiliate's Stripe customer ID.\* (Applies to customer referrers)                                                                 |
| `page`               | [Pagination](https://developers.getrewardful.com/rest-api/overview#pagination) cursor specifying which page to fetch.                                   |
| `limit`              | How many results to return per page. Default is 25, maximum is 100.                                                                                     |
| `expand`             | Which object(s) to [expand](https://developers.getrewardful.com/rest-api/overview#expanding-objects) in response data. See below for available objects. |

*\*Filtering by `email` or `stripe_customer_id` will return a list with one (or zero) items.*

### Expandable objects

| Parameter          | Description                                                                                         |
| ------------------ | --------------------------------------------------------------------------------------------------- |
| `campaign`         | Includes the campaign details as a nested object for each affiliate in the list.                    |
| `links`            | Includes an array of the affiliate's links as a nested object for each affiliate in the list.       |
| `commission_stats` | Include a nested object describing the affiliate's commission stats for each affiliate in the list. |

### Examples

#### List all affiliates

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/affiliates \
  -u YOUR_API_SECRET:
```

#### List all affiliates and expand campaign data

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/affiliates?expand=campaign \
  -u YOUR_API_SECRET:
```

#### List all affiliates and expand campaign and links data

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/affiliates?expand[]=campaign&expand[]=links \
  -u YOUR_API_SECRET:
```

#### Filter list of affiliates by campaign

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/affiliates?campaign_id=c3482343-8680-40c5-af9a-9efa119713b5 \
  -u YOUR_API_SECRET:
```

#### Filter list of affiliates by email address

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/affiliates?email=joe@example.com \
  -u YOUR_API_SECRET:
```


---

# 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, and the optional `goal` query parameter:

```
GET https://developers.rewardful.com/rest-api/affiliates/list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
