HTTP reference for traceability. Read authentication and access before using these operations. All examples use made-up data and placeholder credentials.
List typed events; voided events are excluded unless include_void is true. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Parameter
In
Required
Schema
farm_id
path
Yes
{"type":"string","format":"uuid"}
skip
query
No
{"type":"integer"}
take
query
No
{"type":"integer"}
kind
query
No
{"type":"string","enum":["MOVEMENT","PURCHASE","SALE","IMPORT","EXPORT","DEATH","SLAUGHTER","DISPOSAL","IDENTIFICATION"]} Filter by typed event kind.
Create one typed event atomically with an idempotent request key. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
GET /v1/farm/{farm_id}/traceability-events/history
Identifier History
Look up typed identifier observations by value across revisions. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Parameter
In
Required
Schema
farm_id
path
Yes
{"type":"string","format":"uuid"}
value
query
Yes
{"type":"string","minLength":1,"maxLength":128} Identifier string value to search (1-128 characters after trimming).
type
query
No
{"type":"string","maxLength":50} Optional free-form identifier type filter (50 characters or fewer after trimming).
Conflict (stale version, reused key, or returned/void event).
No body
200 response schema (application/json)
Field
Type
Presence
Constraints
matches
array
Required
matches[]
object
Required
untyped
boolean
Required
GET /v1/farm/{farm_id}/traceability-events/transport-suggestions
Transport Suggestions
Bounded recent transporter/vehicle suggestions from current nonvoid revisions. The strict take limit is 1-100 and defaults to 20; offset pagination (skip) is not supported. Event, history, and suggestion reads use read:records; writes use write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Parameter
In
Required
Schema
farm_id
path
Yes
{"type":"string","format":"uuid"}
take
query
No
{"type":"integer","minimum":1,"maximum":100,"default":20} Maximum number of suggestions to return (1-100; defaults to 20).
Conflict (stale version, reused key, or returned/void event).
No body
200 response schema (application/json)
Field
Type
Presence
Constraints
suggestions
array
Required
suggestions[]
object
Required
GET /v1/farm/{farm_id}/traceability-events/status/{request_key}
Write Status Reconciliation
Read-only reconciliation of a previously attempted event write. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Conflict (stale version, reused key, or returned/void event).
No body
200 response schema (application/json)
Field
Type
Presence
Constraints
request_key
string
Required
event_id (variant 1)
null
Required
event_id (variant 2)
string
Required
revision (variant 1)
null
Required
revision (variant 2)
integer
Required
status (variant 1)
null
Required
status (variant 2)
string
Required
GET /v1/farm/{farm_id}/traceability-events/{event_id}
Get Traceability Event
Get one typed event with its current revision and projections. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
GET /v1/farm/{farm_id}/traceability-events/{event_id}/revisions
Traceability Event Revisions
List every stored revision, including superseded and voided facts. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Conflict (stale version, reused key, or returned/void event).
No body
200 response schema (application/json)
Field
Type
Presence
Constraints
event_id
string
Required
current_revision
integer
Required
status
string
Required
revisions
array
Required
revisions[]
object
Required
POST /v1/farm/{farm_id}/traceability-events/{event_id}/correct
Correct Traceability Event
Append a full replacement revision, rebuilding projections atomically. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
POST /v1/farm/{farm_id}/traceability-events/{event_id}/void
Void Traceability Event
Void a typed event with a reason; history keeps every revision. Event/history/suggestion scopes use read:records/write:records; a payload that updates current animal identifiers or status additionally requires write:animals.
Validation and authentication errors generally use this envelope. Rate-limit errors omit data; OAuth polling also has protocol-specific errors shown in its reference.