External credential scope: read:records. Minimum farm role: EDITOR. Resolves literal and today defaults once, returns a non-committable preview with structured issues for field/domain problems, and creates no livestock records.
Parameter
In
Required
Schema
farm_id
path
Yes
{"type":"string","format":"uuid"}
Request body (application/json)
Field
Type
Presence
Constraints
request_id
string
Required
format: "uuid"
template_id
string
Required
format: "uuid"
template_version
integer
Optional
minimum: 1
inputs
object
Required
inputs.event
object
Optional
inputs.offspring
array
Optional
inputs.offspring[]
object
Required
timezone
string
Optional
maxLength: 100
replaces_preview_id
string
Optional
format: "uuid"
Create request.json with a JSON body matching the request schema above before running this example.
POST /v1/farm/{farm_id}/workflows/previews/{preview_id}/commit
Commit an approved workflow preview
External credential scopes: write:records, write:animals and write:groups. Minimum farm role: EDITOR. Requires an explicit approval of the exact preview_hash. Rechecks access, template activity, expiry, relevant state and reuses the single atomic birth writer.
Parameter
In
Required
Schema
farm_id
path
Yes
{"type":"string","format":"uuid"}
preview_id
path
Yes
{"type":"string","format":"uuid"}
Request body (application/json)
Field
Type
Presence
Constraints
approval
object
Required
approval.confirmed
boolean
Required
const: true
approval.preview_hash
string
Required
Create request.json with a JSON body matching the request schema above before running this example.
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
409
Concurrent change, archived template, expired preview, or conflicting approval.
application/json
200 response schema (application/json)
Field
Type
Presence
Constraints
preview_id
string
Required
format: "uuid"
status
string
Required
discarded_at
string
Optional
format: "date-time"
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.