# Отмена инвойса

{% hint style="info" %}
Если вы уверены что клиент точно не будет использовать этот инвойс, то вы можете его отменить, чем нанесете непоправимую пользу окружающей среде и количеству свободных реквизитов
{% endhint %}

## Метод запроса

POST

## Урл запроса

/api/v2/invoices/{id}/cancel

## Параметры запроса

На вход принимаются следующие параметры

<table><thead><tr><th width="180">Название</th><th width="81" data-type="checkbox">Обяз.</th><th width="151">Формат</th><th>Описание</th><th data-hidden>Описание</th><th data-hidden>Формат</th><th data-hidden data-type="checkbox">Обязательно</th></tr></thead><tbody><tr><td>id</td><td>true</td><td>string(1-19)</td><td>Номер инвойса в нашей системе</td><td>Ваш уникальный номер заявки</td><td></td><td>false</td></tr></tbody></table>

#### Пример запроса

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

```sh
curl --request POST \
  --url https://{{your_api_domain}}/api/v2/invoices/{id}/cancel \
  --header 'Authorization: Bearer {{your_api_token}}'

```

{% endtab %}

{% tab title="PHP + Guzzle" %}

```php
$httpClient = new \GuzzleHttp\Client();
$response = $httpClient->post('https://{{your_api_domain}}/api/v2/invoices/{id}/cancel', [
    'headers' => [
        'Authorization' => 'Bearer ' . $yourApiToken,
    ]
]);
```

{% endtab %}
{% endtabs %}

## Параметры ответа

Ответ не содержит параметров, только статус HTTP 200&#x20;

#### Пример ответа

```
HTTP 200 OK
{}
```


---

# 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://fkassa.gitbook.io/firekassa-api-v2/invoices/cancel.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.
