REST API Documentation¶
Versioned REST contract documentation for dichit-backend. Routes are served under versioned prefixes — v1, v2 (web app), v3 (mobile app), plus platform and webhooks.
Versions¶
| Prefix | Purpose |
|---|---|
v1 | legacy routes |
v2 | web application |
v3 | mobile application |
platform | /health, /meta, /sentry |
webhooks | pg/zwitch, sentry, whatsapp receivers |
Endpoint docs¶
| Document | Covers |
|---|---|
| enrollment.md | Enrollment API (v3) |
| public-marketplace.md | Public marketplace API |
| auction-and-prebid.md | Auction & pre-bid system |
| challenges.md | Challenges feature |
New endpoint docs should follow templates/rest-api.md and be listed here when added.
Conventions (all endpoints)¶
- Schema validation on every route (Fastify JSON schema + shared Zod schemas) — see development/validation.md.
- Auth via
Authorization: Bearer <access-token>and role prevalidation — see development/authentication.md. - Errors use the shared typed error → HTTP mapping — see development/error-handling.md.
- BigInt (and
Decimal) values serialize as JSON strings. - Pagination for lists uses deterministic ordering — see database/optimization.md.
- Response shapes are stable; avoid breaking changes without an ADR and a version bump.