Ranch.Bot
Skip to reference

Recurring events API

HTTP reference for recurring events. Read authentication and access before using these operations. All examples use made-up data and placeholder credentials.

GET /v1/farm/{farm_id}/recurring-events

Get Recurring Events

Current recurring events 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.

ParameterInRequiredSchema
farm_idpathYes{"type":"string","format":"uuid"}

Request example

bash example
curl --fail-with-body -X GET \
  'https://api.ranch.bot/v1/farm/<farm_id>/recurring-events' \
  -H "Authorization: Bearer $RANCHBOT_TOKEN"

Responses

StatusMeaningContent type
200Successapplication/json
400Request validation failed.application/json
401Missing/invalid authentication or insufficient farm role.application/json
403Missing required scope or credential type is disallowed.application/json
404Resource or active farm membership not found.application/json
429Rate limit exceeded. Retry after the indicated delay.application/json
500Unexpected server failure.application/json

200 response schema (application/json)

FieldTypePresenceConstraints
[]objectRequired
[].typestringRequiredenum: ["OTHER","FEED","GENETIC","HEALTH","MOVEMENT"]
[].idstringRequired
[].created_atstringRequiredformat: "date-time"
[].updated_atstringRequiredformat: "date-time"
[].namestringRequired
[].is_activebooleanRequired
[].farm_idstringRequired
[].description (variant 1)nullRequired
[].description (variant 2)stringRequired
[].animal_idsJSONRequired
[].group_idsJSONRequired
[].end_date (variant 1)nullRequired
[].end_date (variant 2)stringRequiredformat: "date-time"
[].recurrence_typestringRequiredenum: ["DAILY","MONTHLY","WEEKLY"]
[].start_datestringRequiredformat: "date-time"
json example
[]

POST /v1/farm/{farm_id}/recurring-events

Create Recurring Event

Current recurring events 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.

ParameterInRequiredSchema
farm_idpathYes{"type":"string","format":"uuid"}

Request body (application/json)

FieldTypePresenceConstraints
animal_idsarrayRequired
animal_ids[]stringRequiredformat: "uuid"
descriptionstringOptional
end_datestringOptionalformat: "date-time"
group_idsarrayRequired
group_ids[]stringRequiredformat: "uuid"
namestringRequired
recurrence_typestringRequiredenum: ["DAILY","MONTHLY","WEEKLY"]
start_datestringRequiredformat: "date-time"
typestringRequiredenum: ["FEED","GENETIC","HEALTH","MOVEMENT","OTHER"]
json example
{
  "animal_ids": [],
  "group_ids": [],
  "name": "Example",
  "recurrence_type": "DAILY",
  "start_date": "2026-09-01T12:00:00.000Z",
  "type": "FEED"
}

Request example

bash example
curl --fail-with-body -X POST \
  'https://api.ranch.bot/v1/farm/<farm_id>/recurring-events' \
  -H "Authorization: Bearer $RANCHBOT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"animal_ids":[],"group_ids":[],"name":"Example","recurrence_type":"DAILY","start_date":"2026-09-01T12:00:00.000Z","type":"FEED"}'

Responses

StatusMeaningContent type
201Successapplication/json
400Request validation failed.application/json
401Missing/invalid authentication or insufficient farm role.application/json
403Missing required scope or credential type is disallowed.application/json
404Resource or active farm membership not found.application/json
429Rate limit exceeded. Retry after the indicated delay.application/json
500Unexpected server failure.application/json

201 response schema (application/json)

FieldTypePresenceConstraints
typestringRequiredenum: ["OTHER","FEED","GENETIC","HEALTH","MOVEMENT"]
idstringRequired
created_atstringRequiredformat: "date-time"
updated_atstringRequiredformat: "date-time"
namestringRequired
is_activebooleanRequired
farm_idstringRequired
description (variant 1)nullRequired
description (variant 2)stringRequired
animal_idsJSONRequired
group_idsJSONRequired
end_date (variant 1)nullRequired
end_date (variant 2)stringRequiredformat: "date-time"
recurrence_typestringRequiredenum: ["DAILY","MONTHLY","WEEKLY"]
start_datestringRequiredformat: "date-time"
json example
{
  "type": "OTHER",
  "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",
  "description": null,
  "animal_ids": null,
  "group_ids": null,
  "end_date": null,
  "recurrence_type": "DAILY",
  "start_date": "2026-09-01T12:00:00.000Z"
}

DELETE /v1/farm/{farm_id}/recurring-events/{recurring_event_id}

Delete Recurring Event

Current recurring events 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. Marks the stored entity inactive (soft deletion).

ParameterInRequiredSchema
farm_idpathYes{"type":"string","format":"uuid"}
recurring_event_idpathYes{"type":"string","format":"uuid"}

Request example

bash example
curl --fail-with-body -X DELETE \
  'https://api.ranch.bot/v1/farm/<farm_id>/recurring-events/<recurring_event_id>' \
  -H "Authorization: Bearer $RANCHBOT_TOKEN"

Responses

