Skip to main content
Version: v1 (Current)

Reader Offline Bundles

An offline bundle is a compiled decision-table snapshot for one access point. It supports a compatible reader's offline scan evaluation; downloading it does not install an offline engine or replay device scans. Choose a reader release that implements the bundle format and required local conditions. See Devices for platform/client boundaries.

Prepare the reader​

Configure the intended project, access point, rules, statuses and supported reader. Authenticate through that reader type's supported flow; Reader Authentication explains why the direct identifier/access-code exchange currently accepts active print-server readers only. Do not use that exchange as a universal companion/app login.

The request must authenticate an AccessPointReader, pass access-point view authorization and satisfy canScanAt: the reader has a home access point, it is the requested access point, and both belong to the same project. A paired reader without a home cannot fetch this bundle. A project API key or attendee login is insufficient even if other API reads work.

Fetch and retain a bundle​

Use team/project/access-point slugs in the URL. The access-point ID in the response is numeric; do not substitute it for the URL slug.

GET /api/v1/projects/TEAM_SLUG/PROJECT_SLUG/access-points/ACCESS_POINT_SLUG/offline-bundle
Authorization: Bearer READER_TOKEN
Accept: application/json

For the first download, omit conditional headers and the version query. A successful response is HTTP 200 with the bundle object directly, without a data envelope, plus an ETag header containing the quoted version. Validate supported format and expected access-point identity before replacing the locally retained snapshot.

This synthetic structural example has no credentials or rules. Real bundle contents depend on project configuration:

{
"version": "0123456789abcdef01234567",
"compiled_at": "2026-10-15T12:00:00+00:00",
"format": 1,
"access_point_id": 42,
"timezone": "UTC",
"default_status": null,
"statuses": [],
"rules": {},
"sessions": {},
"rows": {}
}

For refresh, send the retained ETag:

If-None-Match: "0123456789abcdef01234567"

The controller also accepts a weak ETag, a matching member of an ETag list, or the plain ?version=0123456789abcdef01234567 query value. A match returns HTTP 304 with ETag and no JSON body: keep the existing bundle. Avoid If-None-Match: * for an initial download; this implementation treats it as a match and returns no bundle. If the local bundle is lost, request an unconditional download again.

Version is a 24-character content digest excluding compiled_at. An unchanged version does not establish that compilation happened just now; the cached snapshot can remain in use. A refresh request may trigger compilation when the cache is empty.

Understand the snapshot​

FieldMeaning
formatCurrent compiler format is 1. Confirm client compatibility explicitly.
compiled_at, timezoneSnapshot time and project time zone, falling back to UTC.
statuses, default_statusConfigured status descriptors and default status slug or null.
rulesObject mapping rule IDs to names.
sessionsObject mapping session identities to time bounds, capacity and snapshot admitted count.
rowsObject keyed by credential identifier, containing a static verdict or residual conditions and supporting snapshot facts.

Preserve these maps as objects, including empty objects and numeric-looking keys. Credential identifiers are strings: 1 and 01 are distinct. If identifiers repeat across credential types, the compiler retains the lowest-ID credential, matching the reviewed online lookup.

Static attendee-search, credential, credential-type and group conditions are resolved during compilation. Conditions that depend on scan history, picked session/time, enrollment or capacity can remain in residual for the device to evaluate with its own state. A compatible implementation must combine shipped history/admission facts with its local log and clock; treating any returned row as an unconditional admission is incorrect. Server phase-three actions do not run on the device. A successful download does not prove offline/online decision parity, multi-device capacity coordination or later scan synchronization.

Rows can include names when the access point's offline-name setting is enabled and a name is available. Opaque subject/history keys support local counting; they are not attendee IDs. Store the bundle in the reader's protected local storage and apply your project's data-handling policy. Turning names off does not remove credential identifiers, status or decision information.

Refresh, retry and troubleshoot​

The service caches each access point's bundle for 300 seconds. Reviewed rule/status observers invalidate after committed changes; access-point agenda-tag and offline-name setting changes also invalidate. Attendee, credential and scan churn can wait for cache expiry. Do not assume every configuration or source-data mutation invalidates immediately.

Compilation is serialized. If another compile exceeds the wait budget, or repeated edits invalidate the in-progress result, the endpoint can return HTTP 503 with error: "bundle_compiling" and a Retry-After header. Retain the last valid bundle and retry after that interval under your site's offline/freshness policy; do not replace it with the error response. This response does not certify that an old bundle remains suitable for admission.

The named limiter defaults to six requests per minute per authenticated principal, configurable by deployment. Respect 429 responses; aggressive polling does not force fresh compilation.

SymptomCheck
401Supported reader authentication, bearer validity and expiry.
403Reader principal type, access-point view authorization, project and exact home access-point assignment.
404Project/access-point slugs and scoped access-point lookup.
304 JSON parse failureExpected empty response: reuse the retained bundle.
503 bundle_compilingHonor Retry-After; preserve the last valid snapshot and apply freshness policy.
Recent credential/scan changes absentSnapshot age/cache window; an ETag check alone does not bypass the cache.
Offline decision differsClient format/evaluator support, residual conditions, clock/session choice, local history and snapshot age.

In an approved test project/device, verify an unconditional 200, matching conditional 304 without parsing JSON, retained snapshot reuse and a changed-bundle refresh after controlled configuration updates. Separately test denied wrong-home/project/principal requests and representative offline versus online decisions. These acceptance steps remain required; the documentation's schema/example checks do not execute reader login, device admission, backend compilation or scan writes.

The REST reference describes the fetch contract reconciled against platform source 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093. Detailed production cache/worker/device recovery stays in private operating procedures.