Create a new sample

Creates a single sample of the chosen sample type, optionally with meta-field values and an initial quantity. Use this for one-off creates from your client; for bulk imports prefer POST /samples/bulk.

Behaviour to know about:

  • By default the call does not create any meta fields, even when the sample type marks them required. Set autoCreateMetaDefaults=true (query parameter) to populate meta fields whose sample-type definition has a default value or auto-numbering — fields without either are still skipped.
  • quantitySettings is optional. Leave it out for samples whose type doesn't track quantity. If the sample type has quantityRequired set, omitting quantitySettings is rejected with 400.
  • sampleMetas may be omitted (treated as empty), but values you supply must reference meta keys that exist on the sample type.

Returns the new sampleID.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
boolean
Body Params
sampleMetas
array of objects
sampleMetas
quantitySettings
object
int32
required
boolean
int32
string
required
string
string
string
int32
int32
date-time
parentIds
array of int32s
parentIds
Headers
string
Defaults to Swagger
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!