Lab

Retrieve lab results details

Retrieve the lab test result details as provided by the licensed lab.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
lot_id
required
string

lot id for requested lab results

Example: a521f55de4394f4f99c282be687e63aa
query Parameters
license_number
required
string

Reference (entity_ID) for the license. This is the business license number issued by the state.

Example: license_number=ABC-1234
entity_state
string

Queryable entity states for lab test results. Not all entity states available for all states.

Enum: "lab_testing_not_submitted" "lab_testing_submitted" "lab_testing_in_progress" "lab_testing_awaiting_confirmation" "lab_testing_passed" "lab_testing_failed" "lab_retesting" "lab_retesting_passed" "lab_retesting_failed" "lab_testing_remediated_lot" "lab_testing_random_selection" "lab_testing_not_required" "lab_testing_process_validation" "lab_testing_completed"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "array"
Array of objects
Array
license_number
string

reference (entity_ID) for the license. This is the business license number issued by the state..

id
string

reference (entity_ID) for the lab test result from track & trace system.

Array of objects
Array
id
string

reference (entity_id) for the lab from track & trace system.

license_number
string

reference (entity_ID) for the license. This is the license issued to the lab.

name
string

name of the lab.

primary
string

indicates if this is the primary lab or a subcontracted lab.

contains_non_mandatory_tests
boolean

true if lab results contains tests not required by the state.

overall_result
string

indicates overall result of all tests, example “TestPassed”.

original_test_id
string

id of the original test, if this is a retest.

test_use
string

test usage parameter as required by specific states.

batch_type
string

batch type identification as required by specific states.

is_extraction_eligible
boolean or null

true if origin lot is eligible for extraction to concentrate.

is_retest_eligible
boolean or null

true if origin lot is eligible for retest after remediation or further processing.

Array of objects
Array
date
string

timestamp test was completed in ISO 8601 UTC format.

status
string

status of the test, example “TestPassed”.

comment
string

comment related to the test.

is_non_mandatory
boolean

true if the test is not required by the state.

revoked_date
string

date the result of the test was revoked in ISO 8601 UTC format.

test_detail_revoke_date
string

date the details of the revoked test were released in ISO 8601 UTC format.

object

type of the test.

object

results of the test.

Array of objects

documents related to the lab test results.

Array
file_name
string

filename of the document.

encoding
string

encoding of the document file.

path
string

URL path of the document file.

Array of objects

list of state changes made to the entity. Entity states for lab test results [lab_testing_not_submitted, lab_testing_submitted, lab_testing_in_progress, lab_testing_awaiting_confirmation, lab_testing_passed, lab_testing_failed, lab_retesting, lab_retesting_passed, lab_retesting_failed, lab_testing_remediated_lot, lab_testing_random_selection, lab_testing_not_required, lab_testing_process_validation, lab_testing_completed].

Array
state
string

state of the entity.

date
string

timestamp when the state was recorded ISO 8601 UTC format.

reason
string

additional information for the 'state' change.

actioned_by
string

username of the person who updated the state of the entity (if applicable).

object
license_number
string

reference (entity_ID) for the license. This is the business license number issued by the state.

object

specific action for this lot operation.

id
string

reference (entity_ID) for the lot.

name
string

the display name of the lot.

barcode
string

barcode of the lot

quantity
number <float>

quantity of the units measured in unit_of_measure.

unit_of_measure
string

the unit of measure for the product in the lot.

date
string

timestamp date of lot creation in ISO 8601 UTC format

object

type of the lot as required by specific states

object
object

origin of the lot.

object
object

additional information about the lot.

Array of objects

adjustments to lot.

Array of objects

The remediation action made to the package.

Array of objects

list of state changes made to the entity. Entity states for lot [active, inactive, finished, unfinished, onhold, discontinued, lab_testing_not_submitted, lab_testing_submitted, lab_testing_in_progress, lab_testing_awaiting_confirmation, lab_testing_passed, lab_testing_failed, lab_retesting, lab_retesting_passed, lab_retesting_failed, lab_testing_remediated_lot, lab_testing_random_selection, lab_testing_not_required, lab_testing_process_validation, lab_testing_completed, used, in_transit, location_changed].

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/labs/results/{lot_id}
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve lab test states

Retrieve a list of lab test states for a specific state.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "array"
Array of objects
Array
id
string

reference id for the lab test state.

type
string or null

type description of lab test state.

name
Array of strings

list of states for the lab test type.

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/labs/test_states
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}

Retrieve lab test types

Retrieve a list of lab test types for a specific state.

SecurityApiKeyAuth and CustomAuth
Request
path Parameters
state
required
string

Lower case ANSI standard 38:2009 USPS codes of the US state where licensee is operating.

Enum: "ca" "or" "nv" "mt" "co" "mi" "il" "ma" "ri" "nj" "md" "de" "va" "oh" "ky" "al" "ms" "mn" "la" "ok" "sd" "me"
header Parameters
x-api-key
required
string

Trace API key header

Example: b123x21wbHlkYXBpa2V5
Authorization
required
string

Company and user credentials authentication

Example: KMP-JSON token=dmVuZG9yLWFwaS1rZXk6dX12312sdfs2V5
Responses
200

OK

Response Schema: application/json
object
type
string
Value: "array"
Array of objects
Array
id
string

reference id for the lab test type.

type
string or null

type of test.

name
string

name of the test.

detail
string or null

additional information about the test.

is_test_result_required
boolean

true, if the test result is required by the state.

is_informational_only
boolean

true, if the test is not required nor reported to the state.

is_always_passes
boolean

true, if test passes regardless of the result.

object

detailed results of the test.

mode
string

how test is measured, example requires value between min and max.

test_min_value
number or null <float>

minimum value allowed to pass the test.

test_max_value
number or null <float>

maximum value allowed to pass the test.

unit_of_measure
string or null

unit of measure for the min and max values.

pass_fail
string or null

used when test either passes or fails without min or max values.

dependency_mode
string

indicates if all tests are required for the lot to pass.

Array of objects
Array
type
string
detail
string
400

Bad Request

get/{state}/v1/labs/test_types
Response samples
application/json
{
  • "results": {
    },
  • "warnings": [ ]
}