Dataset types
Every endpoint takes atype query parameter:
Records are identified by your id. Writing a record whose id already exists updates it.
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.
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:

