Results
List test results
Retrieve samples with nested laboratory tests and analyte results. Preserve the sample, test, and analyte context for each result.
Request: GET https://one.mtxsci.com/api/1.1/wf/results-v2
Authentication: Authorization: Bearer <token>, using response.token from authenticate-v2.
Success: 200 OK with a JSON body recorded as text/plain;charset=utf-8.
Request body: None.
Query parameters
Response envelope
Keep the customer and filters unchanged while paging. Increment page while hasNextPage is true; stop when it is false.
Sample fields
Each object in samples contains the sample fields documented on samples-v2, including sample_submission_id and client_sample_ref, plus tests (an array of objects).
Test fields
These fields appear in each object in samples[].tests.
Result fields
These fields appear in each object in samples[].tests[].results.
Correlation and result mapping
Traverse samples[].tests[].results[]. Match the submission using sample_submission_id and the individual sample or composite using client_sample_ref. Use each test’s code and each result’s analyte to map the value to your system’s result name. Preserve the originally requested result name when one Matrix test/analyte pair maps to several customer result names. Result names are maintained by your system and are not required in submission requests.
result, resultNumeric, and nonreporting are strings; rush and violationFlag are booleans; quantity is an integer in the example. Preserve reported values, units, and field casing. Read timestamps have no offset; do not assume UTC.
Results webhook
Configure delivery in the Customer Portal integrations module. Validate the shared secret in the header agreed during setup before processing a payload. The secret is tied to a division or plant and is separate from the API Bearer token.
Use webhook SampleSubmissionID to find the internal request linked to the submission’s returned sample_submission_id. Correlate samples by client_sample_ref within that submission. Maintain Matrix test code-to-customer test mappings and Matrix test code plus analyte-to-result-name mappings in your system. For a one-to-many mapping, retain which result name was originally requested, such as the applicable 11 g or 25 g yeast or mold result.
The webhook submission field is SampleSubmissionID; the read API field is sample_submission_id. Apply the webhook’s configured payload field names when receiving events. The saved example below is the results-v2 read response.
Saved example
The attached 200 OK example preserves the documented field names, nesting, and types using generic placeholders. Use the actual hasNextPage flag to determine whether another page is available.
Authentication
Use response.token from authenticate-v2. response.expires is the lifetime in seconds (86400 = 24 hours).
Query parameters
Returned page number, for example "1".
Required authorized customer_id from customers-v2.
Optional submission filter: use sample_submission_id returned by submission-v2.
Date-range start filter.
Date-range end filter.
