Moving your existing data
You already hold a medicine list: in a POS, an ERP, a spreadsheet or a database of your own. This guide moves it onto Oushodh IDs, step by step, without changing a record you hold, and with a way back at every step.
What moves, and what stays
Moving to Oushodh does not replace your records. Each of your items gains one thing, the uuid of the Oushodh medicine it is, and the screens that show medicine details read them live from the API.
- Item codes, SKUs and barcodesAFTER THE MOVEStay as they are. The
uuidsits beside them. - Stock counts, selling prices and suppliersAFTER THE MOVEStay yours. The API never changes them.
- Sales, invoices and prescriptionsAFTER THE MOVEStay as they were on the day, names and prices included.
- The brand, strength, form and maker typed on each itemAFTER THE MOVEStay. They are read once, to find the match.
- Medicine details a screen shows: generic, MRP, monographAFTER THE MOVERead live with
GET /v1/medicines/{uuid}once the item is mapped. Never copied into your tables.
Back up, then add two columns
Take a backup of the item table first. Then add two empty columns, and leave every existing column alone, so the old screens keep working while you move.
oushodh_uuid: the medicine'suuid, empty until the item is matched. Index it.match_status: empty until the item is searched, thenmatched,reviewornone.- Optional:
oushodh_id, if people will see the Oushodh ID beside your own code.
A spreadsheet works the same way: export the item list to CSV and add the same columns. Moving your medicine list has a script that fills them from a CSV.
Choose how the IDs look
Every medicine has an ID in each ID profile, and your keys answer in the profile you choose when you create them. If your staff will see Oushodh IDs beside your own item codes, make a profile whose prefix cannot be mistaken for yours.


A profile cannot change once it is made, so the IDs you store stay valid. Store the uuid as the key either way: IDs has the detail.
Run a trial on a test key
Make a test app and a key for it in the portal, as in the quickstart; it needs no plan. A test app's keys run at up to 10 requests a minute and share 5,000 requests a month (100 on the free tier), enough for a trial of a few hundred items.
Take a sample that looks like your whole list: common brands, liquids and injections, items typed in short forms, and a few that are not medicines at all. Run the match on the sample only, and check what it saved.

Look at three numbers: how many items matched on their own, how many went to review, and how many found nothing. Many items with nothing usually mean short forms in your records, such as Tab or Syp. Expand them in your own code, and run the sample again.
Match every item
Run the match on the whole list with a key of your production app, at a quiet hour. Each item is one search:
- Search the item's brand with
GET /v1/medicines/search, and compare each answer'sstrength,dosage_formand maker with your item:manufacturer.name, or one of itsnames. - Exactly one fits: save its
uuidand setmatch_statustomatched. - Several fit: set
review, and keep the candidates'uuids for the person who decides. - None fits: set
none.
Work only on rows whose match_status is empty, so a run that stops can start again where it left off. On a 429 answer, wait the seconds in Retry-After, then go on. A Developer key makes up to 60 requests a minute, so 3,000 items take at least 50 minutes and use 3,000 of the month's 50,000 requests. Usage shows the run as it goes:

Match only the items you hold. Under the terms of use, paging through the whole list, or fetching far more medicines than your apps use, counts as collecting the data.
Let people decide the rest
A review screen lists the items marked review. For each, it gets the candidates with GET /v1/medicines/{uuid} when it opens, and shows them beside your own record. A person picks one, or none.
Items marked none need a person too. Some are not medicines. Some are spelled so differently that a search by the generic or another spelling finds them. Others are not in the data yet: they keep working in your system, unmapped, and a later search may find them.
Never save the first search result because it comes first. Rank says which name matched best, not which medicine is on your shelf.
Switch the screens over
Put the switch behind a setting, and turn it on for one shop, one ward or one screen first.
- A mapped item shows its details from
GET /v1/medicines/{uuid}, called by your server when the screen opens. - An unmapped item shows your own record, as it does today.
- If the API answers with an error or does not answer, show your own record and log the error. Never stop a sale for it.
To go back, turn the setting off. Nothing you held was changed, so the old screens work as before. When every screen has run on the new path for a while, drop the old code path, not your data.
Notice changes after the move
Medicines change: a new MRP, a corrected name. Updates in the portal lists each change to the data, with how many medicines were added and changed.

Your own check uses GET /v1/meta and updated_since, and flags only the items whose uuid is in your table: Notice changes has the steps.
Checklist
- A backup of the item table, taken before any change.
- Two new columns; no existing column changed.
- An ID profile chosen, and a key in it for each app.
- A trial on a test key, and short forms expanded.
- Every item matched, in review, or marked none.
- Screens switched behind a setting, with your own record as the fallback.
- A change check that flags your mapped items.
ALTER TABLE items ADD COLUMN oushodh_uuid CHAR(36) NULL; ALTER TABLE items ADD COLUMN match_status VARCHAR(8) NULL; CREATE INDEX items_oushodh_uuid ON items (oushodh_uuid);
curl -G https://api.oushodh.dev/v1/medicines/search \ -H "Authorization: Bearer $OUSHODH_KEY" \ -d q=napa -d limit=50
curl https://api.oushodh.dev/v1/medicines/01a1ba6f-f4d6-7143-ac84-9376f520eef8 \ -H "Authorization: Bearer $OUSHODH_KEY"