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

List the category catalogue

Any signed in user. Returns every category with the number of medicines filed under it. The count comes from a live join, so an empty category reports zero, not a dropped row.

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

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

Responses
200

The category catalogue with usage counts

itemsobject[]required
Show properties
Array of object
slugstringrequired
namestringrequired
medicine_countintegerrequired
min -9007199254740991 · max 9007199254740991
totalintegerrequired
min -9007199254740991 · max 9007199254740991
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Request
curl -X GET 'http://localhost:8000/api/v1/categories' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "items": [
    {
      "slug": "string",
      "name": "string",
      "medicine_count": -9007199254740991
    }
  ],
  "total": -9007199254740991
}