Documentation · API
ETicketsGo API
A predictable REST API with an always-in-sync OpenAPI reference.
Interactive reference
The API is documented with OpenAPI/Swagger, generated from the code — it lists every route, request/response shape, and auth requirement. It is served at /api/docs in non-production environments.
Conventions
- Base path: all routes are under
/api. - Auth:
Authorization: Bearer <accessToken>. Obtain viaPOST /api/auth/login; refresh viaPOST /api/auth/refresh(rotating refresh tokens with reuse detection). - Validation: request bodies are validated; unknown keys are stripped.
- Pagination: list endpoints take
pageandpageSize(capped at 100) and return{ data, meta }. - Errors: a normalized envelope
{ code, message, details, correlationId }. Payment failures map to clear statuses (402 declined, 409 duplicate, 503 provider unavailable). - Idempotency: money, inventory, and check-in transitions are idempotent and replay-safe.
Webhooks
Payment providers call POST /api/payments/webhook/:provider — signed, idempotent, and replay-safe.
Health & metrics
GET /api/health (liveness), GET /api/health/ready (database + Redis), and GET /api/metrics (Prometheus).