Documentation Index
Fetch the complete documentation index at: https://docs.pharmachains.ai/llms.txt
Use this file to discover all available pages before exploring further.
API keys
All requests to the Pharmachain Partner API must include your API key as a Bearer token in theAuthorization header.
Environments
Pharmachain provides two environments. Use sandbox while building and testing — no real pharmacy orders will be placed.Sandbox
https://sandbox-api.pharmachains.ai/v1Safe for development and testing. Returns realistic mock data.
No real pharmacies or fulfilment involved.Production
https://api.pharmachains.ai/v1Live environment. Requests are routed to real verified pharmacies
and fulfilled end-to-end.Your sandbox and production API keys are different. You’ll find both
in the Partner Portal under Settings → API keys.
Key rotation
You can generate a new key at any time without downtime.How to rotate your API key
How to rotate your API key
- In the Partner Portal, go to Settings → API keys.
- Click Generate new key — your existing key stays active.
- Update the key in your production environment variables.
- Confirm the new key is working.
- Revoke the old key.
Scopes
Each API key can be scoped to specific permissions. When generating a key, select only the scopes your integration requires.| Scope | What it allows |
|---|---|
medicines:search | Query medicine availability across pharmacies |
requests:create | Submit new medicine fulfilment requests |
requests:read | Read request status and timeline |
requests:cancel | Cancel pending requests |
webhooks:manage | Register and manage webhook endpoints |
Error reference
| HTTP status | Error code | Meaning |
|---|---|---|
401 | invalid_api_key | Key is missing, malformed, or has been revoked |
401 | expired_api_key | Key has passed its expiry date — rotate immediately |
403 | insufficient_scope | Key does not have permission for this action |
429 | rate_limit_exceeded | You’ve exceeded the allowed request rate |
Rate limits
| Environment | Requests / minute | Requests / day |
|---|---|---|
| Sandbox | 60 | 5,000 |
| Production | 300 | 100,000 |
If your integration requires higher production limits, contact your
Pharmachain account manager at support@pharmachains.ai.

