Create Retention Sample Submission
POST/api/v2/fifo-layers/:fifoLayer/retention-samples/:sample/submissions
Record a trip a reserve sample made.
inventory:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Fields: destination_type (lab, amazon, third_party, other), recipient (required, max 255), sent_at (required, YYYY-MM-DD), tracking_number (max 120), quantity (units sent, optional), return_expected (boolean, default true), returned_at (YYYY-MM-DD), result (pending, passed, failed, no_result; default pending), result_document_id (a document already filed on the sample's lot), notes (max 2000).
Status. The sample's status is re-derived on every trip change: any open trip (expected back, no returned_at) makes it sent_to_lab ("Sent out"); with no open trip and at least one returnable trip back it becomes returned, and any stock it holds stays on hold. A released sample stays released until a new open trip. A one-way trip (return_expected: false) does not change the status. A discarded sample is never changed. The response returns both the trip and the re-derived sample.
Refused with 422: a trip on a discarded sample ("This sample was discarded."); sent_at before the sample's retained_at (or received_at for manufacturer samples); returned_at before sent_at; a result_document_id not linked to the sample's lot; an archived lot.
Requires permission: inventory.manage_quality
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.