# List commissions

### Request

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

### Optional parameters

| Parameter      | Description                                                                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `affiliate_id` | Show commissions for the specified affiliate.                                                                                                                    |
| `state`        | Show commissions that are currently in the specified states. Valid values are "due", "pending",  "paid" and "voided". Pass `state[]` to specify multiple states. |
| `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.          |

### Expandable objects

| Parameter  | Description                                                                                                                                          |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sale`     | Includes the sale as a nested object for each commission in the list. The sale object will include details about the referral, link, affiliate, etc. |
| `campaign` | Include the details about the campaign this commission is associated with.                                                                           |

### Examples

#### List all commissions

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

#### List all commissions and include nested sale object

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/commissions?expand[]=sale \
  -u YOUR_API_SECRET:
```

#### List commissions for a specific affiliate

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/commissions?affiliate_id=b533bfca-7c70-4dec-9691-e136a8d9a26c \
  -u YOUR_API_SECRET:
```

#### List commissions with a "paid" state

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/commissions?state=paid \
  -u YOUR_API_SECRET:
```

#### List commissions with a "due" or "pending" state

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/commissions?state[]=due&state[]=pending \
  -u YOUR_API_SECRET:
```

#### Pagination: request page 3 with 50 results per page

```bash
curl --request GET \
  --url https://api.getrewardful.com/v1/commissions?page=3&limit=50
  -u YOUR_API_SECRET:
```


---

# 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://developers.rewardful.com/rest-api/commissions/list.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.
