---
title: "Pages the affiliate commissions an order earned."
---

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

Path: Sherpo merchant API › transaction

`GET /v1/stores/{store}/orders/{order}/affiliates`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `transaction:read`

## Path parameters

- `store` (`listOrderAffiliates.path.store`; string, required) — The store's id.
- `order` (`listOrderAffiliates.path.order`; string, required)
  - minLength 1

## Query parameters

- `filter` (`listOrderAffiliates.query.filter`; object, optional) — `filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.
- `sort` (`listOrderAffiliates.query.sort`; string, optional)
  - one of `"commission"`
- `direction` (`listOrderAffiliates.query.direction`; string, optional)
  - one of `"asc"`, `"desc"`
- `limit` (`listOrderAffiliates.query.limit`; integer, optional)
  - min 1; max 100
- `cursor` (`listOrderAffiliates.query.cursor`; string, optional)
  - maxLength 8192
- `count` (`listOrderAffiliates.query.count`; boolean, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/orders/<order>/affiliates' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/orders/<order>/affiliates';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/orders/<order>/affiliates"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Pages the affiliate commissions an order earned.

#### Example

```json
{
  "items": [
    {
      "resolution": {
        "id": "string",
        "user_id": "string",
        "currency": "string",
        "exponent": 0,
        "kind": "string",
        "amount": 0,
        "processor": "stripe",
        "processor_ref": "string",
        "reason": "string",
        "occurred_at": "string",
        "recorded_at": "string"
      },
      "discount": {
        "id": "string",
        "code": "string",
        "name": "string"
      },
      "settlement_id": "string",
      "order_item_id": "string",
      "order_id": "string",
      "user_id": "string",
      "discount_id": "string",
      "currency": "string",
      "exponent": 0,
      "fee": 0,
      "resolution_id": "string",
      "user": {
        "id": "string",
        "name": "string",
        "email": "string",
        "avatar": "string"
      }
    }
  ],
  "cursor": "string",
  "total": 0,
  "facets": {
    "property1": {
      "property1": 0,
      "property2": 0
    },
    "property2": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

- `items` (`listOrderAffiliates.response.200.items`; array<object>, required)
  - `resolution` (`listOrderAffiliates.response.200.items.resolution`; any of, required)
    - any of: `object`, `null`
  - `discount` (`listOrderAffiliates.response.200.items.discount`; any of, required)
    - any of: `object`, `null`
  - `settlement_id` (`listOrderAffiliates.response.200.items.settlement_id`; string, required)
  - `order_item_id` (`listOrderAffiliates.response.200.items.order_item_id`; string, required)
  - `order_id` (`listOrderAffiliates.response.200.items.order_id`; string, required)
  - `user_id` (`listOrderAffiliates.response.200.items.user_id`; string, required)
  - `discount_id` (`listOrderAffiliates.response.200.items.discount_id`; any of, required)
    - any of: `string`, `null`
  - `currency` (`listOrderAffiliates.response.200.items.currency`; string, required)
  - `exponent` (`listOrderAffiliates.response.200.items.exponent`; any of, required)
    - any of: `number`, `null`
  - `fee` (`listOrderAffiliates.response.200.items.fee`; any of, required)
    - any of: `number`, `null`
  - `resolution_id` (`listOrderAffiliates.response.200.items.resolution_id`; any of, required)
    - any of: `string`, `null`
  - `user` (`listOrderAffiliates.response.200.items.user`; any of, required)
    - any of: `object`, `null`
- `cursor` (`listOrderAffiliates.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listOrderAffiliates.response.200.total`; number, optional)
- `facets` (`listOrderAffiliates.response.200.facets`; map<map<number>>, optional)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`listOrderAffiliates.response.default.type`; string, required)
  - format `uri`
- `title` (`listOrderAffiliates.response.default.title`; string, required)
- `status` (`listOrderAffiliates.response.default.status`; integer, required)
- `detail` (`listOrderAffiliates.response.default.detail`; string, required)
- `code` (`listOrderAffiliates.response.default.code`; string, optional)
- `context` (`listOrderAffiliates.response.default.context`; object, optional)
- `reached_core` (`listOrderAffiliates.response.default.reached_core`; boolean, optional)
- `core_answer` (`listOrderAffiliates.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/list-order-affiliates/index.md
