# refundOrder

Source: <https://telegafirst.com/docs/api-op-refundorder>
Locale: ru
releaseGitSha: fc570c76ffc9cb87e2462d45b14f5c1b52fbaf0d
sourceContentDigest: 841587e31c339311ac53e48e1a24edfc7a67b0b059663edef6bc47f5f6601f03
Version: 2

# refundOrder

`POST /api/v1/orders/{order_id}/refunds`

refundOrder

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

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.description | "Required for POST with a body. Same-key replay; changed body returns 422." |
| 0.in | "header" |
| 0.name | "Idempotency-Key" |
| 0.required | true |
| 0.schema | [0.schema](https://telegafirst.com/docs/schema-9ac136edb99a2063b3091602181c8d2022fdccb5b514991319d58544c2e57e95) |
| 1.in | "path" |
| 1.name | "order\_id" |
| 1.required | true |
| 1.schema | [1.schema](https://telegafirst.com/docs/schema-1530eae3d9b69eb0d4bf2268a4cc47372fcec06f1cf1736785dd6f16848382fc) |

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

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

## Ответы

| Поле | Значение |
| - | - |
| 200.content.application/json.schema | [RefundResponse](https://telegafirst.com/docs/schema-9420818a14d0b496806bcfb084263df63a849dc5252654bb548cb3beea320a4c) |
| 200.description | "A body with scope prepares a refund and asks the owner for approval; a body with action\_id runs the approved one." |

## Ошибки

| Поле | Значение |
| - | - |
| 400.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 400.description | "A strict body, path or query is rejected" |
| 401.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 401.description | "Missing, invalid, expired or revoked authentication" |
| 403.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 403.description | "Missing scope, or a credential that names no actor (FORBIDDEN)" |
| 404.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 404.description | "The addressed object is not in this business" |
| 409.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 409.description | "A conflict with the current state" |
| 422.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 422.description | "A domain refusal with its own code" |
| 429.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 429.description | "Per-tool rate limit exceeded" |
| 500.content.application/problem+json.schema | [ProblemDetails](https://telegafirst.com/docs/schema-cb940dbba4894d830b2ff33a2fbf4d6382de295156cd5a9ab88564d4c14aa2ab) |
| 500.description | "Unexpected failure" |

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

| Поле | Значение |
| - | - |
| description | "A body with scope prepares a refund and asks the owner for approval; a body with action\_id runs the approved one." |
| operationId | "refundOrder" |
| tags | \["orders"] |
| x-idempotency | "generic-cache" |
