Enterprise| Field | Default | Required | Description |
|---|---|---|---|
| name | REQUIRED when translations empty | ||
| condiment_group_id | REQUIRED | An active condiment group of the enterprise | |
| price | REQUIRED | ||
| sku | Must be unique across menu items and condiments | ||
| active | true | ||
| printable | true | ||
| tax_id | |||
| price_list_id | |||
| translations | [] | ||
| property_ids | all properties | Item definitions are created for these properties and their revenue centers | |
| report_tag_ids | [] | ||
| extra_fields | [] | REQUIRED | Shared with menu items. The requirement varies depending on the system configuration |
422)| Message | Reason |
|---|---|
condiment_group_id required | condiment_group_id is missing |
Invalid condiment_group_id | Not an active condiment group of the enterprise |
Invalid tax_id | Not an active tax of the enterprise |
Invalid price_list_id | Not a price list of the enterprise |
Invalid report_tag_ids | At least one id is not a report tag of the enterprise |
Invalid extra field keys | An extra field has no key or no value |
Invalid extra field values | An extra field has an empty key or value |
Condiment API is not enabled | The endpoint is not enabled for this environment |
Name can't be blank | name is missing and no translations are sent |
Price can't be blank | price is missing |
Accept-Language header and joined into one message when several fields fail, for example Name can't be blank and Price can't be blank.curl --location 'https://api.simpra.app/apps/api/v1/condiments' \
--header 'Accept-Language: en' \
--header 'Simpra-Access-Token: <api-key>' \
--header 'Content-Type: application\json' \
--data '{
"name": "Ekstra Peynir",
"sku": "CND-001",
"condiment_group_id": "6f3b2c10-8d4e-4a19-9f21-0b7c5e3a1d44",
"price": 25,
"printable": true,
"tax_id": "b1e7a904-3c62-4f88-8d15-7a92c4e60b33",
"price_list_id": "0d5f1a77-2b83-4c90-a6e4-9f31d8b02c56",
"report_tag_ids": [
"e4c8b210-59a3-4d77-b8f1-2c60a9e34d85"
],
"property_ids": [
"a7d3f612-4e85-4b20-9c71-6f08b2d54e19"
],
"translations": [
{
"locale": "tr",
"text": "Ekstra Peynir"
},
{
"locale": "en",
"text": "Extra Cheese"
}
],
"extra_fields": [
{
"key": "ErpKodu",
"value": "10045"
}
]
}'{
"condiment": {
"id": "9c2e5b81-7a34-4f06-b9d2-3e81c7a40f92"
}
}