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
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:
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:
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.
Requires scope: rx:read
GET /prescriptions/{id}
Returns the full details of a single prescription, including medications, diagnosis, and current status.
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.
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).
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
Building something?
Email us and we can help you get your integration working.
support@elmed.healthcare