Skip to main content
Access device endpoints live under /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.
Do not use Public API OAuth client credentials or Authorization: Bearer fspt_... access tokens for access devices. Use x-device-key for /public/v1/access/*.

Authentication

Every access-device request must include a device key:
The preferred header is 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

Returns a lightweight heartbeat when the device key is valid.

Example

Success response

Auth errors

Validate access

Evaluates a QR token or partner credential and returns an allow/deny decision. Send exactly one of these request shapes:
  • QR validation: qrToken
  • Partner credential validation: credentialType, credentialValue, scanId
If 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 HTTP 200 even when access is denied. Read data.allowed and data.reasonCode.
When access is granted, 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 scanId for partner credential retries to prevent duplicate physical scan processing.
  • Treat any unknown reasonCode as denied.