About Item Labels

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:

  • Create, delete, and update item labels.
  • Retrieve the information about the item label.

Before you begin

It's important to note the following point before starting to code:

  • The Item Labels API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from Wix App Market.

Use cases

Terminology

Menu: A list of food and beverage items available for purchase at a restaurant, café, or other dining establishment.

Did this help?

Item Label: Sample Use Cases & Flows

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.

Sync pizza menu across all sites

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:

  1. Call Query Labels by the name field on the site where you updated the menu.
  2. Extract the, labels.id, labels.name and labels.icon field values.
  3. Call Create Label for your other sites and pass the new item label to each.
  4. Call Update Item and add the new label ID to the item.labels array.
Did this help?

Item Label: Supported Filters and Sorting

The following table shows field support for filters and sorting for the item variants object:

FieldSupported FiltersSortable
id$eq, $ne, $in, $ninSortable
createdDate$eq, $ne, $gt, $lt, $gte, $lteSortable
updatedDate$eq, $ne, $gt, $lt, $gte, $lteSortable
name$eq, $ne, $in, $nin, $beginsSortable
icon$existsSortable

Related content: API Query Language, Query Labels.

Did this help?

Item Label Object


Properties
idstringRead-onlyformat GUID

Item label ID.


revisionintegerRead-onlyformat int64

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.


createdDatestringRead-onlyformat date-time

Date and time the item label was created.


updatedDatestringRead-onlyformat date-time

Date and time the item label was updated.


namestringminLength 1maxLength 50

Item label name.


iconIcon

Item label icon.


extendedFieldsExtendedFields

Extended fields.

Label
JSON
{ "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 } }
Did this help?

GET

List Labels


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/restaurants/item-labels/v1/labels

Request
This endpoint does not take any parameters.
Response Object
labelsArray <Label>

Retrieved item labels.

List labels
Request
cURL
curl -X GET https://www.wixapis.com/restaurants/item-labels/v1/labels \ -H 'Authorization: <AUTH>' \
Response
JSON
{ "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 } } ] }
Did this help?

POST

Create Label


Developer Preview

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants/item-labels/v1/labels

Body Params
labelLabelRequired

Item label details.

Response Object
labelLabel

Item label.

Create a label
Request
cURL
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 } } }'
Response
JSON
{ "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 } } }
Event TriggersThis method triggers the following events:
Did this help?

GET

Get Label


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/restaurants/item-labels/v1/labels/{labelId}

Path Params
labelIdstringRequired

Item label ID.

Response Object
labelLabel

Item label.

Get a label
Request
cURL
curl -X GET https://www.wixapis.com/restaurants/item-labels/v1/labels/6046e53c-4ce3-41f7-9e2a-0f7352fe4975 \ -H 'Authorization: <AUTH>'
Response
JSON
{ "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 } } }
Did this help?

DELETE

Delete Label


Developer Preview

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
DELETE
https://www.wixapis.com/restaurants/item-labels/v1/labels/{labelId}

Path Params
labelIdstringRequired

ID of the item label.

Response Object
Returns an empty object.
Delete a label
Request
cURL
curl -X DELETE https://www.wixapis.com/restaurants/item-labels/v1/labels/657efce5-ee34-4578-bf5a-42daf5e7a9f0 \ -H 'Authorization: <AUTH>'
Response
JSON
{}
Event TriggersThis method triggers the following events:
Did this help?

POST

Query Labels


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants/item-labels/v1/labels/query

Body Params
queryQuery

Query options.

Response Object
labelsArray <Label>

Retrieved item labels.


pagingMetadataPagingMetadata

The metadata of the paginated results.

Query labels
Request
cURL
curl -X POST https://www.wixapis.com/restaurants/item-labels/v1/labels/query \ -H 'Authorization: <AUTH> \ --data-binary '{ "query": { "sort": [], "filter": { "icon": { "$exists": true } } } }'
Response
JSON
{ "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 } }
Did this help?

PATCH

Update Label


Developer Preview

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
PATCH
https://www.wixapis.com/restaurants/item-labels/v1/labels/{label.id}

Path Params
label.idstringRequired

Item label ID.

Body Params
labelLabelRequired

Item label to update.

Response Object
labelLabel

Updated item label.

Update a label
Request
cURL
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" ] } }'
Response
JSON
{ "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 } } }
Event TriggersThis method triggers the following events:
Did this help?

Item Label Created


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label.


slugstring

Event name. Expected created.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


createdEventCreatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "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 } } }

ItemLabelCreated
JSON
{ "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" }
Did this help?

Item Label Updated


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label.


slugstring

Event name. Expected updated.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


updatedEventUpdatedEvent

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "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 } } }

ItemLabelUpdated
JSON
{ "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" }
Did this help?

Item Label Deleted


Developer Preview

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.

Permissions
Manage Bookings Services and Settings
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring

Unique event ID. Allows clients to ignore duplicate webhooks.


entityFqdnstring

Fully qualified domain name of the entity associated with the event. Expected wix.restaurants.menus.v1.item_label.


slugstring

Event name. Expected deleted.


entityIdstring

ID of the entity associated with the event.


eventTimestringformat date-time

Event timestamp.


triggeredByAnonymizeRequestboolean

Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).


originatedFromstring

If present, indicates the action that triggered the event.


deletedEventstruct

Event information.

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "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 } } }

ItemLabelDeleted
JSON
{ "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" }
Did this help?