Skip to main content
Invoice creation requests bundle totals, line items, and contextual patient details.
FieldTypeDetails
idstringInvoice identifier.
totalnumberTotal amount after all adjustments.
taxnumberTax value.
discountnumberDiscount amount.
subtotalnumberAmount before tax and discount.
taxPercentnumberTax percentage applied.
discountPercentnumberDiscount percentage applied.
file_nostringInvoice number (payload.invoiceId).
reference_nostringExternal reference (payload.referenceId).
invoice_line_idsarrayLine items for services performed.
patient_idstringIdentifier for the billed patient.
patient_dataobjectPatient snapshot with identifiers and contact info.
branch_dataobjectBranch context (id, name) when available.
doctor_dataobjectTreating doctor details (id, name) when available.

Invoice line schema

FieldTypeDetails
product_idstringSource operation identifier.
quantitynumberUnits billed.
price_unitnumberPrice per unit.
namestringDisplay name of the billed service.
service_idstringLinked procedure identifier, if present.
{
  "id": "inv_2001",
  "total": 180,
  "tax": 20,
  "discount": 10,
  "subtotal": 170,
  "taxPercent": 12,
  "discountPercent": 5,
  "file_no": "INV-1",
  "reference_no": "REF-INV-1",
  "invoice_line_ids": [
    {
      "product_id": "op_01",
      "quantity": 1,
      "price_unit": 150,
      "name": "Extraction",
      "service_id": "proc_11"
    }
  ],
  "patient_id": "pat_123",
  "patient_data": {
    "id": "pat_123",
    "name": "Jane Doe",
    "file_no": "PT-00017",
    "reference_no": "REF-883",
    "nationalId": "1234567890",
    "phone": "+1",
    "mobile": "5551234567"
  },
  "branch_data": {
    "id": "br_01",
    "name": "Main Branch"
  },
  "doctor_data": {
    "id": "doc_09",
    "name": "Dr. Smith"
  }
}