Skip to content

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).

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).

ItemValue
Status code422
Content-Typeapplication/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.

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": {}
}
]
}

Each element describes one gate outcome (blocking or otherwise present in the array). Clients should rely on:

FieldMeaning
codeStable machine id (dotted string), for example enrollments.age_below_minimum.
titleShort heading suitable for UI.
detailLonger message; not a logic key.
severityTypically blocking for failed gates; future severities may appear.
can_overrideWhether staff may attest an override if they hold required_permission.
required_permissionDjango permission codename required to override this code, or null if not overridable.
pointerOptional JSON Pointer into the request (for example #/family_id).
metaStructured context (policy ids, level ids, bounds); may be empty.

These codes are defined in cadence-sports-api and should match documentation and clients:

codeTypical meaning
enrollments.age_below_minimumBelow minimum age for the activity.
enrollments.age_above_maximumAbove maximum age for the activity.
enrollments.date_of_birth_requiredDOB missing but age bounds apply.
enrollments.prerequisite_not_metLevel prerequisite not satisfied.
enrollments.policy_not_acceptedRequired enrolment policy not accepted.
enrollments.capacity_fullNo remaining active capacity.
enrollments.family_context_requiredMultiple families (or ambiguous context); pass family_id.
enrollments.insufficient_permission_to_overrideStaff attested staff_overrides[code] but lacks required_permission.

For how gates are evaluated, staff_overrides, permissions, and preview behaviour, see Enrolment gating and staff overrides.