Chute sessions API
HTTP reference for chute sessions. Read authentication and access before using these operations. All examples use made-up data and placeholder credentials.
GET /v1/farm/{farm_id}/chute-sessions
Get Chute Sessions
Current chute sessions HTTP operation. External credential scopes: read:records. Minimum farm role: READER. Pagination accepts integer skip and take; set both explicitly. An omitted value passes through to the data query. Collection property names differ by resource; use the response schema. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} skip query No {"type":"integer"} take query No {"type":"integer"} status query No {"type":"string","enum":["ACTIVE","COMPLETED","PROPOSED"]}
Request example
bash example Copy example
curl --fail-with-body -X GET \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions' \
-H "Authorization: Bearer $RANCHBOT_TOKEN"
Responses
Status Meaning Content type 200 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
200 response schema (application/json)
Field Type Presence Constraints total number Required records array Required records[] object Required records[].id string Required records[].name string Required records[].status string Required enum: ["ACTIVE","COMPLETED","PROPOSED"] records[].started_at string Required format: "date-time" records[].completed_at (variant 1) null Required records[].completed_at (variant 2) string Required format: "date-time" records[].group_id (variant 1) null Required records[].group_id (variant 2) string Required records[].entry_count number Required
json example Copy example
{
"total": 0,
"records": []
}
POST /v1/farm/{farm_id}/chute-sessions
Create Chute Session
Current chute sessions HTTP operation. External credential scopes: write:records. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"}
Request body (application/json)
Field Type Presence Constraints name string Optional minLength: 1 config object Required config.widgets array Required minItems: 1 config.widgets[] object Required config.widgets[].id string Required minLength: 1 config.widgets[].type string Required enum: ["boolean","number","photo","score","select","text","treatment","weight"] config.widgets[].label string Required minLength: 1 config.widgets[].size string Optional enum: ["full","half"] config.widgets[].options object Optional config.new_animal_fields array Optional config.new_animal_fields[] string Required config.record_type string Optional enum: ["FEED","GENETIC","HEALTH","MOVEMENT","OTHER"] group_id string Optional format: "uuid"
json example Copy example
{
"config": {
"widgets": [
{
"id": "11111111-1111-4111-8111-111111111111",
"type": "boolean",
"label": "example"
}
]
}
}
Request example
bash example Copy example
curl --fail-with-body -X POST \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions' \
-H "Authorization: Bearer $RANCHBOT_TOKEN" \
-H "Content-Type: application/json" \
--data '{"config":{"widgets":[{"id":"11111111-1111-4111-8111-111111111111","type":"boolean","label":"example"}]}}'
Responses
Status Meaning Content type 201 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
201 response schema (application/json)
Field Type Presence Constraints status string Required enum: ["ACTIVE","COMPLETED","PROPOSED"] id string Required created_at string Required format: "date-time" updated_at string Required format: "date-time" name string Required is_active boolean Required farm_id string Required group_id (variant 1) null Required group_id (variant 2) string Required completed_at (variant 1) null Required completed_at (variant 2) string Required format: "date-time" config JSON Required started_at string Required format: "date-time"
json example Copy example
{
"status": "ACTIVE",
"id": "11111111-1111-4111-8111-111111111111",
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"name": "Example",
"is_active": true,
"farm_id": "11111111-1111-4111-8111-111111111111",
"group_id": null,
"completed_at": null,
"config": null,
"started_at": "2026-09-01T12:00:00.000Z"
}
DELETE /v1/farm/{farm_id}/chute-sessions/{session_id}
Delete Chute Session
Current chute sessions HTTP operation. External credential scopes: write:records. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429. Deletion behavior is described below; a successful status does not imply erasure from all retained history. Deletes the chute session through its service; associated history has separate undo behavior. Only PROPOSED sessions can be changed or deactivated; started sessions reject this operation with 400.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} session_id path Yes {"type":"string","format":"uuid"}
Request example
bash example Copy example
curl --fail-with-body -X DELETE \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions/<session_id>' \
-H "Authorization: Bearer $RANCHBOT_TOKEN"
Responses
Status Meaning Content type 204 Completed; no response body. No body 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
GET /v1/farm/{farm_id}/chute-sessions/{session_id}
Get Chute Session
Current chute sessions HTTP operation. External credential scopes: read:records. Minimum farm role: READER. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} session_id path Yes {"type":"string","format":"uuid"}
Request example
bash example Copy example
curl --fail-with-body -X GET \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions/<session_id>' \
-H "Authorization: Bearer $RANCHBOT_TOKEN"
Responses
Status Meaning Content type 200 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
200 response schema (application/json)
Field Type Presence Constraints status string Required enum: ["ACTIVE","COMPLETED","PROPOSED"] id string Required created_at string Required format: "date-time" updated_at string Required format: "date-time" name string Required is_active boolean Required farm_id string Required group_id (variant 1) null Required group_id (variant 2) string Required completed_at (variant 1) null Required completed_at (variant 2) string Required format: "date-time" config JSON Required started_at string Required format: "date-time" entries array Required entries[] object Required entries[].id string Required entries[].animal_id string Required entries[].session_id string Required entries[].captured_at string Required format: "date-time" entries[].client_updated_at string Required format: "date-time" entries[].is_active boolean Required entries[].payload JSON Required entries[].position integer Required entries[].record_ids array Required entries[].record_ids[] string Required entries[].created_at string Required format: "date-time" entries[].updated_at string Required format: "date-time" entries[].animal JSON Required entries[].animal object Required entries[].animal.id (variant 1) string Required entries[].animal.id (variant 2) null Required entries[].animal.farm_id (variant 1) string Required entries[].animal.farm_id (variant 2) null Required entries[].animal.is_active (variant 1) boolean Required entries[].animal.is_active (variant 2) null Required entries[].animal.metadata (variant 1) JSON Required entries[].animal.metadata (variant 2) null Required entries[].animal.created_at (variant 1) string Required format: "date-time" entries[].animal.created_at (variant 2) null Required entries[].animal.updated_at (variant 1) string Required format: "date-time" entries[].animal.updated_at (variant 2) null Required entries[].animal object Required entries[].animal.animal_identifiers array Required entries[].animal.animal_identifiers[] object Required entries[].animal.animal_identifiers[].id (variant 1) string Required entries[].animal.animal_identifiers[].id (variant 2) null Required entries[].animal.animal_identifiers[].animal_id (variant 1) string Required entries[].animal.animal_identifiers[].animal_id (variant 2) null Required entries[].animal.animal_identifiers[].is_active (variant 1) boolean Required entries[].animal.animal_identifiers[].is_active (variant 2) null Required entries[].animal.animal_identifiers[].is_primary (variant 1) boolean Required entries[].animal.animal_identifiers[].is_primary (variant 2) null Required entries[].animal.animal_identifiers[].type (variant 1) string Required entries[].animal.animal_identifiers[].type (variant 2) null Required entries[].animal.animal_identifiers[].value (variant 1) string Required entries[].animal.animal_identifiers[].value (variant 2) null Required entries[].animal.animal_identifiers[].created_at (variant 1) string Required format: "date-time" entries[].animal.animal_identifiers[].created_at (variant 2) null Required entries[].animal.animal_identifiers[].updated_at (variant 1) string Required format: "date-time" entries[].animal.animal_identifiers[].updated_at (variant 2) null Required
json example Copy example
{
"status": "ACTIVE",
"id": "11111111-1111-4111-8111-111111111111",
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"name": "Weighing",
"is_active": true,
"farm_id": "11111111-1111-4111-8111-111111111111",
"group_id": null,
"completed_at": null,
"config": {
"widgets": []
},
"started_at": "2026-09-01T12:00:00.000Z",
"entries": [
{
"id": "11111111-1111-4111-8111-111111111111",
"animal_id": "11111111-1111-4111-8111-111111111111",
"session_id": "11111111-1111-4111-8111-111111111111",
"captured_at": "2026-09-01T12:00:00.000Z",
"client_updated_at": "2026-09-01T12:00:00.000Z",
"is_active": true,
"payload": {
"weight": 125
},
"position": 0,
"record_ids": [
"11111111-1111-4111-8111-111111111111"
],
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"animal": {
"id": "11111111-1111-4111-8111-111111111111",
"farm_id": "11111111-1111-4111-8111-111111111111",
"is_active": true,
"metadata": null,
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"animal_identifiers": [
{
"id": "11111111-1111-4111-8111-111111111111",
"animal_id": "11111111-1111-4111-8111-111111111111",
"is_active": true,
"is_primary": true,
"type": "MANAGEMENT_TAG",
"value": "Ewe 42",
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z"
}
]
}
}
]
}
PUT /v1/farm/{farm_id}/chute-sessions/{session_id}
Update Chute Session
Current chute sessions HTTP operation. External credential scopes: write:records. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429. Only PROPOSED sessions can be changed or deactivated; started sessions reject this operation with 400.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} session_id path Yes {"type":"string","format":"uuid"}
Request body (application/json)
Field Type Presence Constraints name string Optional minLength: 1 config object Optional config.widgets array Required minItems: 1 config.widgets[] object Required config.widgets[].id string Required minLength: 1 config.widgets[].type string Required enum: ["boolean","number","photo","score","select","text","treatment","weight"] config.widgets[].label string Required minLength: 1 config.widgets[].size string Optional enum: ["full","half"] config.widgets[].options object Optional config.new_animal_fields array Optional config.new_animal_fields[] string Required config.record_type string Optional enum: ["FEED","GENETIC","HEALTH","MOVEMENT","OTHER"] group_id (variant 1) string Optional format: "uuid" group_id (variant 2) null Optional
json example Copy example
{}
Request example
bash example Copy example
curl --fail-with-body -X PUT \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions/<session_id>' \
-H "Authorization: Bearer $RANCHBOT_TOKEN" \
-H "Content-Type: application/json" \
--data '{}'
Responses
Status Meaning Content type 200 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
200 response schema (application/json)
Field Type Presence Constraints status string Required enum: ["ACTIVE","COMPLETED","PROPOSED"] id string Required created_at string Required format: "date-time" updated_at string Required format: "date-time" name string Required is_active boolean Required farm_id string Required group_id (variant 1) null Required group_id (variant 2) string Required completed_at (variant 1) null Required completed_at (variant 2) string Required format: "date-time" config JSON Required started_at string Required format: "date-time"
json example Copy example
{
"status": "ACTIVE",
"id": "11111111-1111-4111-8111-111111111111",
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"name": "Example",
"is_active": true,
"farm_id": "11111111-1111-4111-8111-111111111111",
"group_id": null,
"completed_at": null,
"config": null,
"started_at": "2026-09-01T12:00:00.000Z"
}
POST /v1/farm/{farm_id}/chute-sessions/{session_id}/entries/{entry_id}/undo
Undo Chute Entry
Current chute sessions HTTP operation. External credential scopes: write:records. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} session_id path Yes {"type":"string","format":"uuid"} entry_id path Yes {"type":"string","format":"uuid"}
Request example
bash example Copy example
curl --fail-with-body -X POST \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions/<session_id>/entries/<entry_id>/undo' \
-H "Authorization: Bearer $RANCHBOT_TOKEN"
Responses
Status Meaning Content type 200 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
200 response schema (application/json)
Field Type Presence Constraints entry_id string Required undone boolean Required
json example Copy example
{
"entry_id": "11111111-1111-4111-8111-111111111111",
"undone": true
}
POST /v1/farm/{farm_id}/chute-sessions/{session_id}/sync
Sync Chute Session
Current chute sessions HTTP operation. External credential scopes: write:records, write:animals, write:groups. Minimum farm role: EDITOR. Direct requests execute without an app confirmation screen. Production rate limit: 100 requests per 15-minute window, per legacy key, otherwise per client IP. RateLimit headers report the current window; respect Retry-After on 429.
Parameter In Required Schema farm_id path Yes {"type":"string","format":"uuid"} session_id path Yes {"type":"string","format":"uuid"}
Request body (application/json)
Field Type Presence Constraints session object Required session.name string Required minLength: 1 session.status string Required enum: ["ACTIVE","COMPLETED"] session.started_at string Required format: "date-time" session.completed_at string Optional format: "date-time" session.config object Required session.config.widgets array Required minItems: 1 session.config.widgets[] object Required session.config.widgets[].id string Required minLength: 1 session.config.widgets[].type string Required enum: ["boolean","number","photo","score","select","text","treatment","weight"] session.config.widgets[].label string Required minLength: 1 session.config.widgets[].size string Optional enum: ["full","half"] session.config.widgets[].options object Optional session.config.new_animal_fields array Optional session.config.new_animal_fields[] string Required session.config.record_type string Optional enum: ["FEED","GENETIC","HEALTH","MOVEMENT","OTHER"] session.group_id (variant 1) string Optional format: "uuid" session.group_id (variant 2) null Optional entries array Required entries[] object Required entries[].id string Required format: "uuid" entries[].animal object Required entries[].animal.id string Required format: "uuid" entries[].animal.is_new boolean Optional entries[].animal.identifiers array Optional entries[].animal.identifiers[] object Required entries[].animal.identifiers[].type string Required enum: ["BRAND","EID","MANAGEMENT_TAG","NAME","TATTOO"] entries[].animal.identifiers[].value string Required minLength: 1 entries[].animal.metadata object Optional entries[].position integer Required minimum: 0 entries[].payload object Required entries[].captured_at string Required format: "date-time" entries[].client_updated_at string Required format: "date-time" entries[].deleted boolean Optional
json example Copy example
{
"session": {
"name": "Example",
"status": "ACTIVE",
"started_at": "2026-09-01T12:00:00.000Z",
"config": {
"widgets": [
{
"id": "11111111-1111-4111-8111-111111111111",
"type": "boolean",
"label": "example"
}
]
}
},
"entries": []
}
Request example
bash example Copy example
curl --fail-with-body -X POST \
'https://api.ranch.bot/v1/farm/<farm_id>/chute-sessions/<session_id>/sync' \
-H "Authorization: Bearer $RANCHBOT_TOKEN" \
-H "Content-Type: application/json" \
--data '{"session":{"name":"Example","status":"ACTIVE","started_at":"2026-09-01T12:00:00.000Z","config":{"widgets":[{"id":"11111111-1111-4111-8111-111111111111","type":"boolean","label":"example"}]}},"entries":[]}'
Responses
Status Meaning Content type 200 Success application/json 400 Request validation failed. application/json 401 Missing/invalid authentication or insufficient farm role. application/json 403 Missing required scope or credential type is disallowed. application/json 404 Resource or active farm membership not found. application/json 429 Rate limit exceeded. Retry after the indicated delay. application/json 500 Unexpected server failure. application/json
200 response schema (application/json)
Field Type Presence Constraints session object Required session.status string Required enum: ["ACTIVE","COMPLETED","PROPOSED"] session.id string Required session.created_at string Required format: "date-time" session.updated_at string Required format: "date-time" session.name string Required session.is_active boolean Required session.farm_id string Required session.group_id (variant 1) null Required session.group_id (variant 2) string Required session.completed_at (variant 1) null Required session.completed_at (variant 2) string Required format: "date-time" session.config JSON Required session.started_at string Required format: "date-time" animal_mappings array Required animal_mappings[] object Required animal_mappings[].client_animal_id string Required animal_mappings[].animal_id string Required animal_mappings[].created boolean Required results array Required results[] object Required results[].entry_id string Required results[].status string Required enum: ["error","created","updated","unchanged","deleted"] results[].animal_id string Optional results[].record_ids array Optional results[].record_ids[] string Required results[].record_items array Optional results[].record_items[] object Required results[].record_items[].widget_id string Required results[].record_items[].record_item_id string Required results[].error string Optional
json example Copy example
{
"session": {
"status": "ACTIVE",
"id": "11111111-1111-4111-8111-111111111111",
"created_at": "2026-09-01T12:00:00.000Z",
"updated_at": "2026-09-01T12:00:00.000Z",
"name": "Example",
"is_active": true,
"farm_id": "11111111-1111-4111-8111-111111111111",
"group_id": null,
"completed_at": null,
"config": null,
"started_at": "2026-09-01T12:00:00.000Z"
},
"animal_mappings": [],
"results": []
}
Error body
Validation and authentication errors generally use this envelope. Rate-limit errors omit data; OAuth polling also has protocol-specific errors shown in its reference.
json example Copy example
{
"success": false,
"errors": [
{
"code": 400,
"name": "ValidationError",
"message": "Example validation failure"
}
]
}