# Confirm an amendment (/docs/api-reference/order-items/confirm-amendment)

`POST /v1/order-items/{id}/amendments/confirm`

Confirms a quoted amendment, paying any surcharge or receiving any refund.

Send the `amendmentRequestId` from the quote and, optionally, the `selectedOptionId` of one of
its options (the first option is used when it is omitted). The quote is checked again before anything is
charged: an expired or unknown quote, or one made before another amendment changed the item, returns
`400` with code `11004` (`OFFER_EXPIRED_OR_INVALID`) at `amendmentRequestId`, and an
option that is no longer offered returns `400` with code `10001`; request a new quote then. Where
the change is priced again before the charge (hotels), a price that changed since the quote returns
`409` with code `11002` (`OFFER_PRICE_CHANGED`) at `amendmentRequestId` without
`maxPrice`, and is charged when it is within `maxPrice`. A price above `maxPrice` returns
`409` with code `11002` at
`maxPrice`, with nothing charged; a `maxPrice` in another currency than the quoted amounts returns
`400` with code `10001` at `maxPrice.currency`. A change refused when it is sent (for example,
a flight whose price changed since the quote) gets its surcharge back and returns `400` with code
`10001`.
            
Confirming the same quote again with a new `Idempotency-Key` returns `200` with the amendment that
quote created, and nothing is charged twice. A confirm that was interrupted after its payment is finished
first: its change is sent, or its surcharge is returned. Two confirms of one quote sent at the same time make
one amendment: the other returns `200` with it, or `409` with code `18003` and
`IN_PROGRESS` while the first is still running; send it again shortly. A kind of item that can never be
amended returns `422` with code `18002` (`AMENDMENT_NOT_SUPPORTED`), and an amendment that is
not allowed now returns `409` with code `18003` (`AMENDMENT_NOT_AVAILABLE`), with
`details[0].reason` `IN_PROGRESS` while another amendment or a change to the order is running,
otherwise `MANUAL_REVIEW` or `NOT_AVAILABLE`. An item of another partner, or an unknown id,
returns `404` with code `10004`.
            
A surcharge is charged with `paymentMethod` `balance`, its only value: the wallet linked to the API
key. Any other value returns `400` with code `10001` at `paymentMethod`. A refund goes to that
wallet. Returns the
`amendmentRequestId`, the new `amendmentId`, its `status`, and the `payment` or
`refund` that was made (`null` when none). A wallet charge that fails returns `402` with code
`16000` (`PAYMENT_FAILED`) and, when the reason is known, `details[0]` naming `wallet`
with `INSUFFICIENT_BALANCE` or `WALLET_BLOCKED`; no amendment is kept, so the same quote can be
confirmed again after a top-up. Amendments do not change
`fulfillmentVersion`; read the order again for the changed item.
            
Requires an `Idempotency-Key` header (a UUID). Repeating a completed request with the same key and body
returns `200` with the amendment that request created, as it reads now, and charges nothing again. One
still running returns `409` with code `12002` (`IDEMPOTENCY_KEY_IN_PROGRESS`) and a
`Retry-After` header, and a different body with the same key `409` with code `12001`. A
request that ended in an error can be sent again with the same key and body.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | yes | `string` | Order item id (`items[].id` from the order response). |
| `Idempotency-Key` | header | yes | `string` | UUID idempotency key for safe retries of this operation. |

## Request body

- `application/json`: `AmendmentConfirmRequest`
- `text/json`: `AmendmentConfirmRequest`
- `application/*+json`: `AmendmentConfirmRequest`

## Responses

### 200

OK

- `text/plain`: `AmendmentConfirmResult`
- `application/json`: `AmendmentConfirmResult`
- `text/json`: `AmendmentConfirmResult`

### 400

Invalid partner request or model validation failure.

- `application/json`: `ErrorResponse`

### 402

Payment Required

- `text/plain`: `ErrorResponse`
- `application/json`: `ErrorResponse`
- `text/json`: `ErrorResponse`

### 404

Not Found

- `text/plain`: `ErrorResponse`
- `application/json`: `ErrorResponse`
- `text/json`: `ErrorResponse`

### 409

The idempotency key: a request with this key is still running (12002): send the same request, key and body again after Retry-After seconds; or it was used for a different request (12001). A finished request sent again with the same key and body returns 200 with the result of the first call, rebuilt from the record that call created as it reads now: nothing runs again, and a status that has moved on since shows its current value.

- `application/json`: `ErrorResponse`

### 422

Unprocessable Content

- `text/plain`: `ErrorResponse`
- `application/json`: `ErrorResponse`
- `text/json`: `ErrorResponse`

### 429

Too many requests from this IP address. Wait for Retry-After seconds, then send the same request again; an order keeps its Idempotency-Key and body.

- `application/json`: `ErrorResponse`

### 503

Idempotency state is temporarily unavailable; retry the same request and key.

- `application/json`: `ErrorResponse`

The full schemas are in the OpenAPI specification at /openapi.json.