# unmarkOrderPaid

Source: <https://telegafirst.com/docs/api-op-unmarkorderpaid>
Locale: ru
releaseGitSha: 005a4dc9d76f69a0815df4e3f98b9050d4d46afb
sourceContentDigest: 58daaecff13788bad762664b61d790a10f8d97d62b538841ac668b0ec23d0a33
Version: 5

# unmarkOrderPaid

`POST /api/v1/sales/orders/{order_id}/unmark-paid`

unmarkOrderPaid

## Авторизация и права

Scopes: ALL. Auth alternatives: OR; scopes внутри альтернативы: ALL.

| Поле | Значение |
| - | - |
| security.0.hubApiKey | \[] |
| security.1.hubBearer | \[] |
| securitySchemes.hubApiKey.in | "header" |
| securitySchemes.hubApiKey.name | "X-Api-Key" |
| securitySchemes.hubApiKey.type | "apiKey" |
| securitySchemes.hubBearer.scheme | "bearer" |
| securitySchemes.hubBearer.type | "http" |
| x-required-scopes | \["orders:write"] |

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

| Поле | Значение |
| - | - |
| 0.in | "path" |
| 0.name | "order\_id" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-1530eae3d9b69eb0d4bf2268a4cc47372fcec06f1cf1736785dd6f16848382fc) |
| 1.description | "Required; a repeat with the same key within 24 hours replays the stored answer." |
| 1.in | "header" |
| 1.name | "Idempotency-Key" |
| 1.required | true |
| 1.schema | [1.schema](https://telegafirst.com/docs/schema-c82b42b2810fa0ee377c088ab8bf7e5bb94f8f2c318f682ee4e9451a9740bc06) |

## Тело запроса

| Поле | Значение |
| - | - |
| content.application/json.schema | [UnmarkOrderPaidRequest](https://telegafirst.com/docs/schema-d9fcd5c7de6b9c4697a49ccac4fd1efcc27d2b6d79404847c13c5e43bed71bb4) |
| required | true |

## Ответы

| Поле | Значение |
| - | - |
| 201.content.application/json.schema | [UnmarkOrderPaidResponse](https://telegafirst.com/docs/schema-b52a026bc470365f00c75e27cdd194401dd4b5c7ef29d92ddffb61748977f017) |
| 201.description | "The order after the call" |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 400.description | "Invalid strict body or path (VALIDATION\_ERROR/INVALID\_REQUEST), missing/blank Idempotency-Key (IDEMPOTENCY\_KEY\_REQUIRED), or missing credential provenance (INVALID\_REQUEST)" |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 401.description | "Missing or invalid API key; a surface-session JWT is not accepted" |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 403.description | "Missing orders:write scope (INSUFFICIENT\_SCOPE), a credential not admitted to this tenant (FORBIDDEN), or the person behind the credential lacks the refund right (ACTION\_FLAG\_MISSING)" |
| 404.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 404.description | "The tenant-local buyer, catalogue, registration or order was not found" |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 409.description | "The durable receipt is pending and its effect cannot be recovered (IDEMPOTENCY\_KEY\_IN\_FLIGHT), a line cannot be held (STOCK\_EXHAUSTED), or the order's invoice is already out and the body does not ask for a reissue (ALREADY\_SENT)" |
| 413.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 413.description | "The per-tool resource policy rejects the request size" |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 422.description | "Divergent receipt-key reuse (IDEMPOTENCY\_KEY\_MISMATCH), declared unit prices in two currencies (MIXED\_CURRENCY), or invalid current money preconditions such as a buyer without a receipt contact for an invoice" |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 429.description | "The per-tool rate limit is exceeded or its subsystem is unavailable" |
| 429.headers.Retry-After.description | "Retry delay in seconds when supplied by the resource limiter" |
| 429.headers.Retry-After.required | false |
| 429.headers.Retry-After.schema | [429.headers.Retry-After.schema](https://telegafirst.com/docs/schema-f0765dbf409c74f001806c446f2cf171d8c46b5b15779d54423dde921a4b0670) |
| 500.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-47fdf0d8395ef5a30fe38dcbde38e65bcdd30fe0fcf5d639ae3a647e01aef684) |
| 500.description | "Unexpected money failure" |

## Дополнительные условия

| Поле | Значение |
| - | - |
| description | "Reverse a manual settlement: payment\_id is the number of the payment recorded by hand (mark-paid or a manual sale), as the order lists it. That payment is cancelled by a compensating entry, never edited; the order is open and unpaid again, and the private access that payment opened is taken back unless another payment keeps it. confirm\_reversal must be true. A provider payment is refused: it is a refund. Needs the refund right of the person behind the credential (ACTION\_FLAG\_MISSING). A repeat with the same payment\_id answers outcome already\_cancelled and changes nothing." |
| operationId | "unmarkOrderPaid" |
| tags | \["sales"] |
