> 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/get-started/exchanger-api/obmen-i-zayavki/order-actions-statuses.md).

# Статусы и действия по заявке

После создания заявки интеграция должна показывать статус и доступные действия.

## Получить заявку

```bash
curl -sS https://example.com/api/v3/private/exchange/orders/TRK8K2LQ \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Вместо `{order}` можно передать:

* numeric `id`;
* `public_id`;
* `tracking_id`.

API возвращает только заявки текущего клиента.

## Получить статус

```bash
curl -sS https://example.com/api/v3/private/exchange/orders/TRK8K2LQ/status \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Пример:

```json
{
  "state": 0,
  "result": {
    "order": {
      "tracking_id": "TRK8K2LQ",
      "status": "processing",
      "status_label": "Processing",
      "is_final": false
    }
  }
}
```

## Получить доступные действия

```bash
curl -sS https://example.com/api/v3/private/exchange/orders/TRK8K2LQ/actions \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

| Действие              | Что означает                           |
| --------------------- | -------------------------------------- |
| `confirm_payment`     | Пользователь может подтвердить оплату. |
| `cancel`              | Заявку можно отменить.                 |
| `upload_file`         | Нужно загрузить файл.                  |
| `submit_verification` | Нужна верификация.                     |

## Подтвердить оплату

```bash
curl -sS https://example.com/api/v3/private/exchange/orders/TRK8K2LQ/confirm \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: confirm-TRK8K2LQ-001" \
  -d '{
    "type": "paid",
    "num_tx": "0xabc...",
    "note_tx": "Paid from customer wallet"
  }'
```

## Отменить заявку

```bash
curl -sS https://example.com/api/v3/private/exchange/orders/TRK8K2LQ/cancel \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: cancel-TRK8K2LQ-001" \
  -d '{
    "reason": "User cancelled checkout"
  }'
```

Отмена доступна только пока заявка не финальная.

## Webhooks или polling

Основной способ узнавать изменения статуса: webhook `order.status_changed`.

Status endpoint используйте:

* когда пользователь прямо сейчас смотрит страницу заявки;
* если webhook временно недоступен;
* для ручной сверки.


---

# 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://docs.iexexchanger.com/get-started/exchanger-api/obmen-i-zayavki/order-actions-statuses.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.
