Creates a new wishlist for the current user in the current store.
JavaScript
const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({name: 'My Wishlist', is_private: false, is_default: true}) }; fetch('https://demo.spreecommerce.org/api/v2/storefront/wishlists', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
200
Wishlist
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Specify the fields you would like returned in the response body. More information.
The Wishlist name.
Set the Wishlist to public or private. Defaults to true (private).
Whether the wishlist is set to the users default wishlist for the current store. Defaults to false.
200 Success - Returns the wishlist object.
wishlist
Show child attributes
Was this page helpful?