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

Report sales by pharmacist

Admin, branch manager, or auditor. Returns per pharmacist count, revenue, VAT, and basket. The window defaults to the last thirty days, and a branch_id scopes it to one branch.

GET/api/v1/reports/sales/by-pharmacist
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Query parameters
from_datestring

First day of the window, YYYY-MM-DD. Defaults to thirty days ago.

to_datestring

Last day of the window, YYYY-MM-DD. Defaults to today.

branch_idstring

Scope the report to one branch. Empty reports every branch together.

Responses
200

The per pharmacist sales report

from_datestringrequired
to_datestringrequired
rowsobject[]required
Show properties
Array of object
user_idstringrequired
full_namestringrequired
branch_namestringrequired
tx_countintegerrequired
min -9007199254740991 · max 9007199254740991
revenuestringrequired
vatstringrequired
avg_txstringrequired
400

from_date or to_date is not a valid YYYY-MM-DD date, or from_date is after to_date

detailstringrequired
401

Not authenticated

detailstringrequired
403

Caller is not an admin, branch manager, or auditor

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/reports/sales/by-pharmacist' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "from_date": "string",
  "to_date": "string",
  "rows": [
    {
      "user_id": "string",
      "full_name": "string",
      "branch_name": "string",
      "tx_count": -9007199254740991,
      "revenue": "string",
      "vat": "string",
      "avg_tx": "string"
    }
  ]
}