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

# Samples

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

## List samples

Retrieve sample identifiers, client references, product details, status, and dates for an authorized customer.

**Request:** `GET https://one.mtxsci.com/api/1.1/wf/samples-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

| Field                  | Type   | Description                                                                                     |
| ---------------------- | ------ | ----------------------------------------------------------------------------------------------- |
| `client_sample_ref`    | String | Your reference for this individual sample or composite; correlate within the submission.        |
| `collectedAt`          | String | Collection date and time as display text.                                                       |
| `customerCollectedAt`  | String | Customer collection date and time as display text.                                              |
| `customerRequestNo`    | String | Customer request reference; may be empty. **submission-v2** uses `request_number` instead.      |
| `email`                | String | Email address returned with the sample.                                                         |
| `empZone`              | String | EMP zone encoded as text.                                                                       |
| `locCode`              | String | Location code returned with the sample.                                                         |
| `lotNo`                | String | Lot reference. Preserve as text. **submission-v2** uses `lot` instead.                          |
| `prodDescription`      | String | Product description; may be empty. **submission-v2** uses `product_desc` instead.               |
| `productId`            | String | Product identifier. Catalog and submission requests use `product_id` instead.                   |
| `reportGroup`          | String | Report grouping reference.                                                                      |
| `reportedAt`           | String | Reporting date and time as display text.                                                        |
| `sampleCondition`      | String | Sample condition; may be empty.                                                                 |
| `sampleDescription1`   | String | Sample description; may be empty. **submission-v2** uses `description` instead.                 |
| `sampleDueDate`        | String | Sample due date and time as display text.                                                       |
| `sampleLateFlag`       | String | Sample late indicator encoded as text.                                                          |
| `sampleNumber`         | String | Sample number returned alongside `sample_id`. Preserve both fields as returned.                 |
| `sampleStatus`         | String | Sample status.                                                                                  |
| `sampleTemperature`    | String | Sample temperature as text.                                                                     |
| `sample_id`            | String | Downstream sample identifier. Preserve it separately from the submission and client references. |
| `sample_submission_id` | String | Submission identifier returned by **submission-v2**.                                            |
| `submittedAt`          | String | Submission date and time as display text.                                                       |
| `submitter`            | String | Submitter name returned with the sample.                                                        |
| `tatSample`            | String | Sample turnaround value as text.                                                                |
| `validatedAt`          | String | Validation date and time as display text.                                                       |

Use `sample_submission_id` together with `client_sample_ref` to correlate samples to your records. The same client reference can occur in a different submission. Samples may take up to five minutes to appear after submission acceptance; wait at least five minutes before querying for a new submission.

Use **results-v2** for nested tests and analyte results.

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

## 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) — Downstream sample identifier. Preserve it separately from the submission and client references.
- `sample_submission_id` (string, optional) — Submission identifier 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",
      "validatedAt": "string"
    },
    {
      "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",
      "validatedAt": "string"
    }
  ]
}
```

**SDK Code**

```python samples_example
import requests

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

querystring = {"customer_id":"customer_id","end_date":"2026-10-02","page":"1","start_date":"2026-10-01"}

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

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

print(response.json())
```

```javascript samples_example
const url = 'https://one.mtxsci.com/api/1.1/wf/samples-v2?customer_id=customer_id&end_date=2026-10-02&page=1&start_date=2026-10-01';
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 samples_example
package main

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

func main() {

	url := "https://one.mtxsci.com/api/1.1/wf/samples-v2?customer_id=customer_id&end_date=2026-10-02&page=1&start_date=2026-10-01"

	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 samples_example
require 'uri'
require 'net/http'

url = URI("https://one.mtxsci.com/api/1.1/wf/samples-v2?customer_id=customer_id&end_date=2026-10-02&page=1&start_date=2026-10-01")

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 samples_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/samples-v2?customer_id=customer_id&end_date=2026-10-02&page=1&start_date=2026-10-01")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp samples_example
using RestSharp;

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

```swift samples_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://one.mtxsci.com/api/1.1/wf/samples-v2?customer_id=customer_id&end_date=2026-10-02&page=1&start_date=2026-10-01")! 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()
```