# Exchanges

> Upgrades, day swaps and added add-ons without a refund and rebuy

Source: https://rcms-tickets-test.web.app/docs/reference/exchanges

Every operation below is also in [the OpenAPI document](https://rcms-tickets-test.web.app/v1/openapi.yaml). One that names an MCP tool can be called through [the MCP server](https://rcms-tickets-test.web.app/docs/mcp.md); one that names none cannot.

## List exchanges

`GET /v1/exchanges`

Operation id `listExchanges`. MCP tool `list_exchanges`. SDK `tickets.exchanges.list`.

Exchanges (upgrades, day swaps, added add-ons), newest first, filtered by order or status.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `read` (owner, admin, staff, viewer).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | integer | How many to return, 1 to 100 (default 20). |
| `starting_after` | query | string | An id from the page before: the page after it. |
| `ending_before` | query | string | An id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other… |
| `order` | query | string | An id starting with ord_. |
| `status` | query | "quoted" \| "completed" \| "cancelled" \| "expired" | quoted, completed, cancelled, expired. |
| `created_gte` | query | string (date-time) | Only those created at or after this instant. |
| `created_lt` | query | string (date-time) | Only those created before this instant. |

**Answers 200.** A page of exchanges.

**Fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "list" |  |
| `data` * | array of Exchange | This page, newest first. |
| `has_more` * | boolean | True when there is another page: pass the last id as starting_after. |
| `url` * | "/v1/exchanges" | The path this list came from (/v1/exchanges). |

\* required

## Quote an upgrade, day swap or added add-on

`POST /v1/exchanges`

Operation id `createExchange`. MCP tool `create_exchange`. SDK `tickets.exchanges.create`.

Quotes a change to an order's tickets without a refund and rebuy: an upgrade, a day swap or an added add-on. The quote holds the new items for a short time and says what is owed or given back. One ticket moving to a type of the same price keeps what it was paid: nothing is due and no use of a code is spent (`price.same_price`). Otherwise new items are priced now, without the order's discount unless you send `code` again. A code with a limited number of uses can't be sent here.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `refunds.write` (owner, admin, staff).

**Request body** (`CreateExchangeInput`)

| Field | Type | Description |
| --- | --- | --- |
| `order` * | string | An id starting with ord_. |
| `changes` * | array of ExchangeChangeInput |  |
| `code` | string | A promo or access code as typed; case does not matter. |

\* required

```json
{
  "order": "ord_abc123",
  "changes": [
    {
      "kind": "add_add_on",
      "add_on": "add_drinks",
      "quantity": 1,
      "ticket": "tkt_ga001"
    }
  ]
}
```

**Answers 201.** The quote, with the new items held.

**Fields** (`Exchange`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "exchange" |  |
| `id` * | string | An id starting with exc_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `order` * | string | An id starting with ord_. |
| `event` * | string | An id starting with evt_. |
| `status` * | ExchangeStatus | quoted, completed, cancelled, expired. |
| `changes` * | array of object |  |
| `price` * | object |  |
| `hold` * | string \| null | Holds the new items while quoted. |
| `quote_expires_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `payment` * | Payment \| null | The top-up, once confirmed with something due (also appended to the order's payments). |
| `refund` * | string \| null | An id starting with rfd_. |
| `issued` * | array of string | New scannable add-on passes it issued. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `completed_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `cancelled_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

**Errors of its own.** [`order_not_refundable`](https://rcms-tickets-test.web.app/docs/errors.md#order_not_refundable), [`order_disputed`](https://rcms-tickets-test.web.app/docs/errors.md#order_disputed), [`ticket_void`](https://rcms-tickets-test.web.app/docs/errors.md#ticket_void), [`ticket_frozen`](https://rcms-tickets-test.web.app/docs/errors.md#ticket_frozen), [`ticket_checked_in`](https://rcms-tickets-test.web.app/docs/errors.md#ticket_checked_in), [`sold_out`](https://rcms-tickets-test.web.app/docs/errors.md#sold_out), [`quantity_unavailable`](https://rcms-tickets-test.web.app/docs/errors.md#quantity_unavailable), [`ticket_type_unavailable`](https://rcms-tickets-test.web.app/docs/errors.md#ticket_type_unavailable), [`too_many_tickets`](https://rcms-tickets-test.web.app/docs/errors.md#too_many_tickets), [`code_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#code_invalid), [`code_exhausted`](https://rcms-tickets-test.web.app/docs/errors.md#code_exhausted), [`invalid_state_transition`](https://rcms-tickets-test.web.app/docs/errors.md#invalid_state_transition), [`add_on_requires_ticket`](https://rcms-tickets-test.web.app/docs/errors.md#add_on_requires_ticket), [`refund_exceeds_remaining`](https://rcms-tickets-test.web.app/docs/errors.md#refund_exceeds_remaining), [`comp_upgrade_not_allowed`](https://rcms-tickets-test.web.app/docs/errors.md#comp_upgrade_not_allowed). The errors every operation can answer are on [the errors page](https://rcms-tickets-test.web.app/docs/errors.md).

## Retrieve an exchange

`GET /v1/exchanges/{id}`

Operation id `getExchange`. MCP tool `get_exchange`. SDK `tickets.exchanges.retrieve`.

One exchange with its quote: what changes, what is owed or given back, and when the quote expires.

**Who may call it.** Any one of: An API key with scope `full`, `read`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `read` (owner, admin, staff, viewer).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with exc_. |

**Answers 200.** The exchange.

**Fields** (`Exchange`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "exchange" |  |
| `id` * | string | An id starting with exc_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `order` * | string | An id starting with ord_. |
| `event` * | string | An id starting with evt_. |
| `status` * | ExchangeStatus | quoted, completed, cancelled, expired. |
| `changes` * | array of object |  |
| `price` * | object |  |
| `hold` * | string \| null | Holds the new items while quoted. |
| `quote_expires_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `payment` * | Payment \| null | The top-up, once confirmed with something due (also appended to the order's payments). |
| `refund` * | string \| null | An id starting with rfd_. |
| `issued` * | array of string | New scannable add-on passes it issued. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `completed_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `cancelled_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

## Pay the difference and make the change

`POST /v1/exchanges/{id}/confirm`

Operation id `confirmExchange`. MCP tool `confirm_exchange`. SDK `tickets.exchanges.confirm`.

Pays the difference and makes the change: the old tickets are replaced by reissued ones. If the new items cost less, confirm with `refund_difference: true`. A quote that has expired answers `exchange_quote_expired`: make a new one.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `refunds.write` (owner, admin, staff).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with exc_. |

**Request body** (`ConfirmExchangeInput`)

| Field | Type | Description |
| --- | --- | --- |
| `payment` | PaymentInput | Needed when due is more than 0 (external: amount = due). |
| `refund_difference` | boolean | Must be true when refund is more than 0: the difference goes back as a refund. |
| `notify` | boolean |  |

```json
{
  "payment": {
    "provider": "test",
    "token": "tok_success"
  }
}
```

**Answers 200.** Completed; the tickets are reissued.

**Fields** (`Exchange`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "exchange" |  |
| `id` * | string | An id starting with exc_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `order` * | string | An id starting with ord_. |
| `event` * | string | An id starting with evt_. |
| `status` * | ExchangeStatus | quoted, completed, cancelled, expired. |
| `changes` * | array of object |  |
| `price` * | object |  |
| `hold` * | string \| null | Holds the new items while quoted. |
| `quote_expires_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `payment` * | Payment \| null | The top-up, once confirmed with something due (also appended to the order's payments). |
| `refund` * | string \| null | An id starting with rfd_. |
| `issued` * | array of string | New scannable add-on passes it issued. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `completed_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `cancelled_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

**Errors of its own.** [`exchange_quote_expired`](https://rcms-tickets-test.web.app/docs/errors.md#exchange_quote_expired), [`payment_required`](https://rcms-tickets-test.web.app/docs/errors.md#payment_required), [`exchange_refund_required`](https://rcms-tickets-test.web.app/docs/errors.md#exchange_refund_required), [`amount_mismatch`](https://rcms-tickets-test.web.app/docs/errors.md#amount_mismatch), [`payment_declined`](https://rcms-tickets-test.web.app/docs/errors.md#payment_declined), [`payment_failed`](https://rcms-tickets-test.web.app/docs/errors.md#payment_failed), [`provider_unavailable`](https://rcms-tickets-test.web.app/docs/errors.md#provider_unavailable), [`invalid_state_transition`](https://rcms-tickets-test.web.app/docs/errors.md#invalid_state_transition), [`order_not_refundable`](https://rcms-tickets-test.web.app/docs/errors.md#order_not_refundable), [`payment_reference_conflict`](https://rcms-tickets-test.web.app/docs/errors.md#payment_reference_conflict), [`ticket_void`](https://rcms-tickets-test.web.app/docs/errors.md#ticket_void). The errors every operation can answer are on [the errors page](https://rcms-tickets-test.web.app/docs/errors.md).

## Drop a quote

`POST /v1/exchanges/{id}/cancel`

Operation id `cancelExchange`. MCP tool `cancel_exchange`. SDK `tickets.exchanges.cancel`.

Drops a quote that was not confirmed and gives the items it held back to the pool.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `refunds.write` (owner, admin, staff).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with exc_. |

**Answers 200.** Cancelled; the held items are back.

**Fields** (`Exchange`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "exchange" |  |
| `id` * | string | An id starting with exc_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `order` * | string | An id starting with ord_. |
| `event` * | string | An id starting with evt_. |
| `status` * | ExchangeStatus | quoted, completed, cancelled, expired. |
| `changes` * | array of object |  |
| `price` * | object |  |
| `hold` * | string \| null | Holds the new items while quoted. |
| `quote_expires_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `payment` * | Payment \| null | The top-up, once confirmed with something due (also appended to the order's payments). |
| `refund` * | string \| null | An id starting with rfd_. |
| `issued` * | array of string | New scannable add-on passes it issued. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `completed_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `cancelled_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

**Errors of its own.** [`invalid_state_transition`](https://rcms-tickets-test.web.app/docs/errors.md#invalid_state_transition). The errors every operation can answer are on [the errors page](https://rcms-tickets-test.web.app/docs/errors.md).
