API v1

Base path for all programmatic access. Requests and responses are JSON unless noted.

Status

Service: operational Version: 1.4.2 Region: eu-west-1 Auth: Bearer <token>

Send an Authorization header on every request except the public endpoints listed below.

Endpoints

Method Path Description
GET /api/health Liveness check. Returns {"ok": true}. No auth required.
GET /api/users List users. Supports ?page, ?per_page and ?role.
POST /api/users Create a user. Body: name, email, role.
GET /api/users/{id} Fetch a single user by ID.
DELETE /api/users/{id} Deactivate a user. Requires the admin role.
GET /api/orders List orders. Filter with ?status=open|paid|shipped.
POST /api/orders Place an order. Body: user_id, items (array).

Errors

Errors return a JSON object with error and message fields.

CodeMeaning
400Malformed request or invalid field values.
401Missing or invalid token.
403Token valid, but the action is not permitted.
404Resource not found.
429Rate limit exceeded. See the Retry-After header.

Documentation

Full reference, SDKs and changelog are available in the developer guide. Questions can go to api-support@example.com.