Raw schema
{
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "What the complaint is about."
},
"date": {
"description": "When the complaint was received, ISO 8601, e.g. 2026-10-20T09:30:00Z.",
"type": "string",
"maxLength": 40
},
"risk": {
"description": "Risk level as named in Safefood 360, e.g. None, Low, Medium, High.",
"type": "string",
"maxLength": 50
},
"recorded_by": {
"type": "string",
"pattern": "^[0-9a-fA-F-]{36}$",
"description": "User id (GUID) of the person recording the complaint."
},
"company_id": {
"type": "string",
"pattern": "^[0-9a-fA-F-]{36}$",
"description": "Customer/company id (GUID) the complaint is about."
},
"source": {
"type": "string",
"pattern": "^[0-9a-fA-F-]{36}$",
"description": "Complaint source id (GUID) from the site's list of sources."
},
"source_details": {
"description": "Free-text details of the source.",
"type": "string",
"maxLength": 1000
},
"reference": {
"description": "The complainant's own reference.",
"type": "string",
"maxLength": 200
},
"sample_details": {
"description": "Sample request and collection details.",
"type": "string",
"maxLength": 2000
},
"contact_person": {
"description": "The complainant.",
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 50
},
"first_name": {
"type": "string",
"maxLength": 100
},
"last_name": {
"type": "string",
"maxLength": 100
},
"address": {
"type": "string",
"maxLength": 500
},
"purchased": {
"description": "Where the product was purchased.",
"type": "string",
"maxLength": 200
},
"phone": {
"type": "string",
"maxLength": 60
},
"mobile": {
"type": "string",
"maxLength": 60
},
"email": {
"type": "string",
"maxLength": 254
}
}
},
"product_id": {
"type": "string",
"pattern": "^[0-9a-fA-F-]{36}$",
"description": "Id (GUID) of the product, material or service complained about."
},
"quantity": {
"description": "Quantity affected.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"trace_no": {
"description": "Batch / trace number of the product.",
"type": "string",
"maxLength": 200
}
},
"required": [
"description"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}