Oushodh logooushodh
INTEGRATION

E-pharmacies

An online pharmacy's catalogue: store only the IDs of the medicines you sell, and build each product page from the API when it is shown.

A product page needs the brand, generic, strength, form, maker, pack size and MRP. The API gives each as a field, so pages are complete without typing them, and a value no source gives is null, never a guess.

What you already have

A shop: product rows with your selling price, stock and photos, a cart, delivery and checkout. They stay yours. Each product row gains the medicine's uuid.

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.

The catalogue

Map the medicines you sell as in the overview, and keep the uuid on each product row. List only those. A page for every medicine in the data means fetching far more than your store uses, which the terms count as collecting the data.

The product page

On each view, your server calls GET /v1/medicines/{uuid} and renders the page. Pictures load from product_image and images with no key, so an <img> tag can show them. Each page view is one request, search engines' crawlers too: rate limits has each plan's numbers.

No field says whether a medicine needs a prescription. Which items ask for one at checkout is your rule. The e-pharmacy catalogue post goes field by field.

What you may store

  • The uuid on each product row, with your price, stock and photos.
  • Each order, with the name and price as sold.
  • Not: the medicine's fields or text, kept to show later.

Notice changes

Pages are built live, so the next view shows a new MRP. The change check flags your product rows whose medicine changed, so you can review your selling price.

A site built ahead of time, or a search index of every medicine, keeps the data, and so needs the Custom licence: Part 2.

Render a product pagecurl
curl https://api.oushodh.dev/v1/medicines/01a1ba6f-f4d6-7143-ac84-9376f520eef8 \
  -H "Authorization: Bearer $OUSHODH_KEY"