API reference

Billing

Invoices, payments and daily collections, for accounting software, dashboards or reminders about dues.

List invoices

GET/api/v1/invoicesScope: billing:read

Invoices newest first, with optional filters.

FieldWhereTypeDescription
statusafter ?stringPayment status, e.g. unpaid, partial or paid.
patient_idafter ?uuidOnly this patient.
fromafter ?dateInvoice date from, YYYY-MM-DD.
toafter ?dateInvoice date to, YYYY-MM-DD.
qafter ?stringInvoice number, patient name or phone.
limitafter ?integerDefault 30, max 100.
cursorafter ?stringNext page.

Example request

bash
curl "https://your-healthfix-site/api/v1/invoices?from=2026-10-01&to=2026-10-31&status=unpaid" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

json
{ "data": [ { "id": "…", "invoice_no": "INV-2026-0412", "invoice_date": "2026-10-01", "patient_name": "Ravi Kumar", "payment_status": "unpaid", "subtotal": 500, "…": "…" } ], "meta": { "has_more": false } }

Get an invoice

GET/api/v1/invoices/{id}Scope: billing:read

One invoice with line items, taxes, payments and balance due.

FieldWhereTypeDescription
idrequiredin the pathuuidThe invoice's ID.

Example request

bash
curl "https://your-healthfix-site/api/v1/invoices/0b9f6f7e-3c1a-4f7e-9b1e-5f2d8a7c1e42" \
  -H "Authorization: Bearer YOUR_API_KEY"

A patient's invoices

GET/api/v1/patients/{id}/invoicesScope: billing:read

All invoices for one patient.

FieldWhereTypeDescription
idrequiredin the pathuuidThe patient's ID.

Example request

bash
curl "https://your-healthfix-site/api/v1/patients/0b9f6f7e-3c1a-4f7e-9b1e-5f2d8a7c1e42/invoices" \
  -H "Authorization: Bearer YOUR_API_KEY"

Services & prices

GET/api/v1/servicesScope: billing:read

The clinic's billable services (consultation, procedures…) with price and tax rate.

Example request

bash
curl "https://your-healthfix-site/api/v1/services" \
  -H "Authorization: Bearer YOUR_API_KEY"

Collections summary

GET/api/v1/billing/summaryScope: billing:read

Totals for a date range: invoiced, collected by payment method, refunds and outstanding dues.

FieldWhereTypeDescription
fromafter ?dateFirst day. Default today.
toafter ?dateLast day. Default same as from.

Example request

bash
curl "https://your-healthfix-site/api/v1/billing/summary?from=2026-10-01&to=2026-10-01" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

json
{
  "data": {
    "from": "2026-10-01", "to": "2026-10-01",
    "invoice_count": 23, "invoiced": 14250, "discounts": 300, "tax": 0,
    "collected": 12900, "refunded": 0, "net": 12900,
    "outstanding": 1350, "outstanding_count": 3,
    "by_method": [ { "method": "upi", "amount": 8400, "count": 14 }, { "method": "cash", "amount": 4500, "count": 8 } ]
  }
}