← Back to Help
๐Ÿ”Œ

Developer / API Guide

Connect your systems to ELMED using the public REST API.

Overview

What is the ELMED API?

The ELMED public API lets doctors and pharmacies connect their own systems to ELMED. You can read prescriptions, trigger dispense actions, look up patient details, and more, depending on the scopes you have been granted.

Who can use it?

Any verified doctor or pharmacist on ELMED can generate API keys from their portal. Keys are tied to your account and scoped to what you need. If you are building a third-party integration, the pharmacy or doctor you are building for must generate the key on their end.

Base URL

https://elmed.healthcare/api/public/v1

API keys

How do I generate an API key?

Doctors go to Settings → API Keys in the doctor portal. Pharmacists go to Settings → API Keys in the pharmacy portal. Click Create new key, give it a name, choose the scopes you need, and save. Your key is shown once โ€” copy it immediately.

What does an API key look like?

All keys start with elm_ followed by a long hex string. For example:

elm_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

Store this securely. ELMED only stores a hash of the key and cannot show it to you again.

How do I revoke a key?

Go to Settings → API Keys and click Revoke next to the key. It stops working immediately. You can create a new one at any time.

Authentication

How do I authenticate requests?

Pass your key in the X-API-Key header or as a Bearer token:

# Option 1 โ€” header
X-API-Key: elm_your_key_here
# Option 2 โ€” Bearer token
Authorization: Bearer elm_your_key_here

What happens if my key is invalid?

You will get a 401 Unauthorized response. Double-check that you are sending the full key and that it has not been revoked.

Scopes

Each API key has one or more scopes that control what it can do. You choose the scopes when creating the key.

Scope What it allows Available to
rx:read Read prescription details and status Doctors, Pharmacies
rx:dispense Mark a prescription as dispensed Pharmacies
patient:read Read basic patient profile details Doctors, Pharmacies
admin Full access (ELMED admin only) Admin

Endpoints

GET /prescriptions

Returns a list of prescriptions linked to your account. Pharmacies see prescriptions routed to their pharmacy. Doctors see prescriptions they wrote.

GET /api/public/v1/prescriptions
GET /api/public/v1/prescriptions?status=pending_review
GET /api/public/v1/prescriptions?status=verified

Requires scope: rx:read

GET /prescriptions/{id}

Returns the full details of a single prescription, including medications, diagnosis, and current status.

GET /api/public/v1/prescriptions/123

Requires scope: rx:read

POST /prescriptions/{id}/dispense

Marks a prescription as dispensed. Use this when your dispensing system completes the order and you want to update ELMED automatically.

POST /api/public/v1/prescriptions/123/dispense

Requires scope: rx:dispense

GET /patients/{id}

Returns basic profile information for a patient. You can only look up patients you have an active relationship with (they have a prescription or consultation with you).

GET /api/public/v1/patients/456

Requires scope: patient:read

WooCommerce plugin

What does the WooCommerce plugin do?

The ELMED WooCommerce plugin connects your pharmacy's online store to your ELMED account. It syncs your product catalogue from ELMED to WooCommerce, verifies that customers have a valid prescription before checkout on prescription items, and updates dispense status automatically when an order is completed in WooCommerce.

How do I connect WooCommerce to ELMED?

Generate an API key in your ELMED pharmacy portal under Settings → API Keys with the rx:read and rx:dispense scopes. Then in your WordPress admin, go to ELMED → Settings, paste your key, and click Test Connection. If it shows Connected you are ready.

How do I install the plugin?

Download the plugin zip from your ELMED pharmacy portal or contact support@elmed.healthcare. In WordPress, go to Plugins → Add New → Upload Plugin, upload the zip, and activate it. WooCommerce must be installed first.

How does product sync work?

Go to ELMED → Sync in WordPress and click Sync Products Now. This pulls your current ELMED inventory into WooCommerce, creating or updating products as needed. You can also enable auto-sync to run this on a schedule.

Common questions

Yes. Each API key is limited to 120 requests per minute. If you exceed this, you will receive a 429 response. Contact support if you need a higher limit for a specific use case.
Yes. You can create as many keys as you need, each with different names and scopes. This is useful for separating keys by integration, for example one for WooCommerce and a different one for your dispensing system.
Webhooks are on the roadmap. For now, you can poll the prescriptions endpoint to check for new or updated scripts.
Not yet. All API calls run against the live ELMED environment. Test carefully using real accounts with your own test data.
Email support@elmed.healthcare with the details of what you are trying to do and what you expected vs what you got. We are actively expanding the API.

Building something?

Email us and we can help you get your integration working.

support@elmed.healthcare