Getting Started
Import the collection into Postman. Obtain your Customer Portal login credentials from your Matrix Sciences integration contact.
Authenticate
Send POST https://one.mtxsci.com/api/1.1/wf/authenticate-v2 with these JSON fields:
Set Content-Type: application/json. On status: "success", use the returned response.token. The token lasts response.expires seconds (86400, or 24 hours). Supply it as the collection’s private local token value in Postman. All subsequent requests send:
Select the customer and catalogs
Call GET https://one.mtxsci.com/api/1.1/wf/customers-v2?page=1. Select the returned customer_id for the intended division or plant and store its mapping to your own organizational identifiers.
Use that customer on subsequent requests, for example:
Maintain the mapping from your test identifiers to Matrix test code values. Use product-ids-v2 for Matrix product IDs and the customer item codes under specification.items[].item_number; use sites-v2 for site IDs. The product response includes specification names, descriptions, and mapped item names for specification management.
Prepare and send a submission
Send POST https://one.mtxsci.com/api/1.1/wf/submission-v2 with the Bearer header and Content-Type: application/json.
- Supply
customer_idand the required submission fields documented in the endpoint reference. Use the laboratory and Matrix catalog values applicable to that customer. - Assign a
client_sample_refto each sample and composite and store it with the corresponding external sample record. References must be unique across both arrays within a submission. They may repeat in a different submission. - Put Matrix test codes in each row’s
testsarray. A composite’sclient_sample_refslists its member samples’ references; its ownclient_sample_refidentifies the composite. - Keep result names in your own system. They are not required in the request. For a Matrix test code/analyte pair that maps to several result names, retain the result name originally requested with each sample.
The saved request contains type placeholders. Replace them with valid catalog values, dates, and distinct client references before sending.
Record the response and retrieve results
The saved acceptance response is:
Check status: "Success" and store sample_submission_id alongside your internal request identifier. Samples can take up to five minutes to appear; wait at least five minutes, then query:
Use results-v2 with the same customer and submission filters for samples[].tests[].results[]. Match sample records by client_sample_ref within the submission. Continue through pages while hasNextPage is true.
Receive a results webhook
Configure delivery and the shared-secret header in the Customer Portal integrations module.
- Validate the secret in the header configured during setup before processing the payload. The secret is tied to a division or plant; use your stored mapping to establish that customer context.
- Match webhook
SampleSubmissionIDto thesample_submission_idstored beside your internal request identifier. - Match sample records using
client_sample_refwithin that submission. - Map Matrix test codes to your tests, then map Matrix test code plus analyte to your result names. Where a pair has more than one result-name mapping, use the originally requested name stored with the sample. For example, yeast or mold values for 11 g and 25 g portions require that original context.
The webhook shared secret is separate from the API Bearer token. Preserve the webhook field casing: SampleSubmissionID identifies the submission; the API’s read and submission responses use sample_submission_id.
