The Wishlist is an own-managed list of desired products per customer that can be administrated in the Store by a right-side drawer similar to the Cart UI. It can also be managed via API for headless models.

The idea is to reuse the existing wishlist UI components provided by default by Vue Storefront Next.
There are two set of changes to perform for the UI:

Header Wishlist Icon
Wishlist Panel
Add-to/Remove-from Wishlist


The wishlists will have a global maximum number of items "max_wishlist_length", configurable via environment variable, defaulting to 100.
Some API specs details are subject to changes on implementation.
Returns the customer's wishlist items including product information.
max_wishlist_length items.max_wishlist_length, only the first max_wishlist_length items are returned, ignoring the rest.Spec
GET /wishlists/mine/items200 Array of wishlist items with product information.[
{
"id": "Unique id of the item",
"productId": "The id of the product",
"createdAt": "The addition date and time",
"companyId": "The company id",
"customerId": "The customer Id of the wishlist owner",
"additionalInformation": {
"product": {
"name": "The product name",
"sku": "The product SKU",
"imageUrl": "Full image URL",
"price": {
"price": 1000,
"currency": "usd"
}
}
}
},
...
]
Returns the quantity of items in the customer's wishlist.
max_wishlist_length, the value max_wishlist_length will be returned.Spec
GET /wishlists/mine/items/count200 An object with the quantity of items.{
"count": 10
}
Adds the specified product to the customer's wishlist.
ignoreIfExists).max_wishlist_length), a descriptive error is returned.Spec
POST /wishlists/mine/itemsignoreIfExists: In query string. boolean defaulting to false. Specified if the service should return success (200) or error response (400) when the product is already in the wishlist.{
"productId": "The Id of a product"
}
201 Item added OK.{
"id": "Unique id of the item",
"productId": "The id of the product",
"createdAt": "The addition date and time",
"companyId": "The company id",
"customerId": "The customer Id of the wishlist owner",
"additionalInformation": {
"product": {
"name": "The product name",
"sku": "The product SKU",
"imageUrl": "Full image URL",
"price": {
"price": 1000,
"currency": "usd"
}
}
}
}
200 The item was already in the list and the parameter ignoreIfExists was specified as true. The response body is the existig item, in the same format as in the 201 response.400 Item could not be added. The reason could be that the product was already in the list and the parameter ignoreIfExists is false, or because the wishlist reached the maximum length max_wishlist_length. Response body has the standard Streto API Response Error format.Removes the specified product from the customer Wishlist.
ignoreIfNotExists).Spec
DELETE /wishlists/mine/items/{itemId}ignoreIfNotExists: In query string. boolean defaulting to false. Specified if the service should return success (200) or error response (404) when the product is not in the wishlist.204 Item deleted OK or there was no item owned by the user with the specified id and ignoreIfNotExists was specified as true.404 Having the parameter ignoreIfNotExists as false, the item was not found with the specified id or it is not owned by the user making the request.Toggles the state of a product in the wishlist: If the product was already in the list, it is removed from it, otherwise it is added.
max_wishlist_length), a descriptive error is returned.Spec
POST /wishlists/mine/items/by-product-id/{productId}/toggle201 Item added OK.{
"id": "Unique id of the item",
"productId": "The id of the product",
"createdAt": "The addition date and time",
"companyId": "The company id",
"customerId": "The customer Id of the wishlist owner",
"additionalInformation": {
"product": {
"name": "The product name",
"sku": "The product SKU",
"imageUrl": "Full image URL",
"price": {
"price": 1000,
"currency": "usd"
}
}
}
}
204 Item deleted OK (no body).400 Item could not be added because the wishlist reached the maximum length max_wishlist_length. Response body has the standard Streto API Response Error format.