Skip to main content

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.

Overview

The Pharmachain Partner API is a RESTful API. All requests and responses use JSON. It is designed for HMO platforms and healthtech products that need to search for medicines, submit fulfilment requests, and track orders on behalf of enrollees.

Search medicines

Find drugs by name and get a ranked list of pharmacies with stock, pricing, and delivery estimates.

Create a request

Submit a medicine fulfilment request for an enrollee and kick off the pharmacy workflow.

Get request status

Poll for the current status and full timeline of any active medicine request.

Cancel a request

Cancel a pending request before it progresses to dispensing.

Webhooks

Receive real-time push notifications when a request status changes — no polling required.

Base URLs

Sandbox:    https://sandbox-api.pharmachains.ai/v1
Production: https://api.pharmachains.ai/v1
Always develop and test against the sandbox URL. Switch to production only when your integration is stable.

Authentication

All endpoints require a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
See the Authentication guide for how to generate keys, manage scopes, and rotate credentials.

Request format

All POST and PUT requests must include a JSON body and the Content-Type header.
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
GET and DELETE requests use path parameters or query strings — no body required.

Response format

Every response follows the same envelope structure. Success:
{
  "success": true,
  "data": { }
}
Error:
{
  "success": false,
  "error": {
    "code": "medicine_not_found",
    "message": "No results found for the specified query and location.",
    "status": 404
  }
}

Versioning

The current API version is v1, included in every base URL. When breaking changes are introduced, a new version will be released and all partners will receive advance notice before the old version is deprecated.