List expiring batches
Any signed in user. Returns active batches that expire within the window, soonest first. Recalled and quarantined batches are left out, as one already pulled is not a stock threat.
GET
/api/v1/alerts/expiryAuthorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Query parameters
daysintegerHow many days ahead to look. Defaults to 90.
branch_idstringLook at one branch only. Omitted means every branch.
Responses
200
Batches expiring inside the window
alertsobject[]requiredShow propertiesHide properties
Array of
objectbatch_idstringrequiredmedicine_idstringrequiredmedicine_namestringrequiredbranch_idstringrequiredbranch_namestringrequiredbatch_numberstringrequiredexpiry_datestringrequireddays_to_expiryintegerrequiredmin -9007199254740991 · max 9007199254740991
qty_remainingnumberrequiredunit_coststringrequiredcountintegerrequiredmin -9007199254740991 · max 9007199254740991
401
Not authenticated
detailstringrequired