Skip to content

API Reference

Base URL

EnvironmentURL
Developmenthttp://localhost:5000/api
Productionhttps://your-domain.com/api

Authentication

All endpoints (except Onboarding and Auth login) require a Bearer JWT in the Authorization header:

Authorization: Bearer <token>

Obtain a token via POST /api/auth/login.

Common Response Formats

Success — Paginated List

json
{
  "items": [...],
  "totalCount": 42,
  "page": 1,
  "pageSize": 10
}

Error — ProblemDetails

json
{
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
  "title": "Not Found",
  "status": 404,
  "traceId": "00-abc123..."
}

Common HTTP Status Codes

CodeMeaning
200 OKRequest succeeded
201 CreatedResource created — Location header points to new resource
204 No ContentDelete/action succeeded with no response body
400 Bad RequestValidation error — check request body
401 UnauthorizedMissing or invalid JWT
403 ForbiddenValid JWT but missing required permission
404 Not FoundResource does not exist (or was soft-deleted)

Interactive API Explorer

The live Scalar UI is available while the API is running:

👉 http://localhost:5000/scalar/v1

All endpoints, request bodies, and response schemas are documented there with Try-It support.

MedRegia — Pharmaceutical Vendor Management Platform