# Check-in

> The door: scans, undo, the offline manifest and sync, conflicts, counts, look-up, QR public keys

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

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.

## The public keys for checking QR codes offline

`GET /v1/events/{id}/qr_keys`

Operation id `listQrKeys`. MCP tool `list_qr_keys`. SDK `tickets.events.qrKeys`.

The public keys that verify a ticket's QR code, retired ones too. A door app with a key or a member's session downloads these once and then checks QR codes with no network. A paired door device takes no key: its keys come in `GET /v1/events/{id}/checkin_manifest`.

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

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

**Answers 200.** Every key, retired ones too.

**Fields**

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

\* required

## List scans. A door member or checkin key names the event and reads its last hour (ticket= reads one ticket at any time), and rows are counted against a daily budget: to watch a door, poll checkin_stats

`GET /v1/checkins`

Operation id `listCheckins`. MCP tool `list_checkins`. SDK `tickets.checkins.list`.

Scans, newest first. A door member or a `checkin` key must name the event and reads only its last hour (a ticket's own history at any time), counted against a daily budget. To watch a door, poll `GET /v1/events/{id}/checkin_stats` instead.

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

| 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… |
| `handed_in` | query | "true" | Only what reached the server from a phone already turned off. |
| `event` | query | string | Required for a door member or a checkin key. |
| `day` | query | string | An id starting with day_. |
| `gate` | query | string |  |
| `device` | query | string | An id starting with dev_. |
| `ticket` | query | string | An id starting with tkt_. |
| `result` | query | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" |  |
| `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 scans.

**Fields**

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

\* required

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

## Scan or look up a ticket at the door

`POST /v1/checkins`

Operation id `createCheckin`. MCP tool `create_checkin`. SDK `tickets.checkins.create`.

Scans or looks up a ticket at the door. Send the QR `token`, or a `ticket` id from a look-up. A refusal (`already_in`, `wrong_day`, `not_valid`, `frozen`, `wrong_event`) is still a 201: read `result`.

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

**Request body** (`CreateCheckinInput`)

| Field | Type | Description |
| --- | --- | --- |
| `token` | string | The QR code's text. |
| `ticket` | string | Instead of a token: a manual look-up. |
| `event` | string | The event at this door (a device knows its own). |
| `day` | string | Default: the day on at the venue now, from its doors to 3 hours after its end. Before doors, the day dated today counts too. |
| `gate` | string | A device's own gate is used when it has one. |
| `id_checked` | boolean | The person at the door looked at their ID. Recorded on the admission of a ticket with a min_age (the check-in's actor is who said so); without it the ticket is still admitted, and the answer says Check ID. |

```json
{
  "token": "RT1.eyJ0IjoidGt0X2dhMDAxIn0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
  "gate": "Gate B"
}
```

**Answers 201.** The result (refusals are 201 too: result says).

**Fields** (`Checkin`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin" |  |
| `id` * | string | An id starting with chk_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `result` * | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" | admitted; already_in (see previous); wrong_day; not_valid (see reason); frozen (disputed: "See the box office"); wrong_event; refund_pending (a refund on its way will void this ticket: not admitted, "See the box office"… |
| `reason` * | "void" \| "transferred" \| "reissued" \| "bad_signature" \| "unknown_ticket" \| "event_cancelled" \| "device_revoked" \| null | For not_valid: void, transferred (an older QR after a transfer), reissued, bad_signature, unknown_ticket, event_cancelled, device_revoked (a phone scanned it after it was revoked: never an admission, and a conflict says… |
| `ticket` * | DoorTicket \| null | null when the token was not one of ours. |
| `day` * | string \| null | An id starting with day_. |
| `gate` * | string \| null |  |
| `device` * | string \| null | An id starting with dev_. |
| `method` * | "scan" \| "manual" \| "sync" |  |
| `reentry` * | boolean | Admitted again the same day (the event allows re-entry). |
| `previous` * | object | For already_in: the first admission today. |
| `ticket_version` * | integer \| null | The version the QR carried. |
| `ticket_changed_at` * | string \| null | For not_valid transferred or reissued: when the version this QR carried was replaced ("Sent to someone else on Mar 14"). Only the date, never who it went to. null otherwise. |
| `scanned_at` * | string (date-time) | When the scan happened (a device's clock, for a synced offline scan). |
| `recorded_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `undo_until` * | string \| null | Admitted: may be undone until then (60 seconds). |
| `undone_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `actor` * | Actor | Who made a change. |
| `handed_in` | boolean | This record reached the server from a phone already turned off. Absent otherwise. A manager can take back all of a phone's with POST /v1/devices/{id}/hand_in. |
| `id_checked` | boolean | The person at the door said they looked at the ID before this admission (a gate sale's or a look-up's "ID OK"). actor is who said so. The server can only record their word. Absent: not recorded. A QR scan's Check ID com… |

\* required

**Errors of its own.** [`device_token_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#device_token_invalid), [`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).

## Retrieve a scan

`GET /v1/checkins/{id}`

Operation id `getCheckin`. MCP tool `get_checkin`. SDK `tickets.checkins.retrieve`.

One scan with its result (`admitted`, `already_in`, `wrong_day`...), the ticket, the day, the gate and the device.

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

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

**Answers 200.** The scan.

**Fields** (`Checkin`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin" |  |
| `id` * | string | An id starting with chk_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `result` * | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" | admitted; already_in (see previous); wrong_day; not_valid (see reason); frozen (disputed: "See the box office"); wrong_event; refund_pending (a refund on its way will void this ticket: not admitted, "See the box office"… |
| `reason` * | "void" \| "transferred" \| "reissued" \| "bad_signature" \| "unknown_ticket" \| "event_cancelled" \| "device_revoked" \| null | For not_valid: void, transferred (an older QR after a transfer), reissued, bad_signature, unknown_ticket, event_cancelled, device_revoked (a phone scanned it after it was revoked: never an admission, and a conflict says… |
| `ticket` * | DoorTicket \| null | null when the token was not one of ours. |
| `day` * | string \| null | An id starting with day_. |
| `gate` * | string \| null |  |
| `device` * | string \| null | An id starting with dev_. |
| `method` * | "scan" \| "manual" \| "sync" |  |
| `reentry` * | boolean | Admitted again the same day (the event allows re-entry). |
| `previous` * | object | For already_in: the first admission today. |
| `ticket_version` * | integer \| null | The version the QR carried. |
| `ticket_changed_at` * | string \| null | For not_valid transferred or reissued: when the version this QR carried was replaced ("Sent to someone else on Mar 14"). Only the date, never who it went to. null otherwise. |
| `scanned_at` * | string (date-time) | When the scan happened (a device's clock, for a synced offline scan). |
| `recorded_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `undo_until` * | string \| null | Admitted: may be undone until then (60 seconds). |
| `undone_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `actor` * | Actor | Who made a change. |
| `handed_in` | boolean | This record reached the server from a phone already turned off. Absent otherwise. A manager can take back all of a phone's with POST /v1/devices/{id}/hand_in. |
| `id_checked` | boolean | The person at the door said they looked at the ID before this admission (a gate sale's or a look-up's "ID OK"). actor is who said so. The server can only record their word. Absent: not recorded. A QR scan's Check ID com… |

\* required

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

## Undo an admission (60 seconds)

`POST /v1/checkins/{id}/undo`

Operation id `undoCheckin`. MCP tool `undo_checkin`. SDK `tickets.checkins.undo`.

Undoes an admission within 60 seconds, for a scan made by mistake. After that, a manager uses `POST /v1/checkins/{id}/correct`.

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

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

**Answers 200.** Undone.

**Fields** (`Checkin`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin" |  |
| `id` * | string | An id starting with chk_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `result` * | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" | admitted; already_in (see previous); wrong_day; not_valid (see reason); frozen (disputed: "See the box office"); wrong_event; refund_pending (a refund on its way will void this ticket: not admitted, "See the box office"… |
| `reason` * | "void" \| "transferred" \| "reissued" \| "bad_signature" \| "unknown_ticket" \| "event_cancelled" \| "device_revoked" \| null | For not_valid: void, transferred (an older QR after a transfer), reissued, bad_signature, unknown_ticket, event_cancelled, device_revoked (a phone scanned it after it was revoked: never an admission, and a conflict says… |
| `ticket` * | DoorTicket \| null | null when the token was not one of ours. |
| `day` * | string \| null | An id starting with day_. |
| `gate` * | string \| null |  |
| `device` * | string \| null | An id starting with dev_. |
| `method` * | "scan" \| "manual" \| "sync" |  |
| `reentry` * | boolean | Admitted again the same day (the event allows re-entry). |
| `previous` * | object | For already_in: the first admission today. |
| `ticket_version` * | integer \| null | The version the QR carried. |
| `ticket_changed_at` * | string \| null | For not_valid transferred or reissued: when the version this QR carried was replaced ("Sent to someone else on Mar 14"). Only the date, never who it went to. null otherwise. |
| `scanned_at` * | string (date-time) | When the scan happened (a device's clock, for a synced offline scan). |
| `recorded_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `undo_until` * | string \| null | Admitted: may be undone until then (60 seconds). |
| `undone_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `actor` * | Actor | Who made a change. |
| `handed_in` | boolean | This record reached the server from a phone already turned off. Absent otherwise. A manager can take back all of a phone's with POST /v1/devices/{id}/hand_in. |
| `id_checked` | boolean | The person at the door said they looked at the ID before this admission (a gate sale's or a look-up's "ID OK"). actor is who said so. The server can only record their word. Absent: not recorded. A QR scan's Check ID com… |

\* required

**Errors of its own.** [`device_token_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#device_token_invalid), [`undo_window_passed`](https://rcms-tickets-test.web.app/docs/errors.md#undo_window_passed), [`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).

## Record that the door looked at the ID

`POST /v1/checkins/{id}/id_ok`

Operation id `recordCheckinIdOk`. MCP tool `record_checkin_id_ok`. SDK `tickets.checkins.idOk`.

Records that the person at the door looked at the ID, on an admission of a ticket with an age limit. Whoever scanned it says so, once or twice: it changes nothing else, and the server can only record their word.

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

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

**Answers 200.** The check-in, with id_checked.

**Fields** (`Checkin`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin" |  |
| `id` * | string | An id starting with chk_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `result` * | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" | admitted; already_in (see previous); wrong_day; not_valid (see reason); frozen (disputed: "See the box office"); wrong_event; refund_pending (a refund on its way will void this ticket: not admitted, "See the box office"… |
| `reason` * | "void" \| "transferred" \| "reissued" \| "bad_signature" \| "unknown_ticket" \| "event_cancelled" \| "device_revoked" \| null | For not_valid: void, transferred (an older QR after a transfer), reissued, bad_signature, unknown_ticket, event_cancelled, device_revoked (a phone scanned it after it was revoked: never an admission, and a conflict says… |
| `ticket` * | DoorTicket \| null | null when the token was not one of ours. |
| `day` * | string \| null | An id starting with day_. |
| `gate` * | string \| null |  |
| `device` * | string \| null | An id starting with dev_. |
| `method` * | "scan" \| "manual" \| "sync" |  |
| `reentry` * | boolean | Admitted again the same day (the event allows re-entry). |
| `previous` * | object | For already_in: the first admission today. |
| `ticket_version` * | integer \| null | The version the QR carried. |
| `ticket_changed_at` * | string \| null | For not_valid transferred or reissued: when the version this QR carried was replaced ("Sent to someone else on Mar 14"). Only the date, never who it went to. null otherwise. |
| `scanned_at` * | string (date-time) | When the scan happened (a device's clock, for a synced offline scan). |
| `recorded_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `undo_until` * | string \| null | Admitted: may be undone until then (60 seconds). |
| `undone_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `actor` * | Actor | Who made a change. |
| `handed_in` | boolean | This record reached the server from a phone already turned off. Absent otherwise. A manager can take back all of a phone's with POST /v1/devices/{id}/hand_in. |
| `id_checked` | boolean | The person at the door said they looked at the ID before this admission (a gate sale's or a look-up's "ID OK"). actor is who said so. The server can only record their word. Absent: not recorded. A QR scan's Check ID com… |

\* required

**Errors of its own.** [`device_token_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#device_token_invalid), [`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).

## Send offline scans

`POST /v1/checkins/sync`

Operation id `syncCheckins`.

Sends the scans a door phone made offline. Each scan answers with the server's own result, and with a conflict if the phone and server disagree (two phones admitted the same ticket). Only a door device may call it. A revoked device still may, for 24 hours from the revoke, and may do nothing else: it gets a receipt, a scan dated before the revoke is a record, and a later one is a conflict for a person, never an admission.

**Who may call it.** A door device, for its own event.

**Request body** (`SyncCheckinsInput`)

| Field | Type | Description |
| --- | --- | --- |
| `scans` * | array of object |  |
| `pending_after` | integer | How many more scans the phone holds besides these (Device.pending_scans). Leave it out when none. |

\* required

```json
{
  "scans": [
    {
      "local_id": "scan-1",
      "token": "RT1.eyJ0IjoidGt0X2dhMDAxIn0.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "day": "day_fri",
      "scanned_at": "2027-03-01T15:00:00Z",
      "local_result": "admitted"
    }
  ]
}
```

**Answers 200.** Each scan's server result, and its conflict if any. A revoked phone gets a receipt.

**Fields** (`SyncResult`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin_sync" |  |
| `results` * | array of object |  |

\* required

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

## The offline manifest

`GET /v1/events/{id}/checkin_manifest`

Operation id `getCheckinManifest`. MCP tool `get_checkin_manifest`. SDK `tickets.events.checkinManifest`.

Everything a door phone needs to scan offline: tickets, keys and days. `since` asks for changes after an earlier read.

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

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with evt_. |
| `since` | query | string (date-time) | Only tickets changed since then (the last generated_at). |
| `pending_scans` | query | integer \| null | A device reports how many offline scans it still holds (Device.pending_scans). Ignored from a key or session. |

**Answers 200.** Tickets, keys and days for offline scanning.

**Fields** (`CheckinManifest`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin_manifest" |  |
| `event` * | ManifestEvent | What a door device needs to know about its event, offline. |
| `generated_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `full` * | boolean | true: every ticket; false: only those changed since `since`. |
| `days` * | array of Day |  |
| `reentry` * | "deny" \| "allow" |  |
| `schema` * | 2 | The shape of this list. 2: a ticket names its type, and `type_bands` holds the bands. |
| `type_bands` * | object | The wristbands of each ticket type of the event, as they are NOW, whole on every answer: a color changed a minute ago reaches a phone on its next list, whatever `since` it asked with. A type that was deleted is here onl… |
| `keys` * | array of QrKey |  |
| `tickets` * | array of ManifestTicket |  |

\* required

**Errors of its own.** [`device_token_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#device_token_invalid), [`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).

## Live counts and the arrival curve

`GET /v1/events/{id}/checkin_stats`

Operation id `getCheckinStats`. MCP tool `get_checkin_stats`. SDK `tickets.events.checkinStats`.

Live counts of admitted and still expected, per day, gate and ticket type, plus the arrival curve. Poll this to watch a door.

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

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with evt_. |
| `day` | query | string | An id starting with day_. |

**Answers 200.** Counts per day, gate and type.

**Fields** (`CheckinStats`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin_stats" |  |
| `event` * | string | An id starting with evt_. |
| `as_of` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `days` * | array of object |  |
| `by_gate` * | array of object |  |
| `by_ticket_type` * | array of object |  |
| `curve` * | array of object | Admissions per 15 minutes per gate: the arrival curve. |

\* required

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

## Find a ticket by name, email, phone or order number (the query in the body, never the URL)

`POST /v1/checkins/lookup`

Operation id `doorLookup`. MCP tool `door_lookup`. SDK `tickets.checkins.lookup`.

Finds a ticket by a first or last name, email, phone or order number when someone has no QR. A name matches from the start of any word; several words must each match. At most 10 rows, and `has_more` says when others match: add the first name. The query goes in the body, never a URL. A `checkin` key sees guests' names in short form.

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

**Request body** (`DoorLookupInput`)

| Field | Type | Description |
| --- | --- | --- |
| `event` | string | The event at this door (a door device knows its own). |
| `q` * | string | At least 3 letters of a first or last name, from the start of any word of it (or a whole name or word of 2), a whole email, a whole phone number, an order number or a ticket code (7KQ2-M9XD-2). |
| `limit` | integer |  |

\* required

```json
{
  "event": "evt_yrd2027",
  "q": "Maria",
  "limit": 10
}
```

**Answers 200.** Matching tickets.

**Fields** (`DoorLookupResult`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "door_lookup" |  |
| `data` * | array of object |  |
| `has_more` * | boolean | True when more tickets match than this page shows, or too many shared a word to search them all: type the first name too. |

\* required

**Errors of its own.** [`device_token_invalid`](https://rcms-tickets-test.web.app/docs/errors.md#device_token_invalid), [`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).

## Take an admission back after the undo window (a manager, with a reason)

`POST /v1/checkins/{id}/correct`

Operation id `correctCheckin`. MCP tool `correct_checkin`. SDK `tickets.checkins.correct`.

A manager takes an admission back after the 60-second undo window, with a reason. The person is out of the count and the ticket can be scanned again.

**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 `devices.manage` (owner, admin, staff).

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

**Request body** (`CorrectCheckinInput`)

| Field | Type | Description |
| --- | --- | --- |
| `reason` * | string |  |

\* required

```json
{
  "reason": "Scanned the wrong ticket"
}
```

**Answers 200.** Corrected: the person is out of the count and the ticket can be scanned again.

**Fields** (`CorrectedCheckin`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin" |  |
| `id` * | string | An id starting with chk_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `result` * | "admitted" \| "already_in" \| "wrong_day" \| "not_valid" \| "frozen" \| "wrong_event" \| "refund_pending" | admitted; already_in (see previous); wrong_day; not_valid (see reason); frozen (disputed: "See the box office"); wrong_event; refund_pending (a refund on its way will void this ticket: not admitted, "See the box office"… |
| `reason` * | "void" \| "transferred" \| "reissued" \| "bad_signature" \| "unknown_ticket" \| "event_cancelled" \| "device_revoked" \| null | For not_valid: void, transferred (an older QR after a transfer), reissued, bad_signature, unknown_ticket, event_cancelled, device_revoked (a phone scanned it after it was revoked: never an admission, and a conflict says… |
| `ticket` * | DoorTicket \| null | null when the token was not one of ours. |
| `day` * | string \| null | An id starting with day_. |
| `gate` * | string \| null |  |
| `device` * | string \| null | An id starting with dev_. |
| `method` * | "scan" \| "manual" \| "sync" |  |
| `reentry` * | boolean | Admitted again the same day (the event allows re-entry). |
| `previous` * | object | For already_in: the first admission today. |
| `ticket_version` * | integer \| null | The version the QR carried. |
| `ticket_changed_at` * | string \| null | For not_valid transferred or reissued: when the version this QR carried was replaced ("Sent to someone else on Mar 14"). Only the date, never who it went to. null otherwise. |
| `scanned_at` * | string (date-time) | When the scan happened (a device's clock, for a synced offline scan). |
| `recorded_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `undo_until` * | string \| null | Admitted: may be undone until then (60 seconds). |
| `undone_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `actor` * | Actor | Who made a change. |
| `handed_in` | boolean | This record reached the server from a phone already turned off. Absent otherwise. A manager can take back all of a phone's with POST /v1/devices/{id}/hand_in. |
| `id_checked` | boolean | The person at the door said they looked at the ID before this admission (a gate sale's or a look-up's "ID OK"). actor is who said so. The server can only record their word. Absent: not recorded. A QR scan's Check ID com… |
| `correction` * | Correction \| null | Set when a manager took this check-in back past the undo window; undone_at is set too. |

\* 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).

## The check-ins managers took back, newest first (at most 200; has_more says when there are more)

`GET /v1/checkin_corrections`

Operation id `listCheckinCorrections`. MCP tool `list_checkin_corrections`. SDK `tickets.checkins.corrections`.

The admissions managers took back for one event, newest first, at most 200 (`has_more` says if there are more).

**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 |
| --- | --- | --- | --- |
| `event` * | query | string | An id starting with evt_. |

**Answers 200.** A list of corrections for one event.

**Fields**

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

\* required

## List offline conflicts

`GET /v1/checkin_conflicts`

Operation id `listCheckinConflicts`. MCP tool `list_checkin_conflicts`. SDK `tickets.checkins.conflicts`.

Conflicts found when offline scans synced, filtered by event or status (`open`, `resolved`).

**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 `checkin` (owner, admin, staff, door).

| 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… |
| `event` | query | string | An id starting with evt_. |
| `status` | query | "open" \| "resolved" |  |

**Answers 200.** A page of conflicts.

**Fields**

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

\* required

## Retrieve a conflict

`GET /v1/checkin_conflicts/{id}`

Operation id `getCheckinConflict`. MCP tool `get_checkin_conflict`. SDK `tickets.checkins.conflict`.

One conflict between an offline scan and the server, with the scans involved and how it was resolved.

**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 `checkin` (owner, admin, staff, door).

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

**Answers 200.** The conflict.

**Fields** (`CheckinConflict`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin_conflict" |  |
| `id` * | string | An id starting with cfl_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `ticket` * | string | An id starting with tkt_. |
| `ticket_type` * | string \| null | null for an add-on pass. |
| `type_name` * | string | The ticket's type or add-on name. |
| `holder_name` * | string \| null | The holder's name now (null when none was given, or erased). The check-in console shows it; a device never sees it. |
| `day` * | string | An id starting with day_. |
| `kind` * | "duplicate_admission" \| "stale_version" \| "not_valid_at_sync" \| "refund_after_admission" \| "cancel_after_admission" \| "dispute_after_admission" | duplicate_admission: two devices admitted it offline (the server's first scan won); stale_version: an offline device admitted an older QR; not_valid_at_sync: it was void, frozen or had a refund on its way when the scan… |
| `kept` * | string \| null | The admission that counts (the first the server saw). |
| `offline_scan` * | object | The scan that lost. On refund_after_admission, cancel_after_admission and dispute_after_admission, the admission itself. |
| `status` * | "open" \| "resolved" |  |
| `resolution` * | "kept_first" \| "dismissed" \| null |  |
| `note` * | string \| null |  |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `resolved_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `resolved_by` * | Actor \| null |  |

\* required

## Resolve a conflict

`POST /v1/checkin_conflicts/{id}/resolve`

Operation id `resolveCheckinConflict`. MCP tool `resolve_checkin_conflict`. SDK `tickets.checkins.resolveConflict`.

Settles a conflict: `kept_first` (the first admission stands) or `dismissed`, with an optional note.

**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 `devices.manage` (owner, admin, staff).

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

**Request body** (`ResolveConflictInput`)

| Field | Type | Description |
| --- | --- | --- |
| `resolution` * | "kept_first" \| "dismissed" |  |
| `note` | string |  |

\* required

```json
{
  "resolution": "kept_first"
}
```

**Answers 200.** Resolved.

**Fields** (`CheckinConflict`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "checkin_conflict" |  |
| `id` * | string | An id starting with cfl_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `event` * | string | An id starting with evt_. |
| `ticket` * | string | An id starting with tkt_. |
| `ticket_type` * | string \| null | null for an add-on pass. |
| `type_name` * | string | The ticket's type or add-on name. |
| `holder_name` * | string \| null | The holder's name now (null when none was given, or erased). The check-in console shows it; a device never sees it. |
| `day` * | string | An id starting with day_. |
| `kind` * | "duplicate_admission" \| "stale_version" \| "not_valid_at_sync" \| "refund_after_admission" \| "cancel_after_admission" \| "dispute_after_admission" | duplicate_admission: two devices admitted it offline (the server's first scan won); stale_version: an offline device admitted an older QR; not_valid_at_sync: it was void, frozen or had a refund on its way when the scan… |
| `kept` * | string \| null | The admission that counts (the first the server saw). |
| `offline_scan` * | object | The scan that lost. On refund_after_admission, cancel_after_admission and dispute_after_admission, the admission itself. |
| `status` * | "open" \| "resolved" |  |
| `resolution` * | "kept_first" \| "dismissed" \| null |  |
| `note` * | string \| null |  |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `resolved_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `resolved_by` * | Actor \| null |  |

\* 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).
