Skip to content

Code

A code is a public token. A scanner reads it, the platform recognizes it through GET /api/resolve/{code}, and whatever actions are bound to it run. No auth on the resolve, no login on the device. That property is what makes codes the bridge between the world outside the app and the platform: a sticker on a meeting room door, a placard at a charging station, a link inside an email.

For the call sequence (create the code, attach an action, scan it) see QR Code Scan Flow.

Shape

FieldPurpose
valueUnique scannable token. Concatenated with the server endpoint to form the resolve URL embedded in the QR image and used as the shareable link.
nameIdentifier shown in admin tooling
descriptionFree text rationale
dataFree form JSON payload returned at resolve time and made available to actions on the code_scanned trigger
stylingServer side QR rendering settings
asset_idOptional asset overlaid as a logo at the center of the generated QR image
expires_atOptional cutoff. After this instant the code no longer resolves.
owner_idOwning organization

Resolving and Sharing

The token in value is concatenated with the server endpoint to form <endpoint>/api/resolve/<value>. That URL is both:

  • The string encoded into the generated QR image, so scanning the code lands on the resolve endpoint.
  • A plain link you can share directly through any channel. The receiver follows the link in a browser and the resolve endpoint returns the code, its data payload and the associated objects.

GET /api/resolve/{code} requires no authentication. Expired and soft deleted codes return no result.

Actions on Code Scan

Codes carry actions with the code_scanned trigger. When the code resolves, bound actions run with the code and its data in the context. Actions are managed through the code's sub resource endpoints so the scan behavior stays with the code that triggers it.

Styling

styling.color.foreground and styling.color.background are hex colors applied by the server when generating the QR image. background: "transparent" produces a transparent background. When styling is unset the server falls back to the deployment defaults configured by environment variables. The styling fields are not consumed by frontends; the rendered image arrives with the colors already baked in.

When asset_id is set, the referenced asset is resized and placed at the center of the QR image as a logo. The asset must be a supported image MIME type.

API

The Code tag of the Bookable API covers code CRUD, the code audit log, actions bound to the code, and the public GET /api/resolve/{code} lookup used by scanners and shared links.