Edit a sample

Update one or more fields on a sample. Only the fields you send are changed.

Samples can only be edited while their order is in the 'placed' or 'in progress' status; editing a sample on an order in any other status returns the invalid_order_status error. A sample belonging to another lab returns 404 rather than 403.

The IDs for type_id, production_method_id and classification_id are the same ones used when creating a sample, and are listed at GET /sampletypes, GET /sampleproductionmethods and GET /sampleclassifications. The new sample type must belong to the same industry as the sample and its order.

The regulator sample ID cannot be edited through this API, because regulator requirements for changing it differ from state to state.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Form Data
string

Display name for the sample.

string

Strain the sample came from.

integer

Sample type ID, from GET /sampletypes.

integer

Production method ID, from GET /sampleproductionmethods.

integer

Classification ID, from GET /sampleclassifications.

date

Date the sample was harvested or produced.

string

Manifest ID in the state's seed-to-sale system.

string

Batch ID from the client's inventory system.

number

Size of the batch the sample came from.

string

Unit for batch_size: units, lb or g.

string

Lot ID from the client's inventory system.

number

Size of the lot the sample came from.

string

Unit for lot_size: units, lb or g.

string

Production run ID from the client's system.

number

Size of the production run.

string

Unit for production_run_size: units, lb or g.

number

Serving size, in units.

number

Number of servings in one container.

string

What one unit means for this sample.

string

What one container means for this sample.

string

Batch ID in the state's seed-to-sale tracking system.

string

(for Leaf) Pre-transfer batch ID.

string

(for Leaf) Pre-transfer inventory or lot ID.

string

Lot ID in the state's seed-to-sale tracking system.

string

Harvest lot ID in the state's seed-to-sale tracking system.

string

Free-text notes about the sample.

string

Sample ID in the lab's own LIMS.

date

Date the sample was collected.

string

Lab-defined custom field.

string
string
string
string
string
string
string
string
string
string
date
date
date
date
date
boolean
boolean
boolean
boolean
boolean
string

Arbitrary JSON stored alongside the sample.

date

Date the results are due back to the client.

Headers
string

HMAC-SHA256 request signature. Required only when request signing is enabled for your API key — see the Request Signing guide.

string

Unix timestamp (seconds) of the request, required only when request signing is enabled for your API key. Requests older than 30 seconds are rejected.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json