Oushodh logooushodh

How to build an e-pharmacy product catalogue on the Oushodh API

By Al Amin Ahamed · Published · Updated · 6 min read

Short answer

Get each medicine with GET /v1/medicines/{ref} when its page is shown, and fill the page from product_name, generic_name, strength, dosage_form, manufacturer, size and prices. Keep only the uuid in your own product record. Stock, selling price, your own photos and prescription rules stay with the store.

Key facts

An online pharmacy’s product page has two kinds of facts on it. Some describe the medicine: its brand, generic, strength, form, maker and MRP. Others describe the shop: whether it is in stock, what it costs here, how fast it arrives. This guide shows which of the first kind the Oushodh API gives, field by field, and what the store keeps for itself.

What does a medicine product page need?

On the page API field Notes
Product name product_name Brand, strength and dosage form together, such as Napa 500 mg Tablet
Brand brand As the DGDA register spells it, for a medicine DGDA lists
Generic generic_name null when no source gives it
Strength strength Such as 500 mg
Dosage form dosage_form Such as Tablet
Maker manufacturer The register’s spelling
Pack size size, unit Such as 10 Tablets in a Strip, when a source states it
MRP prices Per unit, strip and pack, each with its source
Pictures product_image, images Pictures Oushodh holds, product_image first
System medicine_type Allopathic, homoeopathic, herbal, ayurvedic or unani
DGDA badge dgda_listed true when a DGDA registration links to the medicine

Any of these can be null. A value no source gives is never a blank, a zero or an estimate, so show the field only when it has a value. The medicine object lists every field.

Two fields are not filled yet: description_en and description_bn are null today. The medicine’s text is in monograph, which only Get a medicine returns.

Diagram: a product page takes from the API, each time it is shown, the brand and product name, generic and strength, dosage form, maker, pack size if a source has it, MRP with its source, and the pictures Oushodh holds. The store owns its stock on hand, its selling price, its own photos, prescription rules, and delivery and checkout.
The medicine's facts come from the API. The shop's facts stay with the shop.

How should the page show the MRP?

From prices, with its kind and its source. A medicine can have an MRP per unit, per strip and per pack, and sources often state only one. Show the one that matches what you sell: a strip’s MRP beside a strip, not a unit price multiplied by ten. The API never works one price out from another, and neither should the page.

Your selling price is yours, and it is not in the API. If you sell below MRP, show both, and label which is which. MRP in Bangladesh explains each kind of price and which source wins.

Can the page show the medicine’s text?

Yes, from monograph: indications, composition, dosage, side effects, storage and more, each as its source wrote it. It is information for professionals, not medical advice, and the API asks you to show its source with it. A few texts hold HTML tags, so clean them before you put them on the page. Any section can be null.

The store should not add advice of its own to that text, and Oushodh does not give any: it describes medicines, and never suggests a dose, a treatment or a substitute.

What does the store still own?

Everything about the sale. Stock on hand, your selling price, discounts, delivery and checkout live in your own system, keyed to the medicine’s uuid as in connecting your inventory.

Two more things are yours to decide. Photos: the pictures Oushodh holds need no key, so an <img> tag can show them, but many stores prefer photos of the packs they stock. And prescription rules: the API has no field that says whether a medicine needs a prescription, so which items ask for one at checkout is the store’s rule to set and keep.

How does the page get its data?

Your server gets the medicine with GET /v1/medicines/{ref} each time it renders the page, using the uuid from your own product record. The terms of use let you show the data to your users, but not cache or store the answers, so the page is built fresh on each view.

That makes page views the main cost. Each one is one request, search engines’ crawlers included. The Developer plan allows 50,000 requests a month; Team allows 250,000 and Agency 1,000,000. The rate limits page has every plan’s numbers.

List only the medicines you sell. A page for every medicine in the data means fetching far more medicines than your store uses, and the terms count that as collecting the data. A search box on the store works as in the POS search guide, and adding the API to your software covers keys, errors and retries.

Share this post

FAQ

  • Does the API say whether a medicine needs a prescription?

    No. There is no such field, so which items ask for a prescription at checkout is the store's rule.

  • Can I use Oushodh's pictures on my product pages?

    Yes. product_image and images point at pictures Oushodh holds, which need no key, so an img tag can show them. Many stores use photos of their own packs too.

  • Does the API have product descriptions?

    description_en and description_bn are null today. The medicine's text is in monograph, which Get a medicine returns, with its source.

  • Can I build a page for every medicine in the data?

    List the medicines you sell. Fetching far more medicines than your store uses counts as collecting the data under the terms.

Sources

Choosing a data source

Fetch a record for a product page