# Affiliate sales

`GET https://api.tentary.com/v1/affiliates/sales`

Source: https://tentary.com/en/help/api/list-affiliate-sales/
Area: Affiliates
MCP tool: `list_affiliate_sales`. Reads only. Changes nothing in the account.

---

The commissions of the affiliate partners, newest first. There is one row per paid order or subscription payment and level.

- `level` `1`: the partner sold it.
- `level` `2`: commission for the partner who recruited the selling partner (`source_partner_id`). Level 2 rows exist only for sales after the partner was recruited.
- `status`: `accepted`, `under_review`, `paid` (paid out), `declined` or `void` (the order was refunded).
- `amount`: the payment. It is 0.00 after a 100% coupon. The commission is in the same currency.

A fixed commission (see [`GET /v1/affiliates`](https://tentary.com/en/help/api/list-affiliates/)) does not depend on `amount`.

## Authorization

`Authorization: Bearer <API key>`

A personal API key (tnt_...). Create it in the Tentary app on the page AI & API.

## Query parameters

- `partner_id` (integer, query): Only this partner (id from list_affiliates). Limits: min 1.
- `from` (string, query): First day (UTC), like 2026-01-01. Limits: pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `to` (string, query): Last day (UTC). Limits: pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `cursor` (string, query): next_cursor of the previous page. Send the same filters and limit again: the cursor does not keep them. Leave out for the first page.
- `limit` (integer, query): Items per page, default 25. Limits: min 1, max 50.

## Response

- `sales` (array of object): Newest first.
  - `order_id` (integer): The order ID (not the order number).
  - `subscription_payment` (boolean): true = a renewal payment of a subscription.
  - `date` (string<date-time>, can be null): UTC, like 2026-01-31T14:05:00Z.
  - `product_id` (integer, can be null): The product ID.
  - `product_title` (string, can be null): The product name.
  - `amount` (string, can be null): Decimal string, like "19.90". The payment.
  - `currency` (string): Currency code, like EUR.
  - `partner_id` (integer): The affiliate partner ID.
  - `level` (integer): 1 = the partner sold it. 2 = commission for the partner who recruited the seller partner.
  - `source_partner_id` (integer, can be null): Level 2 only.
  - `commission` (string, can be null): Decimal string, like "19.90".
  - `status` (string): void = the order was refunded. Allowed values: `accepted`, `under_review`, `paid`, `declined`, `void`, `unknown`.
  - `admin_url` (string<uri>): The page in the Tentary app.
- `next_cursor` (string, can be null): Send it as cursor for the next page, with the same filters and limit. null = this is the last page.
- `admin_url` (string<uri>): The page in the Tentary app.

## Example request

```bash
curl "https://api.tentary.com/v1/affiliates/sales?partner_id=900" \
  -H "Authorization: Bearer $TENTARY_API_KEY"
```

## Example response

```json
{
  "sales": [
    {
      "order_id": 1001,
      "subscription_payment": false,
      "date": "2026-09-17T09:14:22Z",
      "product_id": 101,
      "product_title": "Yoga Basics E-Book",
      "amount": "19.00",
      "currency": "EUR",
      "partner_id": 900,
      "level": 1,
      "source_partner_id": null,
      "commission": "5.70",
      "status": "accepted",
      "admin_url": "https://app.tentary.com/orders/view/1001"
    }
  ],
  "next_cursor": null,
  "admin_url": "https://app.tentary.com/affiliates/sales"
}
```
