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/exportAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Query parameters
formatstringFile format. Defaults to csv.
Allowed:
csvxlsxResponses
200
The catalogue file
namestringrequiredmin length 1
generic_namestringrequireddefault: ""
barcodestringrequireddefault: ""
categorystringrequireddefault: ""
formstringrequireddefault: ""
strengthstringrequireddefault: ""
unitstringrequireddefault: ""
selling_pricestringrequireddefault: "0.000"
max_public_pricestringrequireddefault: "0.000"
401
Not authenticated
detailstringrequired403
Caller is not an admin, inventory manager, or branch manager
detailstringrequired
