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

Search medicines by generic name

Any signed in user. Returns up to 25 active medicines matching a generic or brand name. A term under two characters is refused, and the rows are ordered by stock on hand.

GET/api/v1/dispensing/generic-search
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Query parameters
qstringrequired

The generic or brand name fragment, at least two characters.

Responses
200

The matching medicines

itemsobject[]required
Show properties
Array of object
idstringrequired
namestringrequired
generic_namestringrequired
strengthstringrequired
formstringrequired
selling_pricenumberrequired
stock_quantityintegerrequired
min -9007199254740991 · max 9007199254740991
400

Search term must be at least 2 characters

detailstringrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/dispensing/generic-search?q=string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "generic_name": "string",
      "strength": "string",
      "form": "string",
      "selling_price": 0,
      "stock_quantity": -9007199254740991
    }
  ]
}