Raw schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "Animal type, e.g. Cattle, Sheep, Goat, Chicken or a custom type."
},
"status": {
"default": "Active",
"type": "string",
"enum": [
"Active",
"Butchered",
"Culled",
"Deceased",
"Dry",
"Lactating",
"Lost",
"Off Farm",
"Quarantined",
"Reference",
"Sick",
"Sold",
"Weaning",
"Archived"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"tag_number": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"electronic_id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"internal_id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"gender": {
"description": "e.g. Female, Male.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"breed": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"birth_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"weight": {
"type": "number",
"minimum": 0,
"maximum": 10000000
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"keywords": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"mother_id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[A-Za-z0-9_.-]+$",
"description": "Mother animal id (a Farmbrite id string)."
},
"father_id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[A-Za-z0-9_.-]+$",
"description": "Father animal id (a Farmbrite id string)."
},
"market_price": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"death_date": {
"description": "Required when status is Butchered, Culled or Deceased.",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deceased_reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"sale_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"is_group": {
"description": "true to add a group of identical animals.",
"type": "boolean"
},
"group_qty": {
"description": "Head count when is_group is true.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000000
},
"purchased": {
"type": "boolean"
},
"purchase_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"purchase_price": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}