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

List the classified drugs book

Any signed in user. Returns the dispense log with medicine and authoriser, newest first. Only controlled medicines are read, each with a patient national id and prescriber licence.

GET/api/v1/compliance/classified-drugs-book
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Query parameters
from_datestring

Only entries dispensed on or after this date. Empty applies no lower bound.

to_datestring

Only entries dispensed on or before this date. Empty applies no upper bound.

pageinteger

One based page number. Defaults to 1.

page_sizeinteger

Rows per page, capped at 200. Defaults to 50.

Responses
200

A page of the classified drugs book

totalintegerrequired
min -9007199254740991 · max 9007199254740991
pageintegerrequired
min -9007199254740991 · max 9007199254740991
page_sizeintegerrequired
min -9007199254740991 · max 9007199254740991
itemsobject[]required
Show properties
Array of object
dispensed_atstringrequired
medicine_namestringrequired
quantityintegerrequired
min -9007199254740991 · max 9007199254740991
patient_national_idstringrequired
doctor_licensestringrequired
dispensed_bystring | nullrequired
sale_idstringrequired
retention_notestringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/compliance/classified-drugs-book' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "total": -9007199254740991,
  "page": -9007199254740991,
  "page_size": -9007199254740991,
  "items": [
    {
      "dispensed_at": "string",
      "medicine_name": "string",
      "quantity": -9007199254740991,
      "patient_national_id": "string",
      "doctor_license": "string",
      "dispensed_by": "string",
      "sale_id": "string"
    }
  ],
  "retention_note": "string"
}