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

# Tests

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

## List tests

Retrieve Matrix test codes and descriptions for a customer. Maintain the mapping between your test identifiers and Matrix codes in your system.

**Request:** `GET https://one.mtxsci.com/api/1.1/wf/tests-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**. |
| `code`        | String                  | Optional Matrix test code filter.                    |

### Response envelope

| Field         | Type             | Description                              |
| ------------- | ---------------- | ---------------------------------------- |
| `page`        | String           | Returned page number, for example `"1"`. |
| `hasNextPage` | Boolean          | Whether another page is available.       |
| `tests`       | 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`.

### Test fields

| Field         | Type   | Description                                                                                                       |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| `description` | String | Human-readable test name.                                                                                         |
| `code`        | String | Matrix test code. Send it in `tests` on **submission-v2**; **results-v2** returns it in each test's `code` field. |

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

## 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.
- `code` (string, optional) — Matrix test code. Send it in `tests` on **submission-v2**; **results-v2** returns it in each test's `code` field.

## Response

### 200

OK

## Examples

**Response**

```json
{
  "hasNextPage": false,
  "page": "1",
  "tests": [
    {
      "code": "string",
      "description": "string"
    },
    {
      "code": "string",
      "description": "string"
    }
  ]
}
```

**SDK Code**

```python tests_example
import requests

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

querystring = {"customer_id":"customer_id","page":"1"}

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

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

print(response.json())
```

```javascript tests_example
const url = 'https://one.mtxsci.com/api/1.1/wf/tests-v2?customer_id=customer_id&page=1';
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 tests_example
package main

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

func main() {

	url := "https://one.mtxsci.com/api/1.1/wf/tests-v2?customer_id=customer_id&page=1"

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

url = URI("https://one.mtxsci.com/api/1.1/wf/tests-v2?customer_id=customer_id&page=1")

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 tests_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/tests-v2?customer_id=customer_id&page=1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp tests_example
using RestSharp;

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

```swift tests_example
import Foundation

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

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