Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Read the dashboard summary

Any signed in user. Returns today’s sales, revenue, and VAT with stock and expiry counts. An empty branch_id rolls every figure up across all branches, and the trend compares today against yesterday.

GET/api/v1/dashboard/summary
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Query parameters
branch_idstring

Scope the counts to one branch. Empty means all branches.

Responses
200

Today's totals and the stock and expiry counts

today_sales_countintegerrequired
min -9007199254740991 · max 9007199254740991
today_revenuestringrequired
today_vatstringrequired
revenue_trendnumberrequired
sparkline_30dnumber[]required
low_stock_countintegerrequired
min -9007199254740991 · max 9007199254740991
out_of_stock_countintegerrequired
min -9007199254740991 · max 9007199254740991
expiring_90_countintegerrequired
min -9007199254740991 · max 9007199254740991
expiring_30_countintegerrequired
min -9007199254740991 · max 9007199254740991
expired_countintegerrequired
min -9007199254740991 · max 9007199254740991
total_medicinesintegerrequired
min -9007199254740991 · max 9007199254740991
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/dashboard/summary' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "today_sales_count": -9007199254740991,
  "today_revenue": "string",
  "today_vat": "string",
  "revenue_trend": 0,
  "sparkline_30d": [
    0
  ],
  "low_stock_count": -9007199254740991,
  "out_of_stock_count": -9007199254740991,
  "expiring_90_count": -9007199254740991,
  "expiring_30_count": -9007199254740991,
  "expired_count": -9007199254740991,
  "total_medicines": -9007199254740991
}