Continental API (1.0.0)
Responsible for partner relationships, their locations, and their instructors.
Responses follow the JSON:API specification. Request and response bodies use application/json. Successful mutations return 201 Created or 200 OK with a data resource, or 204 No Content with an empty body.
Authentication requirements vary by endpoint. The values below are sent as HTTP headers.
| Credential | Header(s) | When required |
|---|---|---|
| API token | X-Api-Token | Every request. Gateway token for this API environment. |
| User session | X-Auth-Token | Permission-scoped routes. See proxy note below. |
| Admin | X-Username + X-Password | Admin-only routes. Both headers are required together. Admin accounts are provisioned internally. |
Notes
X-Api-Tokenis required even on public read endpoints.- For permission-scoped routes, send either admin credentials or
X-Auth-Token(see each endpoint's auth description). GET /tokensacceptsX-Auth-Tokenand returns the caller's encoded permission set.
X-User-Id and the Cloudflare proxy
In production, staging, and dev environments, a Cloudflare Worker proxy sits in front of this API. Clients send an X-Auth-Token (a user session JWT obtained from the Identity platform); the proxy validates it and replaces it with an X-User-Id (the user's internal UUID) before forwarding the request. The API itself only ever reads X-User-Id — it never sees X-Auth-Token.
For local development (no proxy running), send X-User-Id directly.
On dev/staging, you may also send X-User-Id directly to bypass the proxy — useful for testing without obtaining a fresh auth token each time.
| Header | Required | Value |
|---|---|---|
Accept | Yes | application/json |
Content-Type | On POST / PATCH | application/json |
X-Api-Token | Yes | Environment API token (UUID) |
X-Auth-Token | Per endpoint | User session token. Validated by the Cloudflare proxy in deployed envs, which replaces it with X-User-Id before the request reaches the API. For local dev (no proxy), send X-User-Id directly instead. |
X-Username | Admin routes | Admin email |
X-Password | With X-Username | Admin password |
Used on paginated and filterable list endpoints (not every endpoint supports every parameter).
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1). |
perPage | number | Results per page (default varies; often capped at 50). |
sort | string | Sort fields. Prefix with - for descending, + or no prefix for ascending. Comma-separated. Example: -createdAt,+name. |
filter[attribute][operator] | string | Filter via Dusk QueryFilter. Bracket notation: filter[attribute][operator]=value. Operators include _eq, _in, _nnull, _contains. Multiple filters may be combined. Invalid filters return 422. |
search | string | Full-text search where supported by the endpoint. |
| Status | Meaning |
|---|---|
401 | Missing or invalid authentication. |
403 | Authenticated but not permitted for this action. |
404 | Resource not found. |
406 | Accept header must be application/json. |
415 | Content-Type must be application/json on requests with a body. |
422 | Validation error or invalid query parameter. |
Error bodies contain an errors array where each item has status, title, and detail fields.