---
title: "Batch create TestOrder"
method: POST
path: "/api/v3/test-order:batch-create"
tags: ["Test Order"]
---

# Batch create TestOrder

`POST /api/v3/test-order:batch-create`

## Request

- Base URL: `https://{tenant_name}.benchling.com`
- URL: `https://{tenant_name}.benchling.com/api/v3/test-order:batch-create`
- Auth: HTTP bearer

Batch create Test Orders synchronously in one transaction. Maximum 25 items per request.

Each item follows the same requirements as the single-create endpoint. If any item fails validation, the transaction fails and no Test Orders are created.

## Request body

- object
  - `items` CreateTestOrderInput[], required
    - `containerId` string, nullable: Optional API ID of the container holding the sample. The container must not be archive and must contain the sample.
    - `dilutionFactor` integer, nullable: 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.
    - `procedureId` string, required: The API ID of the assayprocedure to perform the test.
    - `sampleId` string, required: The API ID of the trial sample entity to test. The sample must not be archived and must use a trial sample schema.
    - `studyIds` string[]: 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.
    - `testDefinitionId` string, required: The API ID of the test definition to perform.

## Response `201`

Created

- TestOrderBatchcreateResponse201
  - `items` TestOrder[], required
    - `__typename` string
    - `analysisComment` string, nullable: Additional comments provided for a test order with a status of blocked, invalid, or canceled.
    - `container` ContainerRef
      - `__typename` string
      - `id` string, api_id
    - `createdAt` string, datetime: Timestamp of when the test order was created.
    - `dilutionFactor` integer, nullable: The dilution factor of the test order.
    - `id` string: The ID of the test order.
    - `modifiedAt` string, datetime: Timestamp of when the test order was last modified.
    - `name` string: The name of the test order.
    - `plateWellAssociations` TestOrderLinkedPlateWell[]: The plate wells this test order has been linked to.
      - `__typename` string
      - `plate` WellPlateRef
        - `__typename` string
        - `id` string, api_id
      - `wellPosition` string: Alphanumeric position of plate well eg. A1, B19
    - `procedure` ProcedureRef
      - `__typename` string
      - `id` string, api_id
    - `procedureMethodExecutionInstance` ProcedureMethodExecutionInstanceRef
      - `__typename` string
      - `id` string, api_id
    - `result` ResultRef
      - `__typename` string
      - `id` string, api_id
    - `retestSourceProcedureMethodExecutionInstance` ProcedureMethodExecutionInstanceRef
      - `__typename` string
      - `id` string, api_id
    - `sample` EntityRef
      - `__typename` string
      - `id` string, api_id
    - `status` 'PENDING' | 'BLOCKED' | 'IN_PROGRESS' | 'CANCELLED' | 'INVALID' | 'COMPLETED': The status of the test order.
    - `testDefinition` TestDefinitionRef
      - `__typename` string
      - `id` string, api_id

## Other responses

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

---

[API](https://skmtc.dev/benchling/apis/benchling-api.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api/revisions/c9f087b98b8b?raw)
