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

Export the medicine catalogue

Admin, inventory manager, or branch manager. Returns the catalogue as a CSV or Excel file, with stock and the timestamp of the export. Stock is summed for the caller’s own branch, and only an admin sums the whole organisation. Every page is read, so the row count matches the catalogue; X-Export-Row-Count and X-Export-Total-Rows report it, and X-Export-Truncated is set when a catalogue larger than the row cap was cut short. Images are not included in the exported file.

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

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

Query parameters
formatstring

File format. Defaults to csv.

Allowed:csvxlsx
Responses
200

The catalogue file

namestringrequired
min length 1
generic_namestringrequired
default: ""
barcodestringrequired
default: ""
categorystringrequired
default: ""
formstringrequired
default: ""
strengthstringrequired
default: ""
unitstringrequired
default: ""
selling_pricestringrequired
default: "0.000"
max_public_pricestringrequired
default: "0.000"
401

Not authenticated

detailstringrequired
403

Caller is not an admin, inventory manager, or branch manager

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.pharmaflow.dev/api/v1/medicines/export' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "name": "string",
  "generic_name": "",
  "barcode": "",
  "category": "",
  "form": "",
  "strength": "",
  "unit": "",
  "selling_price": "0.000",
  "max_public_price": "0.000"
}