# Check-in (/docs/check-in)



Your scanner reads a ticket. Your backend asks Eventlayer to record admission.
The ticket state on the server determines whether the operation succeeds.

<DocsFlow label="At the door" steps="[&#x22;Your scanner&#x22;, &#x22;Your backend&#x22;, &#x22;Eventlayer check-in&#x22;, &#x22;Admit / explain&#x22;]" />

## Make the transition [#make-the-transition]

Check-in requires an assigned ticket and an active ticket type. Use a fresh,
disposable ticket: check-in cannot be reversed.

```ts title="check-in.ts · server only · API key"
const { data: ticket, error } = await eventlayer.tickets.checkIn({
  ticketId: "tkt_from_your_scanner",
});

if (error) {
  console.error(error.code, error.requestId);
} else {
  console.log(ticket.status); // "checked_in"
}
```

<GuideOutcome>
  One successful admission changes the ticket to `checked_in`. A second scan
  receives `TICKET_ALREADY_CHECKED_IN`; it must not show another admission success.
</GuideOutcome>

## Explain each result [#explain-each-result]

| Result                             | Meaning                                            | Your scanner should        |
| ---------------------------------- | -------------------------------------------------- | -------------------------- |
| `200`, ticket is `checked_in`      | This request recorded admission                    | Show success               |
| `409`, `TICKET_ALREADY_CHECKED_IN` | The ticket was already used                        | Ask staff to review        |
| `409`, `FAILED_PRECONDITION`       | Current ticket or ticket-type state prevents entry | Show the reason            |
| `404`, `NOT_FOUND`                 | No accessible ticket was found                     | Reject the lookup          |
| No response                        | Outcome is unknown                                 | Reconcile before admitting |

Two scanners can read the same assigned ticket at once. Only one can complete
its first check-in. A prior lookup is not authority to admit a guest.

Your backend also authenticates staff and checks that the ticket belongs at
this entry point. An API key grants workspace access; it does not implement your
staff permissions or venue policy.

<DocsLinks
  items="[
{ title: &#x22;Build a check-in app&#x22;, description: &#x22;Add staff access, ticket lookup, scope validation and recovery.&#x22;, href: &#x22;/docs/guides/check-in&#x22; },
{ title: &#x22;Ticket lifecycle&#x22;, description: &#x22;Understand the states before and after admission.&#x22;, href: &#x22;/docs/tickets&#x22; },
]"
/>
