Look up many medicines
Up to 100 medicines by ID in one call. Each ref counts as one request against the minute and the month, so a batch fits in what is left or is refused whole. A test app's key takes at most as many refs as its requests a minute. The answer keeps the order of the refs and leaves out the monograph; get one medicine for that. Answers are not cached.
curl https://api.oushodh.dev/v1/medicines/lookup \
-H "Authorization: Bearer $OUSHODH_KEY" \
-H "Content-Type: application/json" \
-d '{"refs": ["MED-012933", "MED-999999"]}'JSON body
refs is required.- Medicine IDs in any profile, old IDs or UUIDs, as
refslist, required/v1/medicines/{ref}takes them. At most 100.
Response
itemslist
{
"items": [
{
"ref": "MED-012933",
"medicine": { "id": "MED-012933", "brand": "Napa", … }
},
{
"ref": "MED-999999",
"medicine": null,
"error": { "code": "not_found", "message": "No medicine has ID MED-999999" }
}
]
}Errors
400 bad_requestA bad parameter, such aslimit=0, a time in another form, a missingq, or a display ID that more than one ID profile uses (pass the UUID).401 unauthorizedNo key, an unknown key or a revoked key. The answer never says which.403 plan_expiredThe account's plan has ended, or a production app's key has no plan. The free tier runs test apps only.429 rate_limitedMore requests in a minute than the key's plan allows.429 quota_exceededThe plan's requests for this month, the free tier's 100, or a test app's 5,000, are used up.500 internalA fault on our side. The details go to our log, not the answer.
Each ref counts as one request, so a batch of 100 uses 100 of the minute and the month. A ref sent twice is answered twice and counted twice.