/public/v1/access, but they are not
developer Public API resources. They keep the existing gate/device validation
contract and use device-key authentication instead of OAuth client credentials.
Use these endpoints for turnstiles, door controllers, badge scanners, and other
edge devices that need an immediate allow/deny decision.
Authentication
Every access-device request must include a device key:x-device-key. Runtime also accepts the legacy aliases
x-access-device-key and x-api-key for access-device requests only. Do not use
those aliases for developer Public API resources.
Device keys must be hex strings with at least 32 characters. Missing, malformed,
inactive, or unknown device keys return 401 DEVICE_NOT_AUTHORIZED.
The company context is resolved from the configured access device. Use the
device key for /public/v1/access/*; Public API OAuth tokens are for developer
API resources.
Response envelope
Access-device endpoints use the FITsociety application envelope, not the developer Public API{ data, meta } envelope:
Check device health
Example
Success response
Auth errors
Validate access
- QR validation:
qrToken - Partner credential validation:
credentialType,credentialValue,scanId
qrToken is present, the request is treated as QR validation.
QR request
QR retries are idempotent through the QR session ID embedded in the signed
token.
Partner credential request
Partner credential scans are gated by the company access-control credential
method settings. If the credential method is disabled, the endpoint returns an
access decision with
allowed=false.
Decision response
Access decisions return HTTP200 even when access is denied. Read
data.allowed and data.reasonCode.
openDurationSeconds may be included:
Decision fields
Decision codes
Validation errors
Malformed credential requests return client errors:
Client and auth errors use the application error envelope:
Rate limit
Access validation is rate limited per access device.
When the rate limit is exceeded, the endpoint still returns HTTP
200 with a
denied access decision:
Security notes
- Store device keys as secrets on the edge device.
- Prefer
x-device-key; legacy aliases are accepted only for compatibility. - Do not log full QR tokens, credential values, device keys, or OAuth tokens.
- Use a stable
scanIdfor partner credential retries to prevent duplicate physical scan processing. - Treat any unknown
reasonCodeas denied.