Skip to content

Analyzer Integration API

EaseLab accepts analyzer results via a dedicated integration endpoint. Devices authenticate with an API key and POST raw protocol payloads (HL7, ASTM, or JSON).

Integration endpoint

POST /integrations/v1/results

HeaderRequiredDescription
X-Analyzer-KeyYesDevice API key issued in tenant admin
Content-TypeYestext/plain, application/hl7, or application/json

Request body: Raw analyzer message (not JSON-wrapped).

Success response (200):

json
{
  "message": "Results imported successfully.",
  "barcode": "INV-2026-001234",
  "resultsImported": 12,
  "logId": "guid"
}

Error responses:

StatusCondition
401Missing or invalid API key
400Empty payload
422Parse or matching failure (includes logId)

GET /integrations/v1/health

Connectivity check with the same X-Analyzer-Key header:

json
{ "status": "ok", "device": "Chemistry Analyzer", "protocol": "Hl7" }

Device management (tenant admin)

Configure devices via /lab/analyzers (requires plan feature + JWT):

MethodEndpointDescription
GET/lab/analyzersList devices
POST/lab/analyzersCreate device (returns API key once)
DELETE/lab/analyzers/{id}Revoke device
GET/lab/analyzers/logsIngestion logs

Create device request

FieldDescription
nameDisplay name
protocolHl7, Astm, or Json
descriptionOptional notes

The API key is shown only at creation. Store it securely on the analyzer middleware PC.

Supported protocols

ProtocolContent-TypeNotes
HL7 v2.xapplication/hl7 or text/plainORU^R01 messages
ASTMtext/plainE1394 records
JSONapplication/jsonEaseLab simplified format

Result matching

The ingest service matches incoming results to invoices/samples by:

  1. Sample barcode in the message
  2. Patient ID or accession number
  3. Device-specific mapping rules

Unmatched results are logged with logId for troubleshooting. See Troubleshooting: Analyzers.

Plan requirements

Analyzer integration is a plan-gated feature. Tenants without the feature receive HTTP 403 from /lab/analyzers routes. The integration endpoint itself validates the API key regardless of plan (device must exist).

Network configuration

SettingRecommendation
Analyzer PC → APIHTTPS, outbound 443
FirewallWhitelist API server IP
Key rotationRevoke old device, create new

Example: cURL test

bash
curl -X POST https://api.example.com/integrations/v1/results \
  -H "X-Analyzer-Key: your-device-key" \
  -H "Content-Type: text/plain" \
  --data-binary @result.hl7

Ease Lab — Cloud Pathology Lab Management