Check-In API Documentation
Overview
The check-in functionality is designed to allow event organizers to verify tickets by scanning a QR code.
Login
Before an organizer can use the check-in functionality, they must first authenticate themselves.
Endpoint: /api/v1/auth/login
Method: POST
This endpoint accepts a JSON payload with the following structure:
{
"username": "<username>",
"password": "<password>"
}
On successful authentication, the server responds with a JSON object containing a JWT token, which must be included in the Authorization header of subsequent requests.
Check-In
Once authenticated, an organizer can use the check-in functionality.
Endpoint: /api/v1/organizer/checkin
Method: POST
This endpoint accepts a JSON payload with the following structure:
{
"qrCode": "<qrCode>"
}
The qrCode field shall contain the text data of the ticket to be checked in, encoded in the form of a QR Code.
The server performs several checks to validate the ticket:
- The ticket exists and its status is either
PURCHASEDorCHECKED_IN. - The event associated with the ticket has not passed.
- The ticket is owned by the authenticated organizer.
If all checks pass, the server responds with a JSON object containing the details of the ticket and a success message. If the ticket is already checked in, the server responds with a message indicating this.
If any of the checks fail, the server responds with an appropriate error message.