Skip to navigation

Create TestOrder

Create a Test Order for a trial sample using a Test Definition in a published assay procedure. New Test Orders start with the PENDING or BLOCKED status when a discrepancy is detected on the sample or container.

Required fields

FieldDescription
testDefinitionIdTest Definition to perform.
sampleIdUnarchived trial sample entity.
procedureIdPublished assay procedure.

Constraints

  • The Procedure must be an ASSAY, have a published version, and include testDefinitionId in its published configuration.
  • testDefinitionId and containerId, when present, must reference unarchived objects.
  • If studyIds is provided, every Study must already be associated with sampleId.
  • When the Procedure configures allowed dilution factors for this Test Definition, dilutionFactor is required and must be one of them. Otherwise, omit it.

Optional references

  • containerId identifies the sample container.
  • studyIds associates the test order with existing studies.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
procedureIdstringRequired
The API ID of the assayprocedure to perform the test.
sampleIdstringRequired
The API ID of the trial sample entity to test. The sample must not be archived and must use a trial sample schema.
testDefinitionIdstringRequired
The API ID of the test definition to perform.
containerIdstring or nullOptional
Optional API ID of the container holding the sample. The container must not be archive and must contain the sample.
dilutionFactorinteger or nullOptional
Optional positive dilution factor. When the selected procedure includes specifies allowed dilution factors for this Test Definition, this value is required and must be one of its configured allowed factors.
studyIdslist of stringsOptional

ID of the study to create the test order in, as a single-item list. The sample must be associated with the study, and the study’s sample test plan must include the procedure for the sample’s sample definition.

Response

Created
__typenamestringOptional
analysisCommentstring or nullOptional
Additional comments provided for a test order with a status of blocked, invalid, or canceled.
containerobject or nullOptional
The container associated with the sample being tested in this test order
createdAtstringOptionalformat: "datetime"
Timestamp of when the test order was created.
dilutionFactorinteger or nullOptional
The dilution factor of the test order.
idstringOptional
The ID of the test order.
modifiedAtstringOptionalformat: "datetime"
Timestamp of when the test order was last modified.
namestringOptional
The name of the test order.
plateWellAssociationslist of objectsOptional
The plate wells this test order has been linked to.
procedureobject or nullOptional

The Assay (Procedure) for which this Test Order is created. Since a Test Definition can be used in multiple Assays, this association ensures clarity on which template should be followed for the specific Test Order. It is necessary to establish this association prior to the Assay Run to avoid ambiguity.

procedureMethodExecutionInstanceobject or nullOptional
The execution instance of the procedure method, linking the Test Order to the specific Assay Run to enable easy retrieval of all related Test Orders.
resultobject or nullOptional
The result of the test order.
retestSourceProcedureMethodExecutionInstanceobject or nullOptional
The execution instance of the procedure method this retest order was created in the context of, linking the Test Order to the specific Assay Run to enable easy retrieval of all related Retest Orders.
sampleobjectOptional
The sample being tested in this test order
statusenumOptional
The status of the test order.
testDefinitionobjectOptional
The test definition associated with this test order.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error