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

Compare branch revenue

Any signed in user. Returns every active branch with its sales count, revenue, and share. Branches come back ordered by revenue, and a branch with no sales is reported as zero rather than left out.

GET/api/v1/dashboard/branch-comparison
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Responses
200

Revenue by branch, richest first

branchesobject[]required
Show properties
Array of object
idstringrequired
codestringrequired
namestringrequired
citystringrequired
sales_countintegerrequired
min -9007199254740991 · max 9007199254740991
revenuestringrequired
share_pctnumberrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Request
curl -X GET 'http://localhost:8000/api/v1/dashboard/branch-comparison' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "branches": [
    {
      "id": "string",
      "code": "string",
      "name": "string",
      "city": "string",
      "sales_count": -9007199254740991,
      "revenue": "string",
      "share_pct": 0
    }
  ]
}