Eventlayer / Understand the model
Check-in
Record one admission against an assigned ticket and handle the result in your scanner.
Your scanner reads a ticket. Your backend asks Eventlayer to record admission. The ticket state on the server determines whether the operation succeeds.
- 01Your scanner
- 02Your backend
- 03Eventlayer check-in
- 04Admit / explain
Make the transition
Check-in requires an assigned ticket and an active ticket type. Use a fresh, disposable ticket: check-in cannot be reversed.
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"
}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.