submission-v1
Create a submission — draft
Create one submission containing individual samples and optional composites. Each composite has its own fields and tests and refers to individual samples by their client references.
Request: POST {{baseUrl}}/{{submission}}
Proposed success: 201 Created
Headers: Content-Type: application/json and Accept: application/json
Query: api_token={{api_token}} is the collection’s draft authentication configuration.
Before you submit
Obtain the lab enum and applicable product, site, and test catalogs for your customer context. The request’s lab, customer, division, and catalog values are illustrative selections. Replace them with authorized values before sending.
Submission fields
Sample and composite fields
These fields apply to each object in both samples and composites. Composite values are independent of the values on their members.
Optional nullable fields may be omitted or sent as null under this draft. A nullable example does not settle whether a field marked unconfirmed may be omitted.
Environmental site and zone behavior
site_id and emp_zone are optional for both submission types. For an Environmental row with a supplied site_id and omitted or null emp_zone, the application looks up the zone from that site’s existing information. A composite uses its own site; its zone is not inferred from its members. Neither field becomes required when no site is supplied.
Composite membership and tests
-
Declare each individual sample once in
samples. -
Each composite has its own unique
client_sample_refand a nonemptyclient_sample_refsmembership list under the proposed validation rules. -
Members must reference individual samples in this request. Missing references, self references, composite references, and duplicate members within one composite are rejected by the proposed rules.
-
A sample may belong to several composites. The saved request has
C1referencingS1–S4, andC2referencingS1andS2. -
Composite tests apply to the combined material independently of tests on individual samples and other composites. Do not copy them onto constituents.
-
The minimum physical constituent count beyond one, repeat-test rules, and valid composite/test combinations remain unconfirmed.
Ordering and correlation
Individual samples are created in their array order before composites are created, so membership references can resolve. The application then places composites first and renumbers all rows while preserving the relative order within each array.
The saved request therefore produces the intended final order:
Without composites, sample line numbers start at 1. The intended 201 response is returned only after all rows, memberships, and application renumbering are complete; its line numbers must match stored and displayed order. Later edits can change line numbers, so correlate using client references and permanent row identifiers.
Success response — 201 Created
Open the attached 201 Created example for the full mapping of four samples and two composites. Shared members appear only once in the response and do not result in multiple samples created in the application, regardless of how many composites reference them.
Validation and retry considerations
rush is unsupported in v1. Do not send server-generated IDs, line_number, or submitted_at in the request. Catalog selections must be validated in the applicable customer, division, and lab context.
