HTTP status: enrolment gates failed
This page documents the problem type URI returned when active enrolment or waitlist to active is blocked after evaluating enrolment gates (and after applying any permitted staff_overrides).
Canonical problem type
Section titled “Canonical problem type”type: "https://docs.keja.co/troubleshooting/status-codes/enrollments.gates_failed"Use this URI as the stable identifier for this failure class. Individual failures inside the document use errors[].code (see below).
HTTP mapping
Section titled “HTTP mapping”| Item | Value |
|---|---|
| Status code | 422 |
| Content-Type | application/problem+json |
title (problem) | Short human label (for example “Enrolment requirements not met” or “Cannot activate waitlist enrolment” depending on operation). |
detail (problem) | Human explanation; do not parse for automation per RFC 9457. |
Problem document shape
Section titled “Problem document shape”Core RFC 9457 members plus an errors extension array (multi-issue contract used across Cadence gate endpoints):
{ "type": "https://docs.keja.co/troubleshooting/status-codes/enrollments.gates_failed", "status": 422, "title": "Enrolment requirements not met", "detail": "One or more enrolment rules blocks this request.", "instance": "/api/v1/activities/…/enrollments/", "errors": [ { "code": "enrollments.capacity_full", "title": "Activity is full", "detail": "This activity is full. Create a waitlist enrolment or ask staff to override capacity if appropriate.", "severity": "blocking", "can_override": true, "required_permission": "activities.override_enrollment_capacity", "pointer": null, "meta": {} } ]}errors items (normative)
Section titled “errors items (normative)”Each element describes one gate outcome (blocking or otherwise present in the array). Clients should rely on:
| Field | Meaning |
|---|---|
code | Stable machine id (dotted string), for example enrollments.age_below_minimum. |
title | Short heading suitable for UI. |
detail | Longer message; not a logic key. |
severity | Typically blocking for failed gates; future severities may appear. |
can_override | Whether staff may attest an override if they hold required_permission. |
required_permission | Django permission codename required to override this code, or null if not overridable. |
pointer | Optional JSON Pointer into the request (for example #/family_id). |
meta | Structured context (policy ids, level ids, bounds); may be empty. |
Known issue codes (enrolment)
Section titled “Known issue codes (enrolment)”These codes are defined in cadence-sports-api and should match documentation and clients:
code | Typical meaning |
|---|---|
enrollments.age_below_minimum | Below minimum age for the activity. |
enrollments.age_above_maximum | Above maximum age for the activity. |
enrollments.date_of_birth_required | DOB missing but age bounds apply. |
enrollments.prerequisite_not_met | Level prerequisite not satisfied. |
enrollments.policy_not_accepted | Required enrolment policy not accepted. |
enrollments.capacity_full | No remaining active capacity. |
enrollments.family_context_required | Multiple families (or ambiguous context); pass family_id. |
enrollments.insufficient_permission_to_override | Staff attested staff_overrides[code] but lacks required_permission. |
Related behaviour
Section titled “Related behaviour”For how gates are evaluated, staff_overrides, permissions, and preview behaviour, see Enrolment gating and staff overrides.