External Pharmacy API
The External Pharmacy API enables pharmacies to manage their orders, update stock levels, and receive real-time notifications about order changes.
Base Path
/v1/external-pharmacy-api-v1
Interactive API Documentation (Swagger)
A live Swagger UI is available for exploring and testing endpoints directly in your browser:
https://api.rxscale-dev.com/v1/external_pharmacy_api/apidocs
The Swagger UI lets you try out API calls interactively. Authenticate with your API key to test against real data.
Authentication
All endpoints require an API key via the X-API-Key header. See Authentication for details.
API Key Scoping
API keys can be scoped to either a single pharmacy or an entire pharmacy group:
- Single-pharmacy keys are tied to one specific pharmacy. All requests are automatically scoped to that pharmacy, and no additional parameters are needed.
- Group-wide keys cover all pharmacies within a pharmacy group. When using a group-wide API key, the
pharmacy_uid query parameter is required on most endpoints to specify which pharmacy you are operating on.
# Group-wide API key: pharmacy_uid is required
GET /v1/external-pharmacy-api-v1/pharmacy_orders/?pharmacy_uid=your-pharmacy-uid
# Single-pharmacy API key: no pharmacy_uid needed
GET /v1/external-pharmacy-api-v1/pharmacy_orders/
If you use a group-wide API key and omit the pharmacy_uid parameter on an endpoint that requires it, the request will return an error.
Available Endpoints
| Method | Endpoint | Description |
|---|
GET | /pharmacy_orders/ | List pharmacy orders |
GET | /pharmacy_orders/{uid} | Get order details |
PATCH | /pharmacy_orders/{uid}/status | Update order status |
GET | /pharmacy_skus/ | List pharmacy SKUs |
PATCH | /pharmacy_skus/{uid} | Update SKU (price, stock, external_id) |
PATCH | /pharmacy_skus/{uid}/stock | Update stock level |
PATCH | /pharmacy_skus/{uid}/external_id | Update external ID |
GET | /webhooks/ | List webhook subscriptions |
POST | /webhooks/ | Register a webhook |
DELETE | /webhooks/{uid} | Remove a webhook |
Required Permissions
| Endpoint | Required Permission |
|---|
| List/View orders | orders_read |
| Update order status | orders_write |
| List SKUs | stock_read |
| Update SKU data | stock_write or pharmacy_sku_write |
| Manage webhooks | webhooks_read / webhooks_write |