The Dashboard Favorite List API provides functionality to create and manage a list of favorite dashboard pages. It allows you to streamline Wix users' dashboard navigation experience and make important pages quickly accessible.
With the Dashboard Favorite List API, you can:
It's important to note the following points before starting to code:
This article presents a sample use case your service might support. You are not limited to this exact flow, but it can serve as a good starting point to help you plan your service's implementation.
A Wix app provides a service that includes multiple dashboard page extensions, some nested in others.
To increase app usage and allow the user to quickly access its main features, add an Add to Favorites / Delete From Favorites button to its main dashboard pages:
Add an Add to Favorites button to your app's dashboard pages. To create an intuitive user experience, consider using the Wix Design System.
When the user clicks the button on one of the pages, your app sends that page's details to the Add User Favorite endpoint. Make sure to include the page ID and optional navigation parameters. You can also add a custom page title that appears in the UI:
The request body looks like this:
"favorite": {
"pageId": "3893d33b-9fm4-474b-80b0-dd7c32e20bfc",
"relativeUrl": "/limited-edition/analytics",
"title": "Limited Edition Products Analytics"
}
The endpoint creates a favorite page with the dashboard page's details, adds it to the list, and responds with the updated list of favorite dashboard pages. The response looks like this:
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "2",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-20T14:46:50.126Z",
"favorites": [
{
"id": "cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "Existing favorite page"
},
{
"id": "10b007d6-1d67-4deb-9adf-32813f580bab", // The ID of the favorite page created
"pageId": "3893d33b-9fm4-474b-80b0-dd7c32e20bfc",
"relativeUrl": "/limited-edition/analytics",
"title": "Limited Edition Products Analytics"
}
]
}
}
Your app might now replace the Add to Favorites button with a Remove from Favorites button. When the user clicks it, your app calls the Delete User Favorite endpoint with the favorite id
appended to the endpoint base URL: https://www.wixapis.com/dashboard/v1/user-favorite-list/delete-favorite/10b007d6-1d67-4deb-9adf-32813f580bab
The endpoint removes the page from the list of favorites and returns the updated list. The response looks like this:
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "3",
"createdDate": "2024-05-21T13:05:45.684Z",
"updatedDate": "2024-05-22T14:46:50.126Z",
"favorites": [
{
"id": "cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "Existing favorite page"
}
]
}
}
List of favorite dashboard pages.
Dashboard favorite list ID. Automatically generated by Wix.
Revision number. Increments automatically by 1 whenever the list is successfully updated. To prevent conflicting changes, pass the current revision number when updating the list.
Date and time the dashboard favorite list was created.
Date and time the dashboard favorite list was last updated.
List of favorite dashboard pages.
Retrieves the Wix user's dashboard favorite list.
You can only call this method when authenticated as a Wix app or Wix user identity.
Wix user's dashboard favorite list.
curl -X GET \
'https://www.wixapis.com/dashboard/v1/user-favorite-list' \
-H 'Authorization: <AUTH>'
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "1",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-19T13:05:45.684Z",
"favorites": [
{
"id": "7d228ce4-f0c6-4758-be72-beea48f83dd1",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "My Page"
},
{
"id": "b38a93a2-89f4-4c4f-8786-618f69cde012",
"pageId": "81f1ee0a-92b7-42f7-89cb-8b0f96146dcf",
"relativeUrl": "/route",
"title": "Another Page"
}
]
}
}
Creates a list of favorite dashboard pages for the current Wix user. A Wix user can only have one such list.
Note: When first calling this method on behalf of a Wix user, you can create a list that contains one or more favorite dashboard pages. However, if a list already exists for that Wix user, calling this method generates an error.
You can only call this method when authenticated as a Wix app or Wix user identity.
Dashboard favorite list to create.
Created dashboard favorite list.
curl -X POST \
'https://www.wixapis.com/dashboard/v1/user-favorite-list' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"favoriteList": {
"favorites": [
{
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "My Page"
},
{
"pageId": "81f1ee0a-92b7-42f7-89cb-8b0f96146dcf",
"title": "Another Page",
"relativeUrl": "/route"
}
]
}
}'
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "1",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-19T13:05:45.684Z",
"favorites": [
{
"id": "7d228ce4-f0c6-4758-be72-beea48f83dd1",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "My Page"
},
{
"id": "b38a93a2-89f4-4c4f-8786-618f69cde012",
"pageId": "81f1ee0a-92b7-42f7-89cb-8b0f96146dcf",
"relativeUrl": "/route",
"title": "Another Page"
}
]
}
}
Updates the current Wix user's list of favorite dashboard pages.
Make sure to include the current revision number when calling this method.
Note: Updating the list replaces the favorite pages it contains with those specified in the method.
You can only call this method when authenticated as a Wix app or Wix user identity.
Dashboard favorite list ID. Automatically generated by Wix.
Dashboard favorite list to update. The favorites
array in the request replaces the existing favorites
array.
To prevent conflicting changes, include the current revision number.
Updated dashboard favorite list.
curl -X PATCH \
'https://www.wixapis.com/dashboard/v1/user-favorite-list/c959d429-3136-41cb-9478-6acbd064e0fa' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"favoriteList": {
"revision": 1,
"favorites": [
{
"id":"7d228ce4-f0c6-4758-be72-beea48f83dd1",
"pageId":"3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title":"My Updated Page"
},
{
"id":"b38a93a2-89f4-4c4f-8786-618f69cde012",
"pageId":"81f1ee0a-92b7-42f7-89cb-8b0f96146dcf",
"relativeUrl":"/route",
"title":"Another Page"
}
]
}
}'
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "2",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-19T13:23:10.422Z",
"favorites": [
{
"id": "7d228ce4-f0c6-4758-be72-beea48f83dd1",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "My Updated Page"
},
{
"id": "b38a93a2-89f4-4c4f-8786-618f69cde012",
"pageId": "81f1ee0a-92b7-42f7-89cb-8b0f96146dcf",
"relativeUrl": "/route",
"title": "Another Page"
}
]
}
}
Deletes the Wix user's list of favorite dashboard pages.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the dashboard favorite list to delete.
curl -X DELETE \
'https://www.wixapis.com/dashboard/v1/user-favorite-list/c959d429-3136-41cb-9478-6acbd064e0fa' \
-H 'Authorization: <AUTH>'
{}
Adds a page to the current Wix user's list of favorite dashboard pages. If the Wix user doesn't have a list, the method creates a new list and adds the favorite page to it.
You can only call this method when authenticated as a Wix app or Wix user identity.
Favorite page to add to the list.
Updated dashboard favorite list.
curl -X POST \
'https://www.wixapis.com/dashboard/v1/user-favorite-list/add-favorite' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"favorite": {
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "New Favorite Page"
}
}'
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "16",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-20T14:46:50.126Z",
"favorites": [
{
"id": "cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "Existing favorite page"
},
{
"id": "10b007d6-1d67-4deb-9adf-32813f580bab",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "New Favorite Page"
}
]
}
}
Deletes the specified favorite page from the current Wix user's list of favorite dashboard pages. If no favorites remain in the list, it is deleted.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the favorite page to delete from the list.
Updated dashboard favorite list.
curl -X DELETE \
'https://www.wixapis.com/dashboard/v1/user-favorite-list/delete-favorite/cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77' \
-H 'Authorization: <AUTH>'
{
"favoriteList": {
"id": "b8216af7-cf7c-4860-8014-54e4824a1745",
"revision": "17",
"createdDate": "2024-05-19T13:05:45.684Z",
"updatedDate": "2024-05-20T14:46:50.126Z",
"favorites": [
{
"id": "10b007d6-1d67-4deb-9adf-32813f580bab",
"pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
"title": "My Favorite Page"
}
]
}
}
Triggered when the dashboard favorite list is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.dashboard.v1.favorite_list
.
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.dashboard.v1.favorite_list_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": "ef87fe69-3b57-4149-9694-fe9723dcc99b",
"entityFqdn": "wix.os.backoffice.v1.favorites",
"slug": "created",
"entityId": "67214477-f886-4583-a4cc-60495f5e2e78",
"createdEvent": {
"entity": {
"id": "67214477-f886-4583-a4cc-60495f5e2e78",
"revision": "1",
"createdDate": "2024-05-21T16:38:23.355Z",
"updatedDate": "2024-05-21T16:38:23.355Z",
"favorites": [
{
"id": "5332fd97-e2dd-4eb2-b59e-c0f84c1c9895",
"pageId": "5077a343-8f35-46b7-9942-d7a526555eb0",
"title": "First Favorite"
},
{
"id": "96dc7876-0203-47a6-9654-45a30dbc65cd",
"pageId": "dd0f5103-00ac-4303-827f-f08b4de2f163",
"title": "Second Favorite"
}
]
}
},
"eventTime": "2024-05-21T16:38:23.471478546Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "1"
}
Triggered when the dashboard favorite list is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.dashboard.v1.favorite_list
.
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.dashboard.v1.favorite_list_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": "97d59647-d68f-4c3f-9fed-d3642556164c",
"entityFqdn": "wix.os.backoffice.v1.favorites",
"slug": "deleted",
"entityId": "67214477-f886-4583-a4cc-60495f5e2e78",
"deletedEvent": {
"movedToTrash": true
},
"eventTime": "2024-05-21T16:54:00.675636253Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "15"
}
Triggered when the dashboard favorite list is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.dashboard.v1.favorite_list
.
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.dashboard.v1.favorite_list_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": "3f53095f-d6ba-455c-b907-2bee6f1389f9",
"entityFqdn": "wix.os.backoffice.v1.favorites",
"slug": "updated",
"entityId": "67214477-f886-4583-a4cc-60495f5e2e78",
"updatedEvent": {
"currentEntity": {
"id": "67214477-f886-4583-a4cc-60495f5e2e78",
"revision": "5",
"createdDate": "2024-05-21T16:38:23.355Z",
"updatedDate": "2024-05-21T16:53:40.493Z",
"favorites": [
{
"id": "5332fd97-e2dd-4eb2-b59e-c0f84c1c9895",
"pageId": "5077a343-8f35-46b7-9942-d7a526555eb0",
"title": "Updated First Favorite"
},
{
"id": "96dc7876-0203-47a6-9654-45a30dbc65cd",
"pageId": "dd0f5103-00ac-4303-827f-f08b4de2f163",
"title": "Second Favorite"
}
]
}
},
"eventTime": "2024-05-21T16:53:40.612668746Z",
"triggeredByAnonymizeRequest": false,
"entityEventSequence": "5"
}