# Quote an amendment (/docs/api-reference/order-items/quote-amendment)

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

Quotes a change to a delivered order item.

Available only when the item's `actions.amendment` is `available`: the item must be fulfilled,
not refunded, and its product must support automatic changes. Items whose changes need manual review show
`manualReview` and use the manual amendment routes instead. A kind of item that can never be amended
returns `422` with code `18002` (`AMENDMENT_NOT_SUPPORTED`); otherwise an amendment that is
not allowed now returns `409` with code `18003` (`AMENDMENT_NOT_AVAILABLE`), and
`details[0].reason` repeats `actions.amendment.availability` (`MANUAL_REVIEW` or
`NOT_AVAILABLE`). An item of another partner, or an unknown id, returns `404` with code
`10004`.
            
Send the requested change in `attributes`, in the shape the item's product defines; top-level names that
start with `_` are reserved for OpenRoam and ignored. The response
has an `amendmentRequestId`, the time the quote was made (`processedAt`), the time it expires
(`expiresAt`) and one or more `options`, each with an `id`, an `amountToPay` and an
`amountToRefund` in the API key's currency, and an `amendmentFee`: a fee for the change, already
included in those amounts, or `null` when none applies. Nothing changes and nothing is charged until
you confirm the quote with `POST /order-items/{id}/amendments/confirm`, before `expiresAt`.
            
Requires an `Idempotency-Key` header (a UUID). Repeating a completed request with the same key
returns `409` with code `12000` (`IDEMPOTENCY_KEY_ALREADY_USED`): a quote is not kept, so
request a new one with a new key. 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`: `AmendmentQuoteRequest`
- `text/json`: `AmendmentQuoteRequest`
- `application/*+json`: `AmendmentQuoteRequest`

## Responses

### 200

OK

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

### 400

Invalid partner request or model validation failure.

- `application/json`: `ErrorResponse`

### 404

Not Found

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

### 409

The idempotency key: it was used by a request that finished (12000), so use a new key for a new request; 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).

- `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.