traceability

Traceability Report

Farm-record completeness report over typed events; movement gap checks, identification basis, sent/received discrepancies, and a separate legacy-unstructured section. kind and movement filters intersect (AND). Typed events paginate in stable created_at DESC, id DESC order; events/rows_for_export are the selected page while coverage describes all matching events. format=csv validates the filters, ignores pagination, and exports up to 100,000 typed-event rows (no legacy or metadata rows). Independent of the ENABLE_REPORTS gate; not an official submission.

get/v1/farm/{farm_id}/traceability-report

Request

  • Base URL: https://api.ranch.bot
  • URL: https://api.ranch.bot/v1/farm/{farm_id}/traceability-report
  • Auth: HTTP bearer

Path parameters

farm_idstring uuid required

Query parameters

kind'MOVEMENT' | 'PURCHASE' | 'SALE' | 'IMPORT' | 'EXPORT' | 'DEATH' | 'SLAUGHTER' | 'DISPOSAL' | 'IDENTIFICATION'
movementboolean
date_basis'effective' | 'departure' | 'arrival'
fromstring date

Inclusive lower bound on the date basis as a real calendar date (YYYY-MM-DD).

tostring date

Inclusive upper bound on the date basis as a real calendar date (YYYY-MM-DD); must not precede from.

takeinteger

Typed events in the JSON page (1-100; defaults to 100). Ignored for format=csv.

skipinteger

Typed events to skip (defaults to 0). Ignored for format=csv.

animal_idstring
identifierstring
location_idstring
include_voidboolean
include_legacyboolean
format'json' | 'csv'

Response

Report

generated_atstring required
date_basisstring required
coverageobject required
eventsobject[] required
legacyobject[] required
disclaimerstring required

Changes

No recorded changes to this operation across all 1 revision of this API.