Attendee Enrollment API
Use attendee self-service endpoints for the signed-in person's schedule. Configure sessions, windows, capacity and conflict policies through Agenda Locations and Enrollment first. Administrative, import and speaker enrollment paths have different bypass behavior; they are not interchangeable with self-service.
Ticketed sessions can refuse new self-enrollment with 409 ticket_required. Follow Session tickets for purchase-linked seats and the existing-enrollment limitation; cancellation alone does not refund money or release Commerce inventory.
Identity and routes
Call the intended portal host from an existing attendee session, preserving the installation's authorized page/project context. These handlers resolve portal attendee identity, not a project API key or reader login. Removing auth:sanctum from their routes does not make them anonymous. Use team/project slugs and an agenda slug under /api/v1/projects/{teamSlug}/{projectSlug}. The portal route provider supplies /api/v1; the REST reference represents this as /v1/... below an /api base. Its global API-host selection is not evidence that the same portal session works on that host.
| Method | Path after project base | Purpose |
|---|---|---|
| GET | /agenda-items/{agenda_item}/availability | Read indicators; does not reserve a seat. |
| POST | /agenda-items/{agenda_item}/enroll | Enroll self or return the existing non-cancelled record. |
| DELETE | /agenda-items/{agenda_item}/enroll | Cancel a non-cancelled own enrollment. |
| POST | /agenda-items/{agenda_item}/accept-promotion | Confirm a pending own enrollment if capacity allows. |
| POST | /agenda-items/{agenda_item}/decline-promotion | Cancel a pending own enrollment. |
| POST | /agenda-items/{agenda_item}/leave-waitlist | Cancel a waitlisted own enrollment. |
| GET | /my-schedule | Read confirmed own enrollments in the route project, grouped by day. |
Agenda lookup constrains project and slug. This controller's lookup does not itself apply a published-only or tag-visibility filter; verify the consuming page/middleware and negative project/audience checks. Do not infer access control from hiding a session in your app.
Availability and enrollment
An availability response is a direct object, for example:
{
"enrollment_open": true,
"has_capacity": true,
"would_conflict": false,
"conflicts": [],
"already_enrolled": false,
"ticket_required": false,
"reason": null
}
reason is disabled, not_yet_open, closed or null. Capacity indicators use statistics cached for up to 60 seconds; the enrollment attempt checks the confirmed count again. Neither response nor displayed availability reserves a seat. already_enrolled includes any non-cancelled status, including pending and waitlisted. ticket_required now reflects the session’s ticketed state in the Commerce release; the example above is an ordinary unticketed session. A true flag means use the supported ticket purchase path, not that inventory or credentials have been granted.
POST enrollment accepts an empty JSON object when no credential should be attached:
{}
Optional credential_id must be an existing numeric credential ID belonging to this attendee. credential_type_id is accepted/validated for existence by the request but the reviewed controller does not use it to choose, create or attach a credential. Do not use it as a ticket-purchase or credential-issuance command.
Success is HTTP 200 with the enrollment under data. Inspect its actual status, not HTTP status alone. The resource contains identity, status/source and enrollment/promotion/cancellation timestamps, loaded session details and credential; waitlist_position is conditional on waitlisted status. Loaded credential output is not a narrowly specified public projection—verify actual fields for the intended caller.
For ordinary unticketed sessions, new/reactivated self-enrollment defaults to confirmed. A new non-purchase confirmation on a ticketed session can return 409 ticket_required with session_ticket_item_ids; use the supported Commerce flow rather than submitting a purchase-source override. The handler rejects disabled enrollment; the service checks the window, blocking conflicts and confirmed-count capacity before creation/reactivation. Capacity-full returns 409 rather than automatically adding a waitlist row. The approval_required and invite_only configuration labels do not themselves produce those gates in this reviewed path. Follow the setup guide's enforcement and concurrency limitations before relying on restricted enrollment or strict seat guarantees.
An existing non-cancelled record returns from the service without changing its status or rechecking its ticketed guard/window/capacity/conflicts, after the controller's disabled/credential checks. A cancelled record is rechecked and reused as confirmed. In warn mode, a successful response may also include conflicts; each conflict identifies the other session and its time bounds. Confirm the returned state before updating app controls or retrying an uncertain write.
Cancellation and waitlist transitions
DELETE enroll selects an own non-cancelled record and returns the cancelled enrollment under data. If already cancelled or missing, this endpoint returns 404 even though the internal cancellation service is idempotent. Do not treat that 404 as evidence a previous cancellation failed.
Leave-waitlist requires an own waitlisted row; otherwise it returns 404. Decline-promotion requires an own pending row; otherwise it returns 422. Both call cancellation and return the updated resource. These routes do not establish how a person joins a waitlist or receives a promotion; use the supported administrative/workflow experience for those states.
Accept-promotion selects an own pending row, rejects ticketed sessions with 409 ticket_required, then checks confirmed capacity within its service transaction, changes status to confirmed and records enrollment/promotion timestamps before emitting the enrollment event. No pending row gives 422; capacity exhausted gives 409. The handler does not explicitly check promotion deadline, offer origin, enrollment window/enabled state or schedule conflicts here. A stored deadline is not proof the endpoint enforces expiry, and any pending row is not necessarily an authorized approval workflow. Require those implementation/acceptance guarantees separately. The reviewed service locks the agenda-item row for this capacity check. That source change does not establish that every deployed competing path serializes; test races in the consuming database.
The five mutation routes share the portal.enrollment limiter, defaulting to 30 requests per minute per resolved IP, configurable by deployment. Honor 429/retry behavior rather than repeatedly submitting actions.
Schedule filters and verification
GET /my-schedule returns {"data":[]} when no matching confirmed enrollments exist. Nonempty data contains day objects with date and enrollments; an absent session start groups as unscheduled. Pending, waitlisted and cancelled rows do not appear in this confirmed schedule.
Optional date_from and date_to must be parseable dates, with date_to on or after date_from. They compare against session starting_at, inclusively; the handler does not expand a date-only date_to to the end of that day. Use deliberate time bounds and verify the actual date/time conversion. Grouping formats the model's starting timestamp as Y-m-d without an explicit client-time-zone conversion in this method.
In an approved test account/project, read availability, enroll once, inspect returned status and confirmed schedule, repeat to verify the same record, then cancel and verify its absence from the confirmed schedule. Use separate prepared waitlisted/pending records for leave/decline/accept tests; check excluded attendee/project/page cases and expired/conflicting/concurrent promotion cases before relying on restrictions. These are real mutations to run only with test data; the examples here do not submit any request.
| Response | Interpretation |
|---|---|
| 401 | No portal attendee identity. |
| 404 | Project/session or required own enrollment state missing. |
403 enrollment_disabled / window_closed | New enrollment unavailable; inspect message/reason. |
409 capacity_full / conflict_blocked / ticket_required | Inspect the explicit error; a ticketed session requires its supported purchase flow. |
| 422 | Request validation, foreign credential or missing pending promotion. |
| 429 | Shared enrollment mutation throttle; respect retry guidance. |
The REST reference includes all seven registered operations. The original API review at 280cb4c498d70c7e5fcb722d479a9e296e63d31b has a Commerce ticket-gate/capacity follow-up at 7d7becc8f4317fe5949ff9f8b5ed97535c318b79. Source review and isolated schema examples do not establish deployed authorization, credential output, promotion expiry or concurrency acceptance.