- Clone the repository.
- Run docker-compose up.
- The server will be running on http://127.0.0.1:8080.
- Prefix: /api (e.g. http://127.0.0.1:8080/api)
Creates a new user.
User
(object, required)name
(string, required) - The name of the user.
200
- Successful operation. Returns the created user.400
- Bad request. The user data is invalid.422
- Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors.500
- Internal server error. An error occurred on the server.
Gets the batches by user ID.
id
(string, required) - The ID of the user.
200
- Successful operation. Returns the batches of the user.500
- Internal server error. An error occurred on the server.
Creates a new batch.
Batch
(object, required)id
(string, required) - The ID of the batch.name
(string, required) - The name of the batch.user_id
(string, required) - The ID of the user.amount_qrs
(number, required) - The amount of QRs of the batch.
200
- Successful operation. Returns the created batch.400
- Bad request. The batch data is invalid.422
- Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors.500
- Internal server error. An error occurred on the server.
Downloads the PDF of the batch by batch ID.
id
(string, required) - The ID of the batch.
200
- Successful operation. Returns the PDF of the batch.500
- Internal server error. An error occurred on the server.
Get the batch with the QR number. This endpoint is used when the user scans a QR code.
id
(string, required) - The ID of the batch.qr_number
(string, required) - The QR number of the batch.