Dataset types
You can upload four kinds of catalog. Each page lists every column you can send, which ones are mandatory, the values they accept, and a sample file.
Records are identified by your id. Writing a record whose id already exists updates it.
Preparing a file
These rules apply to every catalog, whether you upload a CSV in the console or through the API.- One header row, then one row per record. Column names are the ones listed on each catalog’s page. Columns can be in any order, and you only need the mandatory ones plus whatever else you have.
- Common alternative column names are understood. For example
idfor your id column, oreka_idforekaid. A column Eka doesn’t recognise is ignored, with a warning. - Leave a cell empty when you don’t have the value.
- Lists in one cell use
|between values, likeCBC|Hemogram. The one exception is a drug’sgeneric_listandgeneric_list_ids, which use+. In JSON, send these as lists instead. - Yes/no columns accept
trueorfalse(alsoyes/noand1/0). - Quote any value containing a comma, like
"Chest pain, unspecified". Spreadsheet programs do this when they save as CSV. - Save as UTF-8 CSV if you can. Files saved by Excel on Windows also work.
- Up to 50,000 rows per file.
Endpoints
- Create or update records: send a JSON list or a CSV file, in
upsertorreconcilemode, with an optional dry run - List records and Get a record: read your catalog back
- Export the catalog as CSV: download it in the same format the write endpoint accepts
- List CSV import batches: check that an upload landed
- Deactivate records: remove records reversibly
- Delete the whole catalog: remove every record permanently
- Get and set partner search status: switch medical search over to your catalog
form_name from the accepted drug forms so the drug is linked to Eka’s dosage form.
Mapping your records to Eka ids
Every record can carry an optionalekaid: Eka’s own id for the same item, taken from Eka’s reference list (for example lb-1322178942 for a lab test). When it is set, Eka products such as the EMR recognise your item and can offer features built on Eka’s data, like calculators. Eka stores the id as you send it and does not check it, so make sure each mapping is right.
Keeping a catalog in sync
To mirror a catalog from your system on a schedule, send the whole catalog each time inreconcile mode. Records you no longer send are deactivated, not deleted, so sending them again restores them.
1
Dry run
POST /admin/datasets/v1/?type=medication&mode=reconcile&dry_run=true with the full catalog. Nothing is written; the response shows how many records would be inserted, updated, reactivated and deactivated.2
Commit
If the counts look right, send the same request without
dry_run. If more than half of your catalog would be deactivated, the request is rejected with a shrink_guard error, the usual sign of a truncated export. Pass confirm_shrink=true only if you really mean it.3
Verify
For CSV uploads,
GET /admin/datasets/v1/batches/?type=medication shows the latest batch and its row counts.4
Enable search (first sync only)
POST /admin/datasets/v1/search-status/?type=medication with {"enabled": true}. Later syncs don’t need to repeat this. Set it back to false to roll back.Writes are all-or-nothing
If any record or CSV row fails validation, nothing in the request is written. Theerrors list in the response names every failing record, field and value, so you can fix them all at once.
Limits
- Request bodies are limited to 10 MB. For a larger catalog, send it as several
upsertrequests (areconcilemust contain the whole catalog in one request). - A request must finish within 29 seconds.
- List and batch pages return at most 1000 items (
limit, default 100).
Authentication
All endpoints require an access token in theAuthorization header:

