> For the complete documentation index, see [llms.txt](https://docs.iexexchanger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iexexchanger.com/guide/copy-of-iexexchanger-api/dostupnye-metody/partnerskaya-programma.md).

# Партнерская программа

{% hint style="info" %}
Для получения данных данному разделу, в настройках API необходимо выдать разрешение:

* **Доступ к партнерской программе**

![](/files/8VfewxP6krLdQyzChPwM)
{% endhint %}

## Информация о партнерской программе

<mark style="color:green;">`GET`</mark> **`/account/partner`**

Получаем детали партнерской программы

**Headers**

| Name              | Value                                                           |
| ----------------- | --------------------------------------------------------------- |
| **Content-Type**  | `application/json`                                              |
| **Authorization** | `Bearer`` `<mark style="color:red;">**`<YOUR_API_KEY>`**</mark> |

**Example request**

{% tabs %}
{% tab title="Laravel Http" %}

```php
use Illuminate\Support\Facades\Http;

$api_key = 'YOUR_API_KEY';
$base_url = '{ваш_домен}/api/v2'
$response = Http::baseUrl($base_url)->withToken($api_key)->asJson()
                ->get('/account/partner')->json();
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "type": "referral",
    "attributes": {
        "percent_referral": 0.5,
        "count_referral": 2,
        "iso_code": "rub",
        "referral_hash": "Gz",
        "balance": 1190.36,
        "totals": {
            "balance": 190.36000061035,
            "withdrawal": 0
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Партнерский выводы

<mark style="color:green;">`GET`</mark> **`/account/partner/withdrawal`**

Получаем список партнерских выводов

**Headers**

| Name              | Value                                                           |
| ----------------- | --------------------------------------------------------------- |
| **Content-Type**  | `application/json`                                              |
| **Authorization** | `Bearer`` `<mark style="color:red;">**`<YOUR_API_KEY>`**</mark> |

**Example Request**

{% tabs %}
{% tab title="Laravel Http" %}

```php
use Illuminate\Support\Facades\Http;

$api_key = 'YOUR_API_KEY';
$base_url = '{ваш_домен}/api/v2'
$response = Http::baseUrl($base_url)->withToken($api_key)->asJson()
                ->get('/account/partner/withdrawal')->json();
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "data": [
        {
            "id": 1,
            "type": "referral_charge",
            "attributes": {
                "created_at": "11 мая 2024 09:42",
                "payout_status": "unpaid",
                "charged_amount": {
                    "amount": "1190.36",
                    "currency": "RUB",
                    "name": "Сбербанк RUB"
                }
            }
        }
    ],
    "links": {
        "first": "{ваш_домен}/api/v2/account/partner/withdrawal?page=1",
        "last": null,
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "{ваш_домен}/api/v2/account/partner/withdrawal",
        "per_page": 20,
        "to": 1
    }
}
```

{% endtab %}
{% endtabs %}

## Партнерские обмены

Получаем список партнерских обменов

<mark style="color:green;">`GET`</mark> **`/account/partner/exchanges`**

**Headers**

| Name              | Value                                                           |
| ----------------- | --------------------------------------------------------------- |
| **Content-Type**  | `application/json`                                              |
| **Authorization** | `Bearer`` `<mark style="color:red;">**`<YOUR_API_KEY>`**</mark> |

**Example request**

{% tabs %}
{% tab title="Laravel Http" %}

```php
use Illuminate\Support\Facades\Http;

$api_key = 'YOUR_API_KEY';
$base_url = '{ваш_домен}/api/v2'
$response = Http::baseUrl($base_url)->withToken($api_key)->asJson()
                ->get('/account/partner/exchanges')->json();
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "data": [
        {
            "id": 2,
            "type": "referral_charge",
            "attributes": {
                "status": "referral",
                "created_at": "3 недели назад",
                "amount": 95.18,
                "currency": "rub",
                "order_id": 1713350854300
            }
        }
    ],
    "links": {
        "first": "{ваш_домен}/api/v2/account/partner/exchanges?page=1",
        "last": null,
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "{ваш_домен}/api/v2/account/partner/exchanges",
        "per_page": 20,
        "to": 2
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://docs.iexexchanger.com/guide/copy-of-iexexchanger-api/dostupnye-metody/partnerskaya-programma.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.
