Scan API
Record barcode/QR scans to validate passes and trigger downstream events (redemption, attendance, CRM signals).
Scan API
The Scan API records a barcode or QR scan, then correlates it to a pass. This creates a reliable “in-store / at-venue” signal that downstream systems can use for redemption flows, attendance tracking, or CRM automation.
Real-world examples
Retail loyalty: record a scan at checkout to trigger post-visit automation.
Event entry: record gate scans to track attendance and prevent reuse.
Voucher redemption: record scans to mark an offer as consumed.
When Scan API is needed
Barcode/QR hardware can read the value displayed on a pass. The Scan API is the piece that makes that scan actionable in The Wallet Crew.
When the Scan API is invoked, The Wallet Crew can:
identify which pass was scanned
record the scan event with timestamp and symbology
emit downstream events for connected systems
The Scan API does not replace operational validation logic. It provides a scan record and correlation. Redemption rules, anti-fraud, and privilege consumption depend on the chosen workflow.
Endpoint
The Scan API is exposed as a tenant-scoped endpoint:
POST /api/{tenantId}/scansAuthentication and authorization
The Scan API requires an identity allowed to record scans.
Common patterns are:
API key authentication (
X-API-KEY) for server-to-server calls from a POS backend.OAuth 2.0 Bearer token for admin/user identities.
The effective authorization model depends on tenant configuration. In the OpenAPI definition, this endpoint requires the PassScan.Scan scope.
Request payload
The request is a JSON object with two fields:
data: the raw decoded value read by the scanner.type: the scan input type (symbology).
Example:
type values
type valuestype is an enum. Common values are:
qrcodepdf417code128ean13datamatrixnfcmanual(when staff types a code)
data is treated as an opaque identifier. Keeping it stable matters more than keeping it human-readable. Formatting changes (trim, leading zeros, separators) are common causes of correlation failures.
Response
On success, the API responds with the pass identifier correlated from the scan:
If correlation fails, the API can return 404.
Implementation notes
A scanning system can call the Scan API either directly (when network access is available) or via a backend relay.
Calling from a backend relay is common. It keeps secrets out of scanning devices and allows enrichment, logging, and retry policies.
Validate the integration
A minimal validation sequence is:
Use a real pass issued by The Wallet Crew.
Scan its barcode/QR and capture the decoded value.
Call
POST /api/{tenantId}/scanswithdataandtype.Confirm a
201response and a non-nullpassId.Confirm the downstream signal is received (for example,
wallet_scannedin Bloomreach).
Troubleshooting
404 Not Found
404 Not FoundThe scanned value did not match any pass.
Common causes are barcode formatting differences, missing prefixes/suffixes, or a mismatch between template barcode configuration and scanner decoding.
400 Bad Request
400 Bad RequestThe payload failed validation.
Common causes are missing fields, data length outside limits, or an invalid type.
401 Unauthorized
401 UnauthorizedThe credentials are missing, invalid, or do not have the required scope.
FAQ
Does every barcode scan trigger a CRM event?
Only scans recorded through the Scan API are known to The Wallet Crew as scan events.
When recorded, the scan can be forwarded to connected systems such as Bloomreach as a wallet_scanned event.
Last updated

