Respond to a Scan
When you receive a scan POST request, you need to return the following data:
Response Body
| Property | Type | Default | Description | Example |
|---|---|---|---|---|
success* | boolean | Whether the scanner should react successfully or fail | true | |
message | string | null | Message that the scanner will show | "Entrance ticket Ok!" |
icon | string | null | Which icon to show. Can be omitted. | "CHECK_MARK" |
Icon Options
CHECK_MARK- Shows a checkmark icon (for successful scans)WARNING- Shows a warning icon (for failed or attention-needed scans)
Example Responses
Successful Scan
{ "success": true, "message": "Entrance ticket valid!", "icon": "CHECK_MARK" }
Failed Scan
{ "success": false, "message": "Entrance ticket already used!", "icon": "WARNING" }
Best Practices
- Always return a meaningful message to help the scanner operator understand the result
- Use the appropriate icon to provide visual feedback
- Keep messages concise but informative