Developers
OpenAPI JSON
PeoplesMart API v1
REST · OpenAPI 3.1 · RFC 7807 errors · cursor pagination · Idempotency-Key on money/stock writes.
Conventions
- Base path
/v1; JSON payloads. - All money is integer minor units (paise). Never floats.
- Errors return
application/problem+jsonwithtype,title,status,detail. - Pagination uses
?cursor=&limit=. Idempotency-Keyis required on every POST that mutates money or stock.X-Request-Idis echoed on every response for tracing.
Authentication
POST /v1/auth/otp/request
{ "phone": "+919876543210" }
POST /v1/auth/otp/verify
{ "phone": "+919876543210", "code": "123456" }
→ access_token, refresh_token, user.roles, user.permissions
POST /v1/auth/refresh
{ "refresh_token": "..." } # rotating, reuse revokes the family
Place an order
POST /v1/orders
Idempotency-Key: 8f2c...
{ "items": [{ "variant_id": 1, "qty": 2 }],
"shipping_address": { "city": "Mumbai" } }
→ 201 { order: { order_no, status: "pending_payment", total_minor } }
Endpoint map
| Area | Endpoints |
|---|---|
| Auth | /auth/otp/request, /auth/otp/verify, /auth/refresh, /auth/logout, /me |
| Catalog | /products, /products/{slug}, /facets |
| Inventory | /inventory, /inventory/adjustments, /inventory/reconciliation, /inventory/release-expired |
| Orders | /orders, /orders/{id}, /orders/{id}/transition |
| Payments | /orders/{id}/payments, /payments/webhook, /orders/{id}/refunds |
| Payouts | /payouts, /payouts/{id}/approve, /payouts/{id}/settle, /vendors/{id}/ledger |
| Vendors | /vendors, /vendors/{id}, /vendors/{id}/approve, /kyc/queue, /kyc/{id}/verify |
| RFQ | /rfqs, /rfqs/{id}/quotes |
| Ops | /notifications, /notifications/dispatch, /health |