Download OpenAPI specification:
Lab Order Management System API Documentation. This API provides endpoints to manage laboratory orders and their results, and to keep your customer account list in sync.
Requests use an OAuth 2.0 client-credentials token from your lab's Cognito domain. erblue provides your client id, client secret and token URL, and sets which scopes your client may request: integration-api/order:read and integration-api/order:write for orders, integration-api/account:read and integration-api/account:write for lab accounts.
GET /labs/{labId}/lab-orders/updates?since={timestamp}GET /labs/{labId}/lab-orders?reservationCodes=code1,code2In Progress of an order using PUT /labs/{labId}/lab-orders/{reservationCode}/statusGET /labs/{labId}/lab-orders/{reservationCode}/documents/upload-sample-results-url)POST /labs/{labId}/lab-orders/{reservationCode}/documents/upload-sample-results-url)POST /v1/labs/{labId}/lab-orders/{reservationCode}/samples/resultsPOST /v1/labs/{labId}/lab-accounts in batches of up to 1000, matched on billing_idunchanged and not rewritten, so you can send your whole list each time rather than working out what changedRetrieves a list of lab orders by reservation codes
| labId required | string Your lab organization id |
| reservationCode required | Array of strings Filter orders by reservation code(s). Can be a single code or comma-separated list |
curl --request GET \ --url 'https://loms-api.erblue.com/v1/labs/%7BlabId%7D/lab-orders?reservationCode=SOME_ARRAY_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
[- {
- "billing_id": "string",
- "lab_location_id": "string",
- "billing_to_id": "string",
- "reservation_code": "string",
- "status": "Submitted",
- "project_name": "string",
- "lab_order_id": "string",
- "inspector_name": "string",
- "inspector_email": "string",
- "po_number": "string",
- "project_id": "string",
- "special_instructions": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state_province": "string",
- "zip_postal": "string",
- "country": "string",
- "submitted_at": "2019-08-24T14:15:22Z",
- "samples": [
- {
- "test_methods": [
- {
- "test_method": "string",
- "turnaround_time": "string"
}
], - "matrix": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "ha_number": "string",
- "location_description": "string",
- "description": "string",
- "material_location": "string",
- "material": "string",
- "cassette_type": "string",
- "sample_type": "string",
- "sample_amount": 0,
- "units": "string",
- "filter_pore_size": "string",
- "temperature": 0,
- "temperature_units": "string",
- "datetime_collected": "2026-10-10T14:30:00",
- "end_datetime_collected": "2026-10-10T16:30:00",
- "notes": "string",
- "bottle_type": "string",
- "water_source": "string",
- "field_ph": 0,
- "porous": "string",
- "sample_collection_depth": 0,
- "composite_sample": "string",
- "container_size": "string",
- "supply_type": "string",
- "preservative": "string",
- "sample_classification": "string",
- "paint_condition": "string",
- "color": "string",
- "substrate": "string",
- "component": "string",
- "floor_level": "string",
- "lot_number": "string",
- "width": 0,
- "length": 0,
- "sample_area": "string",
- "average_flow_rate": 0,
- "post_flow_rate": 0,
- "pre_flow_rate": 0,
- "elapsed_time": "2019-08-24T14:15:22Z",
- "activity_phase": "string",
- "volume": "string"
}
], - "results": [
- {
- "lab_sample_id": "string",
- "result_status": "Analyzed",
- "lab_test_method": "string",
- "aliquot_id": "string",
- "result_qualifier": "<",
- "result_value": 0,
- "result_type": "string",
- "unit": "string",
- "mrl_value": 0,
- "identifier": "string",
- "analysis_date": "2019-08-24T14:15:22Z",
- "comment": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "detected": true
}
]
}
]Retrieves a lab order by reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
curl --request GET \ --url https://loms-api.erblue.com/v1/labs/%7BlabId%7D/lab-orders/%7BreservationCode%7D \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "billing_id": "string",
- "lab_location_id": "string",
- "billing_to_id": "string",
- "reservation_code": "string",
- "status": "Submitted",
- "project_name": "string",
- "lab_order_id": "string",
- "inspector_name": "string",
- "inspector_email": "string",
- "po_number": "string",
- "project_id": "string",
- "special_instructions": "string",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state_province": "string",
- "zip_postal": "string",
- "country": "string",
- "submitted_at": "2019-08-24T14:15:22Z",
- "samples": [
- {
- "test_methods": [
- {
- "test_method": "string",
- "turnaround_time": "string"
}
], - "matrix": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "ha_number": "string",
- "location_description": "string",
- "description": "string",
- "material_location": "string",
- "material": "string",
- "cassette_type": "string",
- "sample_type": "string",
- "sample_amount": 0,
- "units": "string",
- "filter_pore_size": "string",
- "temperature": 0,
- "temperature_units": "string",
- "datetime_collected": "2026-10-10T14:30:00",
- "end_datetime_collected": "2026-10-10T16:30:00",
- "notes": "string",
- "bottle_type": "string",
- "water_source": "string",
- "field_ph": 0,
- "porous": "string",
- "sample_collection_depth": 0,
- "composite_sample": "string",
- "container_size": "string",
- "supply_type": "string",
- "preservative": "string",
- "sample_classification": "string",
- "paint_condition": "string",
- "color": "string",
- "substrate": "string",
- "component": "string",
- "floor_level": "string",
- "lot_number": "string",
- "width": 0,
- "length": 0,
- "sample_area": "string",
- "average_flow_rate": 0,
- "post_flow_rate": 0,
- "pre_flow_rate": 0,
- "elapsed_time": "2019-08-24T14:15:22Z",
- "activity_phase": "string",
- "volume": "string"
}
], - "results": [
- {
- "lab_sample_id": "string",
- "result_status": "Analyzed",
- "lab_test_method": "string",
- "aliquot_id": "string",
- "result_qualifier": "<",
- "result_value": 0,
- "result_type": "string",
- "unit": "string",
- "mrl_value": 0,
- "identifier": "string",
- "analysis_date": "2019-08-24T14:15:22Z",
- "comment": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "detected": true
}
]
}Updates a lab order status by reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
| status required | string Enum: "Submitted" "In Progress" "Completed" "Cancelled" The current status of the order |
{- "status": "Submitted"
}Retrieves a list of lab orders updates since timestamp
| labId required | string Your lab organization id |
| since required | string <date-time> Filter orders updated after this timestamp (ISO 8601 format) |
| locationId | string Filter orders updates by location id |
curl --request GET \ --url 'https://loms-api.erblue.com/v1/labs/%7BlabId%7D/lab-orders/updates?since=SOME_STRING_VALUE&locationId=SOME_STRING_VALUE' \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
[- {
- "reservation_code": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Returns a URL to download the Chain of Custody document for an order. With no body, or no watermarks, the URL is for the original document. A body must be sent as JSON with Content-Type: application/json. A body sent with another content type, or without one, returns a 415 response. With watermarks, a copy is created with the text printed on it, and the URL is for the copy. Each watermark places text in one corner: top_left, top_right, bottom_left or bottom_right, each used at most once. It has the pages it appears on ("all", or a list of page numbers starting at 1, "first" and "last"), up to 5 lines of 40 characters, and an optional color of black or red. Each request with watermarks creates a new copy from the original document, so send everything every time. Text is printed in 10 point Courier and is not wrapped or resized, so long text in two corners along the same edge can overlap on narrow pages.
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
Array of objects <= 4 items Text to print on the document. Each position can be used at most once. Repeating a position returns a 400 response. Leave this out, or send an empty list, to get the original document. | |||||||||
Array (<= 4 items)
| |||||||||
{- "watermarks": [
- {
- "position": "top_left",
- "pages": "all",
- "lines": [
- "OrderID: 552611690"
]
}, - {
- "position": "bottom_right",
- "pages": [
- "first"
], - "lines": [
- "IR Thermometer ID: 1234",
- "Received on ice: Yes",
- "Received preserved: Yes",
- "Temperature: 4.2 °C"
]
}, - {
- "position": "bottom_left",
- "pages": [
- "last"
], - "color": "red",
- "lines": [
- "Revised 2026-10-05 per customer email"
]
}
]
}{- "url": "string"
}Retrieves a lab order sample results upload url by reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
curl --request GET \ --url https://loms-api.erblue.com/v1/labs/%7BlabId%7D/lab-orders/%7BreservationCode%7D/documents/upload-sample-results-url \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{- "url": "string",
- "identifier": "string"
}Completes a lab order sample results upload by reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
| identifier required | string Lab order sample results upload identifier |
{- "identifier": "string"
}Retrieves a lab order samples results by reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
curl --request GET \ --url https://loms-api.erblue.com/v1/labs/%7BlabId%7D/lab-orders/%7BreservationCode%7D/samples/results \ --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
[- {
- "lab_sample_id": "string",
- "result_status": "Analyzed",
- "lab_test_method": "string",
- "aliquot_id": "string",
- "result_qualifier": "<",
- "result_value": 0,
- "result_type": "string",
- "unit": "string",
- "mrl_value": 0,
- "identifier": "string",
- "analysis_date": "2019-08-24T14:15:22Z",
- "comment": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "detected": true
}
]Updates a lab order samples results for a given reservation code
| labId required | string Your lab organization id |
| reservationCode required | string Reservation code for the lab order |
| lab_sample_id required | string A unique identifier assigned to the sample by the laboratory. |
| lab_test_method required | string The specific laboratory method or protocol used to analyze the sample. |
| aliquot_id required | string A unique identifier for an aliquot of the sample. |
| result_qualifier | string Enum: "<" ">" Indicates additional information or qualifiers about the result value. |
| result_value required | number The numerical result of the analysis. |
| result_type required | string Classification of the type of result being reported. |
| unit required | string The unit of measurement for the result value. |
| mrl_value required | number The minimum reporting limit (MRL) for the analysis. |
| identifier required | string A unique identifier representing the type of analysis or target. |
| analysis_date required | string <date-time> The date and time when the analysis was completed. |
| comment | string Any additional notes or observations about the result or analysis. |
| result_status required | string Enum: "Analyzed" "Not Analyzed" The current sample result status of the sample. |
| sample_code required | string A unique identifier assigned to the sample when the order is created. |
[- {
- "lab_sample_id": "string",
- "lab_test_method": "string",
- "aliquot_id": "string",
- "result_qualifier": "<",
- "result_value": 0,
- "result_type": "string",
- "unit": "string",
- "mrl_value": 0,
- "identifier": "string",
- "analysis_date": "2019-08-24T14:15:22Z",
- "comment": "string",
- "result_status": "Analyzed",
- "sample_code": "string"
}
][- {
- "lab_sample_id": "string",
- "result_status": "Analyzed",
- "lab_test_method": "string",
- "aliquot_id": "string",
- "result_qualifier": "<",
- "result_value": 0,
- "result_type": "string",
- "unit": "string",
- "mrl_value": 0,
- "identifier": "string",
- "analysis_date": "2019-08-24T14:15:22Z",
- "comment": "string",
- "sample_code": "string",
- "customer_sample_id": "string",
- "detected": true
}
]Creates or updates accounts in bulk, matching on billing_id within your lab organization. Existing accounts are updated in place; accounts that are absent from the request are left untouched. Each request is applied as a single transaction, so send large sets as several requests of up to 1000 accounts.
| labId required | string Your lab organization id |
| billing_id required | string non-empty The unique identifier for the account within your organization. |
| name required | string non-empty The account name. |
| contact_name | string or null non-empty The primary contact name. Omitted or null values leave an existing contact name unchanged. |
| contact_email | string or null <email> The primary contact email. Omitted or null values leave an existing contact email unchanged. |
| address1 | string or null The primary address line for the account. |
| address2 | string or null The secondary address line for the account. |
| city | string or null The city for the account address. |
| state_province | string or null = 2 characters The two-letter state or province code for the account address. |
| zip_postal | string or null The postal or ZIP code for the account address. |
| country | string or null = 2 characters The two-letter country code for the account address. |
| active | boolean or null Whether the account is active. Defaults to true when omitted or null, on both insert and update. |
[- {
- "billing_id": "string",
- "name": "string",
- "contact_name": "string",
- "contact_email": "user@example.com",
- "address1": "string",
- "address2": "string",
- "city": "string",
- "state_province": "st",
- "zip_postal": "string",
- "country": "st",
- "active": true
}
]{- "inserted": 0,
- "updated": 0,
- "unchanged": 0
}