StatusMeaningContent type
204Completed; no response body.No body
400Request validation failed.application/json
401Missing/invalid authentication or insufficient farm role.application/json
403Missing required scope or credential type is disallowed.application/json
404Resource or active farm membership not found.application/json
429Rate limit exceeded. Retry after the indicated delay.application/json
500Unexpected server failure.application/json

GET /v1/farm/{farm_id}/recurring-events/{recurring_event_id}

Get Recurring Event

Current recurring events 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.

ParameterInRequiredSchema
farm_idpathYes{"type":"string","format":"uuid"}
recurring_event_idpathYes{"type":"string","format":"uuid"}

Request example

bash example
curl --fail-with-body -X GET \
  'https://api.ranch.bot/v1/farm/<farm_id>/recurring-events/<recurring_event_id>' \
  -H "Authorization: Bearer $RANCHBOT_TOKEN"

Responses

StatusMeaningContent type
200Successapplication/json
400Request validation failed.application/json
401Missing/invalid authentication or insufficient farm role.application/json
403Missing required scope or credential type is disallowed.application/json
404Resource or active farm membership not found.application/json
429Rate limit exceeded. Retry after the indicated delay.application/json
500Unexpected server failure.application/json

200 response schema (application/json)

FieldTypePresenceConstraints
typestringRequiredenum: ["OTHER","FEED","GENETIC","HEALTH","MOVEMENT"]
idstringRequired
created_atstringRequiredformat: "date-time"
updated_atstringRequiredformat: "date-time"
namestringRequired
is_activebooleanRequired
farm_idstringRequired
description (variant 1)nullRequired
description (variant 2)stringRequired
animal_idsJSONRequired
group_idsJSONRequired
end_date (variant 1)nullRequired
end_date (variant 2)stringRequiredformat: "date-time"
recurrence_typestringRequiredenum: ["DAILY","MONTHLY","WEEKLY"]
start_datestringRequiredformat: "date-time"
json example
{
  "type": "OTHER",
  "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",
  "description": null,
  "animal_ids": null,
  "group_ids": null,
  "end_date": null,
  "recurrence_type": "DAILY",
  "start_date": "2026-09-01T12:00:00.000Z"
}

PUT /v1/farm/{farm_id}/recurring-events/{recurring_event_id}

Update Recurring Event

Current recurring events 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.

ParameterInRequiredSchema
farm_idpathYes{"type":"string","format":"uuid"}
recurring_event_idpathYes{"type":"string","format":"uuid"}

Request body (application/json)

FieldTypePresenceConstraints
animal_idsarrayOptional
animal_ids[]stringRequiredformat: "uuid"
descriptionstringOptional
end_datestringOptionalformat: "date-time"
group_idsarrayOptional
group_ids[]stringRequiredformat: "uuid"
namestringOptional
recurrence_typestringOptionalenum: ["DAILY","MONTHLY","WEEKLY"]
start_datestringOptionalformat: "date-time"
typestringOptionalenum: ["FEED","GENETIC","HEALTH","MOVEMENT","OTHER"]
json example
{}

Request example

bash example
curl --fail-with-body -X PUT \
  'https://api.ranch.bot/v1/farm/<farm_id>/recurring-events/<recurring_event_id>' \
  -H "Authorization: Bearer $RANCHBOT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{}'

Responses

StatusMeaningContent type
200Successapplication/json
400Request validation failed.application/json
401Missing/invalid authentication or insufficient farm role.application/json
403Missing required scope or credential type is disallowed.application/json
404Resource or active farm membership not found.application/json
429Rate limit exceeded. Retry after the indicated delay.application/json
500Unexpected server failure.application/json

200 response schema (application/json)

FieldTypePresenceConstraints
recurringEventobjectRequired
recurringEvent.typestringRequiredenum: ["OTHER","FEED","GENETIC","HEALTH","MOVEMENT"]
recurringEvent.idstringRequired
recurringEvent.created_atstringRequiredformat: "date-time"
recurringEvent.updated_atstringRequiredformat: "date-time"
recurringEvent.namestringRequired
recurringEvent.is_activebooleanRequired
recurringEvent.farm_idstringRequired
recurringEvent.description (variant 1)nullRequired
recurringEvent.description (variant 2)stringRequired
recurringEvent.animal_idsJSONRequired
recurringEvent.group_idsJSONRequired
recurringEvent.end_date (variant 1)nullRequired
recurringEvent.end_date (variant 2)stringRequiredformat: "date-time"
recurringEvent.recurrence_typestringRequiredenum: ["DAILY","MONTHLY","WEEKLY"]
recurringEvent.start_datestringRequiredformat: "date-time"
json example
{
  "recurringEvent": {
    "type": "OTHER",
    "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",
    "description": null,
    "animal_ids": null,
    "group_ids": null,
    "end_date": null,
    "recurrence_type": "DAILY",
    "start_date": "2026-09-01T12:00:00.000Z"
  }
}

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
{
  "success": false,
  "errors": [
    {
      "code": 400,
      "name": "ValidationError",
      "message": "Example validation failure"
    }
  ]
}