List test types

GET /v0/testtypes

Return every test type Confident supports. A test type is a single analysis a lab can run, such as cannabinoids or pesticides; a sample can be assigned any number of test types through its test packages.

Try it

Log in to send test requests to this endpoint straight from the docs.

Responses

200 Success
test_types array of objects
Show 3 child attributes Hide 3 child attributes
id integer

Unique ID for Test Type

name string

Test Type Name

abbreviation string

Test Type Abbreviation

400 Bad request

The request was malformed or failed validation. Validation failures include per-field messages in error_details.

Possible error_code values: invalid_request, request_too_old.

401 Unauthorized

Authentication failed.

Possible error_code values: missing_api_key, invalid_api_key, invalid_credentials_type, api_access_restricted, api_access_denied, missing_signature, missing_timestamp, invalid_timestamp, invalid_signature.

403 Permission denied

The API key is valid but does not have permission for this endpoint (for example, a client key calling a labs endpoint).

Possible error_code values: permission_denied.

How to sign requests
# X-ConfidentLims-Signature: see the Request Signing guide - https://api.confidentcannabis.com/v0/docs/request-signing.md
curl -X GET 'https://api.confidentcannabis.com/v0/testtypes' \
  -H 'X-ConfidentLims-APIKey: YOUR_API_KEY' \
  -H 'X-ConfidentLims-Timestamp: UNIX_TIMESTAMP' \
  -H 'X-ConfidentLims-Signature: REQUEST_SIGNATURE'
Response · 200
{
  "success": true,
  "test_types": [
    {
      "id": 1,
      "name": "Cannabinoids",
      "abbreviation": "CAN"
    },
    {
      "id": 2,
      "name": "Terpenes",
      "abbreviation": "TER"
    }
  ]
}