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

List suggested reorders

Admin and branch manager. Returns low stock suggestions, thinnest cover first. Each suggestion doubles the shortfall and is attached to the most reliable active supplier.

GET/api/v1/purchase-orders/suggested
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Query parameters
branch_idstring

Count stock for one branch. Empty counts stock across every branch.

Responses
200

The reorder suggestions

suggestionsobject[]required
Show properties
Array of object
medicine_idstringrequired
medicine_namestringrequired
current_stocknumberrequired
low_stock_thresholdintegerrequired
min -9007199254740991 · max 9007199254740991
suggested_quantitynumberrequired
unit_pricestringrequired
suggested_supplier_idstring
suggested_supplier_namestring
supplier_lead_time_daysinteger
min -9007199254740991 · max 9007199254740991
supplier_reliability_scorenumber
countintegerrequired
min -9007199254740991 · max 9007199254740991
401

Not authenticated

detailstringrequired
403

Access forbidden for this role

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/purchase-orders/suggested' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "suggestions": [
    {
      "medicine_id": "string",
      "medicine_name": "string",
      "current_stock": 0,
      "low_stock_threshold": -9007199254740991,
      "suggested_quantity": 0,
      "unit_price": "string",
      "suggested_supplier_id": "string",
      "suggested_supplier_name": "string",
      "supplier_lead_time_days": -9007199254740991,
      "supplier_reliability_score": 0
    }
  ],
  "count": -9007199254740991
}