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

EndpointAdmin keyNotes
POST /platformsName must be unique
GET /platformsFilter 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

curl -X POST http://localhost:8080/platforms \
  -H 'admin-api-key: your-admin-key' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "Namma Yatri" }'

Error Codes

CodeHTTPDescription
PE-200500Internal server error
PE-201404Platform not found
PE-202409Name already exists
PE-203400Validation error (e.g. empty name)