# Запит зміни статуса токену

Зміна статусу можлива відповідно до наступних правил:

1. **ACTIVE → SUSPENDED** – Активний статус може бути змінений на призупинений (наприклад, у разі тимчасового блокування).
2. **SUSPENDED → ACTIVE** – Призупинений статус може бути відновлений до активного (наприклад, після розблокування).
3. **ACTIVE → DELETED** – Активний статус може бути змінений на видалений (наприклад, при остаточному видаленні).
4. **SUSPENDED → DELETED** – Призупинений статус може бути змінений на видалений (наприклад, якщо користувач не відновив активність).

Перехід між статусами **DELETED → будь-який інший** неможливий.

**Вхідні параметри:**&#x20;

| Параметр | Опис          | Формат даних | Обовʼязковість | Приклад                   |
| -------- | ------------- | ------------ | -------------- | ------------------------- |
| token    | Id токену     | string       | Так            | SRrSBe5DOb7lrZ\_FS46fihty |
| state    | статус токена | string       | Так            | SUSPENDED                 |

**Вихідні параметри:**&#x20;

| Параметр     | Опис                        | Формат даних | Приклад                   |
| ------------ | --------------------------- | ------------ | ------------------------- |
| tokenUpdated | ознака зміни статусу токену | boolean      | true/false                |
| customerId   | Id клієнта                  | string(255)  | 12345                     |
| token        | Id токену                   | string       | SRrSBe5DOb7lrZ\_FS46fihty |

**Приклад тіла запиту**&#x20;

```json
{
    "token": "-s9UCfCNN0YMk4ZOyZX8pWAt",
    "state": "SUSPENDED"
}
```

**Приклад тіла відповіді**&#x20;

```json
{
    "tokenUpdated": true,
    "customerId": "senderCustomerId",
    "token": "-s9UCfCNN0YMk4ZOyZX8pWAt"
}
```


---

# 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://docs.merchant.alb.ua/platizhni-metodi-h2h/token/zapit-zmini-statusa-tokenu.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.
