Skip to navigation

Samples

View as Markdown

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

ParameterFormatRequirement and usage
pageInteger in query stringPage to retrieve; start at 1.
customer_idStringRequired. Authorized customer from customers-v2.
sample_idStringOptional downstream sample identifier filter.
sample_submission_idStringOptional submission filter: use sample_submission_id returned by submission-v2.
start_dateYYYY-MM-DDDate-range start filter.
end_dateYYYY-MM-DDDate-range end filter.

Response envelope

FieldTypeDescription
pageStringReturned page number, for example "1".
hasNextPageBooleanWhether another page is available.
samplesArray of objectsRecords in this page.

Keep the customer and filters unchanged while paging. Increment page while hasNextPage is true; stop when it is false.

Sample fields

FieldTypeDescription
client_sample_refStringYour reference for this individual sample or composite; correlate within the submission.
collectedAtStringCollection date and time as display text.
customerCollectedAtStringCustomer collection date and time as display text.
customerRequestNoStringCustomer request reference; may be empty. submission-v2 uses request_number instead.
emailStringEmail address returned with the sample.
empZoneStringEMP zone encoded as text.
locCodeStringLocation code returned with the sample.
lotNoStringLot reference. Preserve as text. submission-v2 uses lot instead.
prodDescriptionStringProduct description; may be empty. submission-v2 uses product_desc instead.
productIdStringProduct identifier. Catalog and submission requests use product_id instead.
reportGroupStringReport grouping reference.
reportedAtStringReporting date and time as display text.
sampleConditionStringSample condition; may be empty.
sampleDescription1StringSample description; may be empty. submission-v2 uses description instead.
sampleDueDateStringSample due date and time as display text.
sampleLateFlagStringSample late indicator encoded as text.
sampleNumberStringSample number returned alongside sample_id. Preserve both fields as returned.
sampleStatusStringSample status.
sampleTemperatureStringSample temperature as text.
sample_idStringDownstream sample identifier. Preserve it separately from the submission and client references.
sample_submission_idStringSubmission identifier returned by submission-v2.
submittedAtStringSubmission date and time as display text.
submitterStringSubmitter name returned with the sample.
tatSampleStringSample turnaround value as text.
validatedAtStringValidation 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.

Authentication

AuthorizationBearer

Use response.token from authenticate-v2. response.expires is the lifetime in seconds (86400 = 24 hours).

Query parameters

pageintegerOptional>=1Defaults to 1

Returned page number, for example "1".

customer_idstringRequired

Required authorized customer_id from customers-v2.

sample_idstringOptional
Downstream sample identifier. Preserve it separately from the submission and client references.
sample_submission_idstringOptional

Submission identifier returned by submission-v2.

start_datedateOptional

Date-range start filter.

end_datedateOptional

Date-range end filter.

Response

OK