Auth guard:
admin-api-key header required for all endpoints. No JWT or partner key access.Overview
A platform is a logical tenant — it represents a partner app integrated with Aarokya (e.g. Namma Yatri, a hospital chain). Each partner is issued an API key tied to their platform. Users are registered under a specific platform, and their identity is scoped to(platform_id, phone_number).
- Name uniqueness is global. No two platforms may share the same name.
- Soft delete via status. Deleting a platform sets
status → inactive; it does not remove the row.
Platform in the Auth Flow
Auth Guards by Endpoint
| Endpoint | Admin key | Notes |
|---|---|---|
POST /platforms | ✓ | Name must be unique |
GET /platforms | ✓ | Filter by status |
GET /platforms/{id} | ✓ | |
PATCH /platforms/{id} | ✓ | Only name updatable |
DELETE /platforms/{id} | ✓ | Sets status → inactive |
Endpoints
POST /platforms
Create a new platform. Name must be unique.
GET /platforms
Paginated list. Filter by
status.GET /platforms/{id}
Fetch a single platform by UUID.
PATCH /platforms/{id}
Rename a platform. New name must not conflict.
DELETE /platforms/{id}
Soft-delete a platform (
status → inactive).Request / Response Examples
Error Codes
| Code | HTTP | Description |
|---|---|---|
PE-200 | 500 | Internal server error |
PE-201 | 404 | Platform not found |
PE-202 | 409 | Name already exists |
PE-203 | 400 | Validation error (e.g. empty name) |