POST Sync Customer Declarations
Replaces the customer's allergens and dietary preferences with exactly what you send.
This is a full replace, not a merge. Anything you leave out is deleted, so always send the complete list the customer should end up with — and send an empty array to clear a category. Both keys must be present in every request.
Allowed allergens are milk, eggs, fish, shellfish, tree_nuts, peanuts, wheat, gluten, soybeans, sesame, sulfites, mustard, celery, lupin. Allowed dietary preferences are vegetarian, vegan, alcohol.
Path Parameters
- Type: integercustomer
_account _id requiredCustomer account ID. Must match the signed-in customer.
Headers
- Type: stringAcceptrequired
Type of content accepted by the API (application/json in most cases)
- Type: stringApplicationrequired
Application key for specific client app
- Type: stringContent
- Type requiredContent-Type header
- Type: stringA
P I - V E R S I O N requiredVersion of the API to be used
- Type: stringAuthorization
Authorization header
- Type: stringX
- Request - I D requiredUnique request identifier
Body
- Type: array of stringenumallergensrequiredvalues
- milk
- eggs
- fish
- shellfish
- tree
_nuts - peanuts
- wheat
- gluten
- Type: array of "vegetarian" or "vegan" or "alcohol"enumfood
_types required
Responses
- application/json
- 401
Missing or invalid token, or the path account is not the signed-in account.
- 422
A key is missing, or a value is not in the allowed list.
curl https://api-public-demo.menu.app/api/customer-accounts/9031/declarations/sync \
--request POST \
--header 'Accept: application/json' \
--header 'Application: application-key' \
--header 'Content-Type: application/json' \
--header 'API-VERSION: ' \
--header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
--data '{
"allergens": [
"milk",
"peanuts"
],
"food_types": [
"vegan"
]
}'
{
"status": "OK",
"code": 200,
"data": {
"declarations": {
"allergens": [
"milk",
"peanuts"
],
"food_types": [
"vegan"
]
}
}
}