Create complaint
safefood360_create_complaintWRITE: record a NEW complaint in Safefood 360 (it may trigger the site's complaint workflow and notifications). Not idempotent: calling it twice creates two complaints. Safefood 360 validates the fields (ids such as source, company and recorded_by are GUIDs from your site's lists) and rejects a request that lacks required ones. POST /complaints/sites/{siteId}/v1/complaints/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | When the complaint was received, ISO 8601, e.g. 2026-10-20T09:30:00Z. | |
| risk | No | Risk level as named in Safefood 360, e.g. None, Low, Medium, High. | |
| source | No | Complaint source id (GUID) from the site's list of sources. | |
| quantity | No | Quantity affected. | |
| trace_no | No | Batch / trace number of the product. | |
| reference | No | The complainant's own reference. | |
| company_id | No | Customer/company id (GUID) the complaint is about. | |
| product_id | No | Id (GUID) of the product, material or service complained about. | |
| description | Yes | What the complaint is about. | |
| recorded_by | No | User id (GUID) of the person recording the complaint. | |
| contact_person | No | The complainant. | |
| sample_details | No | Sample request and collection details. | |
| source_details | No | Free-text details of the source. |