The DairyStash API allows authorized clients to retrieve farm data from DairyStash in a consistent, secure, and read-only way. It supports JSON responses for integrations and CSV export for analysts, Excel, and BI tools.
Use the base URL below for your integrations. Your API key must be included in every request (except /health).
GET /health (no API key required)
GET /whoami (returns the farm code associated with your key)
GET /farms/<farm_code>/events/<event_name>
Header required: X-API-Key: FARM.<farm_code>.<kid>.<signature>
Example: JSON
curl -H "X-API-Key: FARM.<farm_code>.k1.<signature>" \
"https://dairystash.com/api/v1/farms/<farm_code>/events/inventory?format=json&limit=100"
Example: CSV
curl -H "X-API-Key: FARM.<farm_code>.k1.<signature>" \
"https://dairystash.com/api/v1/farms/<farm_code>/events/inventory?format=csv&limit=1000" \
-o data.csv
For full details (filters, fields, ordering, limits), open: API Documentation