API reference
Pharmacy stock
Read the pharmacy's items, stock levels and alerts. Useful for reorder sheets or a supplier portal.
List stock items
GET
/api/v1/inventory/itemsScope: inventory:readActive items with current stock, nearest expiry and reorder level, sorted by name.
| Field | Where | Type | Description |
|---|---|---|---|
q | after ? | string | Name, generic name or manufacturer. |
status | after ? | string | low, out, reorder, expiring, expired or in_stock. |
category | after ? | string | Only this category. |
limit | after ? | integer | Default 500, max 2000. |
Example request
bash
curl "https://your-healthfix-site/api/v1/inventory/items?status=low" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
json
{ "data": [ { "id": "…", "name": "Paracetamol", "strength": "650 mg", "unit": "tablet", "stock": 40, "reorder_level": 100, "nearest_expiry": "2027-03-31", "sale_price": 2, "…": "…" } ] }Get a stock item
GET
/api/v1/inventory/items/{id}Scope: inventory:readOne item with its batches.
| Field | Where | Type | Description |
|---|---|---|---|
idrequired | in the path | uuid | The item's ID. |
Example request
bash
curl "https://your-healthfix-site/api/v1/inventory/items/0b9f6f7e-3c1a-4f7e-9b1e-5f2d8a7c1e42" \
-H "Authorization: Bearer YOUR_API_KEY"Stock alerts
GET
/api/v1/inventory/alertsScope: inventory:readItems that are out of stock, below reorder level, expiring soon or expired.
Example request
bash
curl "https://your-healthfix-site/api/v1/inventory/alerts" \
-H "Authorization: Bearer YOUR_API_KEY"