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:read

Active items with current stock, nearest expiry and reorder level, sorted by name.

FieldWhereTypeDescription
qafter ?stringName, generic name or manufacturer.
statusafter ?stringlow, out, reorder, expiring, expired or in_stock.
categoryafter ?stringOnly this category.
limitafter ?integerDefault 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:read

One item with its batches.

FieldWhereTypeDescription
idrequiredin the pathuuidThe 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:read

Items 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"