Reports

Report routes return JSON aggregates; use export routes only from the app UI.

The reports model

Properties

  • Name
    report
    Type
    string
    Description

    Report identifier in URL path.

  • Name
    filters
    Type
    object
    Description

    Query parameters vary per report.


GET/api/reports/daily

Daily sales

Daily sales summary.

Query parameters

Query parameters: from, to, branchId.

Request

GET
/api/reports/daily
curl -X GET http://localhost:3000/api/reports/daily \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "date": "2026-10-05",
  "totalSales": 4250,
  "invoiceCount": 18,
  "paymentBreakdown": [
    {
      "method": "Cash",
      "amount": 2100
    }
  ]
}

GET/api/reports/service-sales

Service sales

Service line revenue.

Query parameters

Query parameters: page, pageSize, from, to.

Request

GET
/api/reports/service-sales
curl -X GET http://localhost:3000/api/reports/service-sales \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "items": [
    {
      "serviceName": "Consultation",
      "quantity": 12,
      "revenue": 1800
    }
  ],
  "total": 12,
  "page": 1,
  "pageSize": 25
}

GET/api/reports/stock-taking

Stock taking

Stock take report.

Query parameters

Query parameters: sessionId.

Request

GET
/api/reports/stock-taking
curl -X GET http://localhost:3000/api/reports/stock-taking \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "lines": [
    {
      "sku": "MED-001",
      "counted": 118,
      "system": 120,
      "variance": -2
    }
  ]
}

GET/api/reports/overview

Overview

Operational overview metrics.

Request

GET
/api/reports/overview
curl -X GET http://localhost:3000/api/reports/overview \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "patientsSeen": 42,
  "revenue": 4250,
  "queueCompleted": 38
}

GET/api/reports/patient-sales

Patient sales

Revenue by patient.

Request

GET
/api/reports/patient-sales
curl -X GET http://localhost:3000/api/reports/patient-sales \
  -H "Authorization: Bearer YOUR_JWT"

Response

{
  "data": [
    {
      "patientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "patientName": "Ahmad bin Ali",
      "revenue": 450
    }
  ]
}

Was this page helpful?