Authenticate a scanner user and receive an access token.
Request body
| username | string | required | Scanner username, 3–40 characters |
| password | string | required | Scanner password |
| device_label | string | optional | Name of the device, shown to admins (max 80 characters) |
Example response
{ "access_token": "…", "scanner_user": { "id": "…", "username": "…", "organisation": "…" } }Invalidate the current access token.
Example response
{ "ok": true }Download the institute's full item catalogue — barcodes, names, units and identifiers — so the app can recognise known barcodes while offline.
Example response
{ "items": [ { "id": "…", "barcode": "…", "name": "…", "unit": "…" } ] }Record stock arriving into a storeroom.
Request body
| barcode | string | required | Scanned barcode (1–64 characters) |
| quantity | integer | required | Positive whole number |
| batch_code | string | optional | Supplier batch or lot code (max 60 characters) |
| expiry_date | string | optional | YYYY-MM-DD |
| location_id | uuid | optional | Storeroom; defaults to the main storeroom |
| note | string | optional | Free text, max 500 characters |
Example response
{ "transaction_id": "…", "item": "…", "quantity": 10, "on_hand": 42 }Record stock leaving — consumption or patient use. The nearest-expiry batch is consumed first.
Request body
| barcode | string | required | Scanned barcode |
| quantity | integer | required | Positive whole number |
| batch_code | string | optional | Take from a specific batch |
| patient_reference | string | optional | Patient or case reference (max 120 characters) |
| location_id | uuid | optional | Storeroom; defaults to the main storeroom |
| note | string | optional | Free text, max 500 characters |
Example response
{ "transaction_id": "…", "item": "…", "quantity": 2, "on_hand": 40 }Move stock between two storerooms of the same institute.
Request body
| barcode | string | required | Scanned barcode |
| quantity | integer | required | Positive whole number |
| from_location_id | uuid | required | Source storeroom |
| to_location_id | uuid | required | Destination storeroom |
| batch_code | string | optional | Move a specific batch |
| note | string | optional | Free text, max 500 characters |
Example response
{ "transaction_id": "…", "item": "…", "quantity": 5, "from_on_hand": 15, "to_on_hand": 8 }Current on-hand counts per item and storeroom — use it after an offline sync to confirm what the server recorded.
Example response
{ "status": [ { "item": "…", "location": "…", "on_hand": 42 } ] }