Sample Flow
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.
Provide quick access to a nested dashboard page
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:
Copy1The 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:
Copy1 -
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:
Copy1