With the Item Labels API you can add a label with an icon to the dish (or item) in the menu to display the information about the ingredients. For example, "Spicy", "Hot", "Vegan", "Gluten-free", or "Organic".
With the Item Labels API, you can:
It's important to note the following point before starting to code:
Menu: A list of food and beverage items available for purchase at a restaurant, café, or other dining establishment.
This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.
If you have several pizzeria sites that use your app you might need to sync menu across those sites. For example, if there is a new label for the pizza called "Spicy (Level 3)", this change also needs to be reflected on other sites.
To sync the pizza menu across all sites:
name
field on the site where you updated the menu.labels.id
, labels.name
and labels.icon
field values.item.labels
array.The following table shows field support for filters and sorting for the item variants object:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $in , $nin | Sortable |
createdDate | $eq , $ne , $gt , $lt , $gte , $lte | Sortable |
updatedDate | $eq , $ne , $gt , $lt , $gte , $lte | Sortable |
name | $eq , $ne , $in , $nin , $begins | Sortable |
icon | $exists | Sortable |
Related content: API Query Language, Query Labels.
Item label ID.
Revision number, which increments by 1 each time the item label is updated. To prevent conflicting changes, the current revision must be passed when updating the item label. Ignored when creating a item label.
Date and time the item label was created.
Date and time the item label was updated.
Item label name.
Item label icon.
Extended fields.
{
"id": "6046e53c-4ce3-41f7-9e2a-0f7352fe4975",
"revision": "1",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T10:06:30.787Z",
"name": "Vegan",
"icon": {
"id": "ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"height": 24,
"width": 24,
"altText": null,
"urlExpirationDate": null,
"filename": null,
"sizeInBytes": null
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Label API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Retrieves a list of up to 500 item labels.
Retrieved item labels.
curl -X GET https://www.wixapis.com/restaurants/item-labels/v1/labels \
-H 'Authorization: <AUTH>' \
{
"labels": [
{
"id": "29b369c7-88cb-473b-bd9f-f2c71d177fff",
"revision": "1",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T10:06:30.787Z",
"name": "Wheat",
"icon": {
"id": "ec845c_1e78a0f38d104cfb9e375a4d1cb3066b.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_1e78a0f38d104cfb9e375a4d1cb3066b.svg",
"height": 24,
"width": 24,
"altText": null,
"urlExpirationDate": null,
"filename": null,
"sizeInBytes": null
}
},
{
"id": "6046e53c-4ce3-41f7-9e2a-0f7352fe4975",
"revision": "1",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T10:06:30.787Z",
"name": "Vegan",
"icon": {
"id": "ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"height": 24,
"width": 24,
"altText": null,
"urlExpirationDate": null,
"filename": null,
"sizeInBytes": null
}
}
]
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Label API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Creates an item Label.
You can only call this method when authenticated as a Wix app or Wix user identity.
Item label details.
Item label.
curl -X POST https://www.wixapis.com/restaurants/item-labels/v1/labels \
-H 'Authorization: <AUTH>' \
--data-binary '{
"label": {
"name": "Extra hot",
"icon": {
"url": "https://static.wixstatic.com/shapes/ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"id": "ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"width": 24,
"height": 24
}
}
}'
{
"label": {
"id": "6d180f1f-ff44-49fc-9536-96babfeddab8",
"revision": "1",
"createdDate": "2024-01-14T10:42:17.037Z",
"updatedDate": "2024-01-14T10:42:17.037Z",
"name": "Extra hot",
"icon": {
"id": "ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"height": 24,
"width": 24
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Labels API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Retrieves an item label by ID.
Item label ID.
Item label.
curl -X GET https://www.wixapis.com/restaurants/item-labels/v1/labels/6046e53c-4ce3-41f7-9e2a-0f7352fe4975 \
-H 'Authorization: <AUTH>'
{
"label": {
"id": "6046e53c-4ce3-41f7-9e2a-0f7352fe4975",
"revision": "1",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T10:06:30.787Z",
"name": "Vegan",
"icon": {
"id": "ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"height": 24,
"width": 24
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Label API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Deletes an Label.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the item label.
curl -X DELETE https://www.wixapis.com/restaurants/item-labels/v1/labels/657efce5-ee34-4578-bf5a-42daf5e7a9f0 \
-H 'Authorization: <AUTH>'
{}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Label API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Retrieves a list of item labels given the provided paging, filtering, and sorting. Up to 500 labels can be returned per request.
For a detailed list of supported operations, see the Supported Filters and Sorting article. To learn how to query menus, see API Query Language.
Query options.
Retrieved item labels.
The metadata of the paginated results.
curl -X POST https://www.wixapis.com/restaurants/item-labels/v1/labels/query \
-H 'Authorization: <AUTH> \
--data-binary '{
"query": {
"sort": [],
"filter": {
"icon": {
"$exists": true
}
}
}
}'
{
"labels": [
{
"id": "29b369c7-88cb-473b-bd9f-f2c71d177fff",
"revision": "1",
"createdDate": "2023-12-17T20:39:33.142Z",
"updatedDate": "2023-12-17T20:39:33.142Z",
"name": "Fish",
"icon": {
"id": "ec845c_1e78a0f38d104cfb9e375a4d1cb3066b.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_1e78a0f38d104cfb9e375a4d1cb3066b.svg",
"height": 24,
"width": 24
}
},
{
"id": "6046e53c-4ce3-41f7-9e2a-0f7352fe4975",
"revision": "1",
"createdDate": "2023-12-17T20:39:33.142Z",
"updatedDate": "2023-12-17T20:39:33.142Z",
"name": "Vegan",
"icon": {
"id": "ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"height": 24,
"width": 24
}
},
{
"id": "657efce5-ee34-4578-bf5a-42daf5e7a9f0",
"revision": "1",
"createdDate": "2023-12-17T20:39:33.142Z",
"updatedDate": "2023-12-17T20:39:33.142Z",
"name": "Gluten",
"icon": {
"id": "ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_a046f8b157e54b5d888fc424a1dea027.svg",
"height": 24,
"width": 24
}
},
{
"id": "678d3531-4936-4060-a6fe-1b65c16569bc",
"revision": "1",
"createdDate": "2023-12-17T20:39:33.142Z",
"updatedDate": "2023-12-17T20:39:33.142Z",
"name": "Spicy",
"icon": {
"id": "ec845c_aec44ab07aaf49a6b76a2d53c6dea7f4.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_aec44ab07aaf49a6b76a2d53c6dea7f4.svg",
"height": 24,
"width": 24
}
}
],
"pagingMetadata": {
"count": 4,
"cursors": {},
"hasNext": false
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Note: The Label API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.
Updates an item Label.
Each time an item label is updated, revision increments by 1. The existing revision must be included when updating the item labels. This ensures you're working with the latest item labels information, and it prevents unintended overwrites.
You can only call this method when authenticated as a Wix app or Wix user identity.
Item label ID.
Item label to update.
Updated item label.
curl -X PATCH "https://www.wixapis.com/restaurants/item-labels/v1/labels/72ff374d-578a-41f4-8747-168dc7cc9984" \
-H 'Authorization: <AUTH>' \
--data-binary '{
"label": {
"id": "72ff374d-578a-41f4-8747-168dc7cc9984",
"name": "Vegan",
"icon": {
"id": "ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"height": 24,
"width": 24
},
"revision": "1"
},
"mask": {
"paths": [
"name"
]
}
}'
{
"label": {
"id": "72ff374d-578a-41f4-8747-168dc7cc9984",
"revision": "2",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T10:59:01.252Z",
"name": "Vegan",
"icon": {
"id": "ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"height": 24,
"width": 24
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when an item label is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.restaurants.menus.v1.item_label_created",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "df891548-199f-490f-8b57-d9db0eee6a61",
"entityFqdn": "wix.restaurants.menus.v1.item_label",
"slug": "created",
"entityId": "72ff374d-578a-41f4-8747-168dc7cc9984",
"createdEvent": {
"entity": {
"id": "72ff374d-578a-41f4-8747-168dc7cc9984",
"revision": "1",
"createdDate": "2024-01-14T12:59:50.611Z",
"updatedDate": "2024-01-14T12:59:50.611Z",
"name": "Eggs",
"icon": {
"id": "ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_7ad0026abeb3490d9fcd524a438f5218.svg",
"height": 24,
"width": 24
}
}
},
"eventTime": "2024-01-14T12:59:50.769141172Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "1"
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when an item label is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.restaurants.menus.v1.item_label_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "ee8a66c9-5501-46c4-81da-d3b40526873a",
"entityFqdn": "wix.restaurants.menus.v1.item_label",
"slug": "updated",
"entityId": "bc4fb4b8-75e5-446d-857d-330056bad248",
"updatedEvent": {
"entity": {
"id": "bc4fb4b8-75e5-446d-857d-330056bad248",
"revision": "4",
"createdDate": "2024-01-14T10:06:30.787Z",
"updatedDate": "2024-01-14T13:57:57.142Z",
"name": "Fish",
"icon": {
"id": "ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"url": "https://static.wixstatic.com/shapes/ec845c_2306a227a54044a9999b9f5e5fdf2185.svg",
"height": 24,
"width": 24
}
}
},
"eventTime": "2024-01-14T12:59:50.769141172Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "1"
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when an item label is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.restaurants.menus.v1.item_label_deleted",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "2671cb98-a715-4ce9-b8fe-5461a70f8a9b",
"entityFqdn": "wix.restaurants.menus.v1.item_label",
"slug": "deleted",
"entityId": "6046e53c-4ce3-41f7-9e2a-0f7352fe4975",
"deletedEvent": {
"movedToTrash": true
},
"eventTime": "2024-01-14T14:50:53.156877998Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "5"
}