# Preview an item cancellation (/docs/api-reference/order-items/get-cancellation-preview)

`GET /v1/order-items/{id}/cancellation-preview`

Previews the cancellation penalty and expected refund for an order item.

Requires the `read` order permission. Returns `penaltyAmount`, the `cancellationFee` kept in
addition to it (`null` when none applies) and the expected `refundAmount`, all in the order
currency, `isRefundable`, the cancellation band in effect, priced at the penalty
(`appliedPenalties`: at most one `{ from, penaltyAmount }`), `effectiveCancellationDate` and
`checkInDate`, calculated with the same rules as the partner portal. The fee comes out of what the
penalty leaves, so the refund is never negative. `isRefundable: false` means the penalty alone keeps
the whole price, so the item cannot be cancelled; it is not an error. A fee that takes what the penalty leaves
does not make it false: the item can still be cancelled, with a refund of 0. The preview does
not cancel the item or change its state, and it does not lock the penalty: the cancel call recalculates it,
so a later cancellation band may apply.
            
The preview refuses what the cancel refuses. A delivered item of a kind that cannot take back a delivery
(airtime, utility, gift cards, eSIMs) can never be cancelled and returns `422` with code `18000`
(`CANCELLATION_NOT_SUPPORTED`). Otherwise, when the item's `actions.cancellation` is not
`available`, it returns `409` with code `18001` (`CANCELLATION_NOT_AVAILABLE`), and
`details[0].reason` repeats `actions.cancellation.availability`. A refund started by OpenRoam
support returns the same `409` with `MANUAL_REVIEW`. A delivered item is priced with its product's
cancellation rules. An item that
was not delivered has no cancellation to price: a rejected item whose automatic refund has not started
previews a full refund of what was paid (after a failed refund, the amounts that refund is retried with), with a `penaltyAmount`
of 0 and no `cancellationFee` or `appliedPenalties`. A cancellation the product refuses, for
example after check-out, returns `400` with code `10001`. An item of another partner, or an unknown
id, returns `404` with code `10004`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | yes | `string` | Order item id (`items[].id` from the order response). |

## Responses

### 200

OK

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

### 400

Invalid partner request or model validation failure.

- `application/json`: `ErrorResponse`

### 401

Unauthorized

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

### 403

Forbidden

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

### 404

Not Found

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

### 409

Conflict

- `text/plain`: `ErrorResponse`
- `application/json`: `ErrorResponse`
- `text/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`

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