Respond to a Scan

When you receive a scan POST request, you need to return the following data:

Response Body

PropertyTypeDefaultDescriptionExample
success*booleanWhether the scanner should react successfully or failtrue
messagestringnullMessage that the scanner will show"Entrance ticket Ok!"
iconstringnullWhich 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

Copy
{ "success": true, "message": "Entrance ticket valid!", "icon": "CHECK_MARK" }

Failed Scan

Copy
{ "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
Previous
Receive Scan