Cura ID
Back to Provider

Pharmacy Integration API

Use these endpoints to push e-prescriptions, post dispense events, and sync inventory from your POS/EHR. All requests require HMAC header X-Cura-Signature with sha256 payload using your shared secret.

HMAC

Compute sha256(hex) of the raw JSON body with your secret, send as X-Cura-Signature: sha256=<hex>.

POST /api/pharmacy/erx

Create an incoming e-prescription.

{
  "rxId": "RX-7781",
  "patient": { "name": "Ahmed", "curaId": "CURA-XXXX" },
  "drug": "Amoxicillin 500mg",
  "qty": 20,
  "prescriber": "Dr Omar"
}

POST /api/pharmacy/dispense

Record a dispense event.

{
  "rxId": "RX-7781",
  "drug": "Amoxicillin 500mg",
  "qty": 20,
  "actor": "Lina"
}

POST /api/pharmacy/inventory

Bulk upsert inventory.

{
  "items": [
    { "sku": "RX-001", "name": "Amoxicillin 500mg", "stock": 120 },
    { "sku": "RX-002", "name": "Metformin 850mg", "stock": 80 }
  ]
}
Contact support to obtain your shared secret. For sandbox, set PHARMACY_API_SECRET in your .env.