Access Point Scan and Session APIs
Use these project-scoped endpoints for a reader's session picker and individual badge reads:
| Operation | Path beneath /api/v1/projects/{teamSlug}/{projectSlug} |
|---|---|
| List offered sessions | GET /access-points/{accessPoint}/agenda-items |
| Record a badge read | POST /access-points/{accessPoint}/scan |
Use team, project and access-point slugs in the path. Session IDs and configured tag IDs are numeric record IDs. Follow Reader Authentication for the supported reader login and Reader Offline Bundles for offline configuration. These operations do not provision a reader or grant access by knowing a slug.
For Commerce session-ticket conditions and retail pickup, review Session tickets, admission checks and retail pickup. A recognized scan is not automatically admitted, and the reviewed pickup listener does not constrain collection to admitted scans or a designated booth. Verify these outcomes before a live collection workflow.
Configure permissions and the picker
Both operations inherit authentication/project context and check access-point view authorization. A reader additionally must belong to the access point's project and have that exact access point as its assigned home. A paired reader without a home, a reader assigned elsewhere or a stale foreign-project home cannot scan there. The session list can also serve other principals with access-point view permission. The scan endpoint accepts only an AccessPointReader, so an administrator, attendee or project key cannot substitute for a reader.
Configure the access point's agenda tags to offer sessions with any effective configured tag. Effective tags must still exist in the same project and be usable on agenda items. With no effective tags, the picker offers every non-draft agenda item in the project, including untagged items. Deleted, foreign or rescoped tag IDs are discarded; losing all effective tags broadens the picker rather than producing an empty list. Review the picker after vocabulary changes.
GET the session list with per_page (default 100, integer 1–500) and page (integer at least 1). Invalid supplied values fail validation rather than being clamped. Results use the resource data, links and meta envelope, ordered by start time and then ID. Follow pagination; page links preserve the selected page size. The query does not restrict sessions to today or to a future time window.
Each row contains id, title, slug, starting_at, ending_at, is_all_day, status, locations, capacity and attendance_count. Locations expose only ID/name and are scoped to the same project. Project tags are not returned. The offered list is not an attendee enrollment schedule or a guarantee that the next scan will admit someone.
Interpret capacity and attendance
Capacity comes from this session's location mappings at this access point, separately from its enrollment cap. Multiple finite mapped capacities add together. No mapping, or any unlimited/null mapping, produces null capacity; attendance count is then also null. A finite capacity, including zero, has an integer count.
Attendance counts distinct attendees with an admitting-status scan at this access point inside the session's inclusive start/end window. It uses the current counts_as_admitted status flags. Denied scans do not fill the count, repeated scans by one attendee count once, and another access point has its own count. The query uses the timestamp window rather than requiring the scan's selected agenda_item_id to match: scans without a selected session, or against an overlapping session, can count. Missing or inverted time bounds do not establish a usable attendance measure. This is neither a live occupancy/exit balance nor an admission reservation.
Consume the active scan feed
The bundled Events reference includes the source-reviewed AccessPointScanCreated contract and retained synthetic examples. It is a broadcast-only display signal, separate from the AttendeeCredentialScanCreated workflow trigger. Its explicit short alias targets both portal.AccessPoint.{accessPointId} and dashboard.project.{projectSlug}.access-points. The selected service dispatches it for new recognized and unrecognized reads; duplicate/collision replay returns through a separate path without dispatching this frame again. Reconcile stored results after reconnect rather than counting frames as a complete scan ledger.
The projected payload contains scan/access-point IDs, outcome, nullable status, nullable attendee ID/first/last name, credential identifier, nullable reader ID/name, matched rule names, scan type, nullable agenda item and scan time. Unrecognized reads can still expose the submitted identifier. Rule names fall back to Rule #{id} when unavailable. The method returns null scan time when absent despite the annotation describing a date-time string. No full evaluation data is included by this builder, but names and credential identifiers remain sensitive display data. A frame does not prove admission, a workflow action or physical device completion.
The dashboard callback resolves project/team and requires super-admin or both view_access_points and view_access_point_scans. The access-point callback instead uses sanctum and checks that the principal's resolved project owns that numeric access point; its selected service method does not independently check reader-home assignment or the dashboard scan permission. These subscription checks differ from the scan POST's reader restrictions. Verify intended principal and foreign-project refusals before exposing the live feed. Use the host lifecycle in Real-time Events and remove listeners when the view unmounts.
Keep passive count signals separate
The ProjectLocation dependency advertises AccessPointCountUpdated and ProjectLocationCountUpdated. Both reviewed classes explicitly declare those short event aliases and target portal.ProjectLocation.{locationId}. They are different from the session list's attendance_count and from an individual active scan result. Use the host dependency lifecycle described in Real-time Events; a location ID alone does not establish authorization.
AccessPointCountUpdated exposes project_location_id, access_point_id, total_count and latest_count, each defaulting to zero when absent from its constructor input. The reviewed passive-scan producer queues work only when presence identifiers exist. Its batch callback derives latest_count from scheduled identifiers minus failed jobs and obtains total_count from the scan service. A zero-presence run does not emit a zero reset through this path. Do not interpret silence as zero attendance, or this batch count as distinct admitted attendees, live occupancy or reserved session capacity.
ProjectLocationCountUpdated takes its channel ID from the location model and copies attendee_count_latest to latest_count. Its declared public project_location_id is never assigned by the constructor, so consumers cannot assume that field identifies the channel. The reviewed source tree contains the class and dependency declaration but no dispatch reference; the model also labels the stored count as unused. Do not depend on this event as a working location counter without verifying the deployed producer and payload.
The selected location-channel callback returns true under sanctum, web or admin guards without checking the requested location, project or permission inside the callback. This source finding does not establish deployed principal isolation. Verify allowed and foreign-location subscriptions in an authorized environment before publishing count data. After reconnect, reload an authorized source of count data rather than reconstructing occupancy from missed notifications.
Record one badge read
Create and retain a UUID when the device reads the badge, together with its timestamp and identifier. Retry the same read with the same identity after a lost reply. Do not generate a new UUID just because the network failed.
This synthetic payload is not submitted:
{
"identifier": "DOCS-SYNTHETIC-BADGE",
"scan_uuid": "15516b19-3ca1-4c79-8f65-049269117bda",
"scanned_at": "2026-10-15T12:00:00.123Z",
"agenda_item_id": 123,
"device_verdict": {
"status": null,
"matched": []
},
"bundle_version": "synthetic-bundle-version"
}
| Input | Contract |
|---|---|
identifier | Required string, at most 255 characters; server trims it before credential lookup |
scan_uuid | Required UUID, generated for the original read |
scanned_at | Required device ISO-8601 time with seconds and timezone (Z or an offset), optionally exactly three or six fractional digits |
agenda_item_id | Optional/null integer; must belong to the project and still be offered by this access point |
device_verdict | Optional/null object; when present, both status (null or string up to 255) and matched (array of distinct positive integer rule IDs) are required |
bundle_version | Optional/null string up to 64 characters |
A supplied session is checked against the current picker rules even for offline replays. A draft or newly excluded session can therefore cause a queued scan to fail validation. Preserve it as a failed replay for diagnosis; do not silently retarget it to a different session. A device verdict records what the offline device decided; deleted rule IDs may still be submitted. The server evaluates independently. Credential lookup is project-scoped; if an identifier exists in multiple credential types, the lowest-ID credential wins, with a five-minute lookup cache. Do not use an ambiguous identifier to select a credential type. A bundle version without a device verdict is not recorded as a device decision.
After access checks, active scanning must be enabled. A disabled access point returns 422 with error: scanning_disabled before evaluation/recording. Request validation still precedes controller handling, so an invalid body can fail before that response.
Interpret results and retries
A new stored scan returns 201; a replay returns 200 with duplicate: true. The direct JSON object includes outcome, duplicate, nullable status/attendee/credential, rules_matched, actions, actions_executed, evaluation_data and scan. The scan contains its stored ID, UUID, type/status, device scanned_at and server received_at.
outcome is unrecognized when the credential cannot be resolved, matched when a rule matched, or unmatched when evaluation matched no rule. A matched rule is not necessarily admission: interpret the configured status. actions describes evaluation actions; actions_executed is currently an empty array and does not certify downstream completion. The response is not a physical door, printer or workflow delivery receipt.
The service first looks for the UUID at this access point. Replaying it returns the stored scan rather than applying changed payload fields. The insertion path also collapses the same trimmed identifier at the same access point in the same device-time second; even a different UUID can receive the winning row and its UUID. A conflicting UUID stored only at another access point returns 409 with error: scan_uuid_conflict, rather than exposing that other scan. Retain the returned scan identity when acknowledging a queued read.
Authentication, current session eligibility and enabled-scanning checks happen before service replay. A previously stored read can therefore be refused after configuration changes. A replay is not necessarily a byte-for-byte copy of the original response: credential/attendee/status details are reloaded, and a removed credential can yield an unrecognized result. Recognized new scans evaluate and insert under an access-point row lock; this source behavior is not proof that an installed device, database or downstream workflow has passed concurrency acceptance.
Troubleshoot and verify
| Result | Check |
|---|---|
| 401/403 | Authentication, access-point view policy, reader type, assigned home and matching project |
| 404 | Project/access-point slug and scope |
| 422 validation | Timestamp shape, UUID, session ownership/current eligibility and complete device verdict |
422 scanning_disabled | Authorized access point's active-scanning setting |
409 scan_uuid_conflict | Preserve the original queued read and identity; investigate its origin instead of blindly changing its UUID |
| Unexpected session list | Effective tags, non-draft status, pagination and absence of a date restriction |
| Unexpected count | Physical mappings, inclusive device-time window, distinct attendee identity, admitting-status flags and overlapping sessions |
| Unexpected replay | Original UUID and returned scan ID/UUID, per-second duplicate identity and current configuration/credential state |
In an authorized test environment, verify allowed/foreign/unassigned readers, an ordinary non-reader, disabled scanning, duplicate network replay, same-second collision, cross-zone UUID conflict, changed picker eligibility and unrecognized credentials. Compare finite/unlimited/multiple-room capacity and admitted scans across overlapping sessions. Those tests create durable scan records and may trigger workflows; they have not been executed for this documentation checkpoint. Structural examples and source review do not establish actual device, rule/provider, privacy or concurrency acceptance. Detailed device and worker recovery remains in the separate operator runbooks.