Build a flow
Eventlayer / Build a flow
Build a check-in app
Scan a ticket and record admission with one API call.
Your scanner reads a ticket ID. Your backend asks Eventlayer to check it in.
- 01Scan ticket
- 02Your backend
- 03Check in
- 04Admit
Use an assigned test ticket. Check-in is one-time and cannot be undone.
Check in the ticket
Authenticate staff and confirm the ticket belongs at this door before making the call. Keep your API key on the backend.
import { Eventlayer } from "eventlayer";
const eventlayer = new Eventlayer();
const { data: ticket, error } = await eventlayer.tickets.checkIn({
ticketId: "tkt_your_ticket",
});
if (error) throw error;
console.log(ticket.status); // checked_inA successful response records admission. If two scanners submit the same ticket, only one can complete its first check-in.
Show the result
| Result | Scanner message |
|---|---|
| Success | Checked in |
| TICKET_ALREADY_CHECKED_IN | Already checked in |
| FAILED_PRECONDITION | Ticket unavailable |
| NOT_FOUND | Ticket not found |
If the response is lost, show an unknown result for staff to review. See errors and recovery for handling failures.
Next steps
React to check-in events to update your CRM or send a follow-up.