Set Recipe Allergen Cross-Contact
Replaces the person's list of allergens the recipe may contain through cross-contact (a 'may contain' statement) and returns the updated record. Cross-contact declared by the recipe's custom ingredients still counts and is not removed by this list. An allergen whose row is contains cannot be listed. Send the recipe's current version_id in the If-Match header. Changing the list makes an earlier confirmation of the record stale.
recipe_id*Recipe IdIf-Match*stringThe recipe's current version_id: the one the last change to this recipe returned, or the one reading the recipe returns (get_recipe). A stale value is refused with the current version_id; read the recipe again and retry.
application/json- body
The person's cross-contact list, replacing the one stored.
codes*array<>Allergen codes the recipe may contain through cross-contact. An empty list clears the person's list; ingredients' cross-contact declarations still count.
items <= 32Successful Response
application/json- response
The envelope for reading and changing a recipe's allergen record.
data*The allergen record of one recipe version.
meta*Response metadata.
version_id?|The version the record was read at; pass it as If-Match on the next change. Null only for a recipe that was never versioned.
curl -X PUT 'https://api.bettermenu.live/studio/recipes/string/allergens/cross-contact' \ -H 'If-Match: string' \ -H 'Content-Type: application/json' \ -d '{ "codes": [ "string" ]}'{ "data": { "country": "US", "list_version": "string", "rows": [ { "code": "string", "state": "contains", "species": [ "string" ], "other_species": [ "string" ], "sources": [ { "kind": "custom_ingredient", "ingredient_row_id": "string", "custom_ingredient_id": "string", "custom_ingredient_version_id": "string", "name": "string", "via": [ "string" ], "actor": { "type": "member", "id": "string" }, "channel": "studio", "at": "2019-08-24T14:15:22Z" } ], "carried_state": "contains", "carried_species": [ "string" ], "carried_other_species": [ "string" ], "person": { "state": "contains", "species": [ "string" ], "other_species": [ "string" ], "actor": { "type": "member", "id": "string" }, "channel": "studio", "at": "2019-08-24T14:15:22Z" }, "person_answer_superseded": false, "name": "string" } ], "cross_contact": [ { "code": "string", "sources": [ { "kind": "custom_ingredient", "ingredient_row_id": "string", "custom_ingredient_id": "string", "custom_ingredient_version_id": "string", "name": "string", "via": [ "string" ], "actor": { "type": "member", "id": "string" }, "channel": "studio", "at": "2019-08-24T14:15:22Z" } ] } ], "unanswered": [ "string" ], "unreadable_ingredient_rows": [ "string" ], "complete": true, "record_hash": "string", "confirmation": { "state": "confirmed", "current": { "confirmation_id": "string", "version_id": "string", "record_hash": "string", "actor": { "type": "member", "id": "string" }, "channel": "studio", "confirmed_at": "2019-08-24T14:15:22Z" } } }, "meta": { "version": "string", "request_id": "string", "timestamp": "string" }, "version_id": "string"}