Skip to content
progmedlab

Lab testing as an API

One REST surface for ordering, tracking and receiving clinical lab results. Sandbox in 30 seconds, production after a short compliance review. No SDK required — but we ship two.

Auth

Bearer key, scoped per environment

Idempotency

Idempotency-Key on every write

Rate limits

600 req/min, burst 60

1. Create an order

curl -X POST https://api.progmedlab.com/v1/orders \
  -H "Authorization: Bearer sk_live_..." \
  -H "Idempotency-Key: ord_9f2c" \
  -H "Content-Type: application/json" \
  -d '{
    "patient": {
      "external_id": "usr_8821",
      "name": "A. Rivera",
      "dob": "1991-04-02",
      "sex": "female"
    },
    "tests": ["58410-2", "24323-8"],
    "collection": { "method": "kit", "address_id": "adr_19" }
  }'

Collection methods: kit (home kit shipped), draw_center (partner draw site), mobile_phlebotomy (at-home draw).

2. Receive results by webhook

POST /your-endpoint
X-Pml-Signature: t=1730294400,v1=8f2c...
X-Pml-Event: order.result_final

{
  "event": "order.result_final",
  "order_id": "ord_9f2c",
  "results": [{
    "loinc": "58410-2",
    "analyte": "Hemoglobin",
    "value": 13.4,
    "unit": "g/dL",
    "ref_range": "12.0-15.5",
    "flag": "normal"
  }],
  "attachments": {
    "pdf": "https://files.progmedlab.com/...",
    "fhir": "DiagnosticReport/diag_77a"
  }
}

Verify the signature over t.body with your webhook secret before trusting the payload.

Endpoints

Method Path Purpose
GET /v1/tests List orderable assays with LOINC codes, specimen and price
GET /v1/panels List curated panels and their components
POST /v1/orders Create an order (idempotent via Idempotency-Key)
GET /v1/orders/{id} Order status, collection state, estimated result time
GET /v1/orders/{id}/results Final results with LOINC codes, units, reference ranges
POST /v1/patients Create a patient record bound to your external_id
POST /v1/webhooks Register an HTTPS endpoint for result events

Base URL: https://api.progmedlab.com · OpenAPI 3.1 spec available on request · All timestamps ISO 8601 UTC.

TypeScript SDK

Typed models generated from the OpenAPI spec, with webhook verification helpers.

npm i @progmedlab/sdk

Python SDK

Sync and async clients, Pydantic models, drop-in FastAPI webhook handler.

pip install progmedlab

FHIR bridge

Map our native payload to FHIR R4 DiagnosticReport or HL7 v2 ORU^R01.

GET /v1/orders/{id}/results?format=fhir

Developer FAQ

Do you have a sandbox?

Yes. Sandbox keys are issued instantly at signup and never charge. Sandbox orders return synthetic results within seconds so you can build the full flow without a real sample.

How are webhooks secured?

Every delivery carries an HMAC-SHA256 signature over the raw body plus a timestamp header. Deliveries older than five minutes are rejected, so replays fail. Retries use exponential backoff for 24 hours.

Which result formats are supported?

Native JSON with LOINC-coded analytes, a signed PDF report, FHIR R4 DiagnosticReport and HL7 v2 ORU^R01. All four are generated from the same final result, so they never disagree.

Can we get a BAA?

Yes, a Business Associate Agreement is available for covered entities and their business associates. Contact the team and we return a signed BAA within two business days.

Встройте лабораторную диагностику в продукт на этой неделе

Sandbox-ключи бесплатны. В продакшене оплата за каждый анализ.

CLIA-certified labs · HIPAA-aligned · No subscription