> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.one.mtxsci.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.one.mtxsci.com/_mcp/server.

# Results

GET https://one.mtxsci.com/api/1.1/wf/results-v2

## 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

| Parameter              | Format                  | Requirement and usage                                                                 |
| ---------------------- | ----------------------- | ------------------------------------------------------------------------------------- |
| `page`                 | Integer in query string | Page to retrieve; start at `1`.                                                       |
| `customer_id`          | String                  | Required. Authorized customer from **customers-v2**.                                  |
| `sample_id`            | String                  | Optional downstream sample identifier filter.                                         |
| `sample_submission_id` | String                  | Optional submission filter: use `sample_submission_id` returned by **submission-v2**. |
| `start_date`           | `YYYY-MM-DD`            | Date-range start filter.                                                              |
| `end_date`             | `YYYY-MM-DD`            | Date-range end filter.                                                                |

### Response envelope

| Field         | Type             | Description                              |
| ------------- | ---------------- | ---------------------------------------- |
| `page`        | String           | Returned page number, for example `"1"`. |
| `hasNextPage` | Boolean          | Whether another page is available.       |
| `samples`     | Array of objects | Records in this page.                    |

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`.

| Field              | Observed type    | Description                                                                                                           |
| ------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| `testDescription`  | String           | Human-readable test name.                                                                                             |
| `code`             | String           | Test catalog code, corresponding to `code` in **tests-v2**.                                                           |
| `aduedate`         | String           | Analysis due date and time as display text.                                                                           |
| `intelgroup`       | String           | Test grouping label returned by the service.                                                                          |
| `avaluser`         | String           | Analysis validation user reference.                                                                                   |
| `avaldate`         | String           | Analysis validation date and time as display text.                                                                    |
| `analysisLateFlag` | String           | Analysis late indicator encoded as text.                                                                              |
| `resultType`       | String           | Result classification.                                                                                                |
| `nonreporting`     | String           | Nonreporting indicator encoded as text, not a JSON boolean.                                                           |
| `rush`             | Boolean          | Rush indicator returned by the service. This response field does not make `rush` a supported **submission-v2** input. |
| `quantity`         | Integer          | Quantity returned with the test.                                                                                      |
| `tatAnalysis`      | String           | Analysis turnaround value as text.                                                                                    |
| `testStatus`       | String           | Test status.                                                                                                          |
| `results`          | Array of objects | Analyte results for this test.                                                                                        |

### Result fields

These fields appear in each object in `samples[].tests[].results`.

| Field             | Observed type | Description                                                                                 |
| ----------------- | ------------- | ------------------------------------------------------------------------------------------- |
| `analyte`         | String        | Analyte name or description.                                                                |
| `analyteGroup`    | String        | Analyte grouping label.                                                                     |
| `result`          | String        | Reported value; may contain numeric or qualitative text.                                    |
| `resultNumeric`   | String        | Numeric result representation encoded as text. Do not substitute it for the reported value. |
| `unit`            | String        | Reported unit or basis of measurement.                                                      |
| `mdl`             | String        | Detection-limit field returned by the service; may be empty.                                |
| `violationValue`  | String        | Violation value returned by the service; may be empty.                                      |
| `violationType`   | String        | Violation type encoded as text.                                                             |
| `violationFlag`   | Boolean       | Violation indicator returned by the service.                                                |
| `resultSortOrder` | String        | Result sort-order value encoded as text.                                                    |

### 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](https://one.mtxsci.com). 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.

Reference: https://docs.one.mtxsci.com/ms-cp-customer-api/results

## Authentication

- `Authorization` header (bearer token, required) — Use response.token from authenticate-v2. response.expires is the lifetime in seconds (86400 = 24 hours).

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Returned page number, for example `"1"`.
- `customer_id` (string, required) — Required authorized customer_id from customers-v2.
- `sample_id` (string, optional) — Optional downstream sample identifier filter.
- `sample_submission_id` (string, optional) — Optional submission filter: use `sample_submission_id` returned by **submission-v2**.
- `start_date` (date, optional) — Date-range start filter.
- `end_date` (date, optional) — Date-range end filter.

## Response

### 200

OK

## Examples

**Response**

```json
{
  "hasNextPage": false,
  "page": "1",
  "samples": [
    {
      "client_sample_ref": "string",
      "collectedAt": "string",
      "customerCollectedAt": "string",
      "customerRequestNo": "string",
      "email": "string",
      "empZone": "string",
      "locCode": "string",
      "lotNo": "string",
      "prodDescription": "string",
      "productId": "string",
      "reportGroup": "string",
      "reportedAt": "string",
      "sampleCondition": "string",
      "sampleDescription1": "string",
      "sampleDueDate": "string",
      "sampleLateFlag": "string",
      "sampleNumber": "string",
      "sampleStatus": "string",
      "sampleTemperature": "string",
      "sample_id": "string",
      "sample_submission_id": "string",
      "submittedAt": "string",
      "submitter": "string",
      "tatSample": "string",
      "tests": [
        {
          "aduedate": "string",
          "analysisLateFlag": "string",
          "avaldate": "string",
          "avaluser": "string",
          "code": "string",
          "intelgroup": "string",
          "nonreporting": "string",
          "quantity": 0,
          "resultType": "string",
          "results": [
            {
              "analyte": "string",
              "analyteGroup": "string",
              "mdl": "string",
              "result": "string",
              "resultNumeric": "string",
              "resultSortOrder": "string",
              "unit": "string",
              "violationFlag": false,
              "violationType": "string",
              "violationValue": "string"
            },
            {
              "analyte": "string",
              "analyteGroup": "string",
              "mdl": "string",
              "result": "string",
              "resultNumeric": "string",
              "resultSortOrder": "string",
              "unit": "string",
              "violationFlag": false,
              "violationType": "string",
              "violationValue": "string"
            }
          ],
          "rush": false,
          "tatAnalysis": "string",
          "testDescription": "string",
          "testStatus": "string"
        },
        {
          "aduedate": "string",
          "analysisLateFlag": "string",
          "avaldate": "string",
          "avaluser": "string",
          "code": "string",
          "intelgroup": "string",
          "nonreporting": "string",
          "quantity": 0,
          "resultType": "string",
          "results": [
            {
              "analyte": "string",
              "analyteGroup": "string",
              "mdl": "string",
              "result": "string",
              "resultNumeric": "string",
              "resultSortOrder": "string",
              "unit": "string",
              "violationFlag": false,
              "violationType": "string",
              "violationValue": "string"
            }
          ],
          "rush": false,
          "tatAnalysis": "string",
          "testDescription": "string",
          "testStatus": "string"
        }
      ],
      "validatedAt": "string"
    }
  ]
}
```

**SDK Code**

```python results_example
import requests

url = "https://one.mtxsci.com/api/1.1/wf/results-v2"

querystring = {"customer_id":"customer_id","end_date":"2026-08-20","page":"1","start_date":"2026-08-19"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript results_example
const url = 'https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go results_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby results_example
require 'uri'
require 'net/http'

url = URI("https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java results_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php results_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp results_example
using RestSharp;

var client = new RestClient("https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift results_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://one.mtxsci.com/api/1.1/wf/results-v2?customer_id=customer_id&end_date=2026-08-20&page=1&start_date=2026-08-19")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```