Appearance
API Reference
The EaseLab REST API powers the tenant portal, admin portal, public patient portal, and analyzer integrations. All endpoints return JSON unless noted otherwise.
Base URL
Your EaseLab operator provides the production API base URL for integrations (for example, analyzer middleware). Contact EaseLab support for the exact endpoint and credentials for your lab.
API surface areas
| Prefix | Audience | Auth | Documentation |
|---|---|---|---|
/auth | All users | Public / cookie | Authentication |
/lab/pms | Lab staff | JWT | PMS Endpoints |
/lab/admin | Lab admins | JWT + permissions | Admin Endpoints |
/lab/analyzers | Lab admins | JWT | Analyzers |
/integrations/v1 | Analyzer devices | API key header | Analyzer Integration |
/public | Patients | None (rate-limited) | Public API |
/admin | Platform operators | JWT (platform) | Admin Endpoints |
/billing | Tenants | JWT | Billing |
/tenant | Tenant owners | JWT | Tenant backup routes |
Response envelope
Lab routes (/lab/*) use a standard envelope:
json
{
"requestId": "abc-123",
"timeStampUtc": "2026-06-26T10:00:00Z",
"success": true,
"exception": false,
"message": "Invoice retrieved successfully.",
"data": { }
}List responses add totalCount and list fields. Auth and admin routes may return simpler { message } objects — see Error Codes.
Authentication
| Method | Header / Cookie |
|---|---|
| Bearer token | Authorization: Bearer <access_token> |
| Refresh | HTTP-only cookie refresh_token |
Access tokens expire in 15 minutes. Refresh before expiry via POST /auth/refresh.
Pagination
List endpoints accept query parameters:
| Parameter | Default | Max |
|---|---|---|
page | 1 | — |
pageSize | 20 | 100 |
search | — | Case-insensitive, typo-tolerant |
sortBy | varies | — |
sortDirection | desc | asc or desc |
Rate limiting
Applied to authentication and public endpoints. Exceeded limits return HTTP 429.
Versioning
The API is currently unversioned except for analyzer integration (/integrations/v1). Breaking changes will be communicated via release notes.