Customer
Wishlist & Reviews
Wishlist management and product reviews
Wishlist
Wishlist requires a logged-in customer (client.auth.login first); all calls
run with the customer's access token.
Get Wishlist
const { data, error } = await client.wishlist.get();
// data.items: [{ id, productId, productName, productSku, productSlug,
// imageUrl, price, stockCached, createdAt }]Add Product
await client.wishlist.add('product-id');Remove Product
await client.wishlist.remove('product-id');Check if in Wishlist
const { inWishlist } = await client.wishlist.isInWishlist('product-id');Product Reviews
Get Reviews
const { data, error } = await client.reviews.getProductReviews('product-id', 1, 20);
// data: { reviews, total, page, limit, averageRating, reviewCount }Submit Review
const result = await client.reviews.submit({
productId: 'product-id',
rating: 5,
title: 'Great product!',
content: 'Highly recommended for everyone.',
authorName: 'Jan',
authorEmail: '[email protected]',
});Reviews are moderated and appear after admin approval. One review per product
per email; isVerifiedPurchase is computed server-side from the order history.
Vote Helpful
const { data } = await client.reviews.voteHelpful('review-id', true);
// data.success === false when this visitor already voted on the reviewBack in Stock
Subscribe an email to a notification for a sold-out product:
const { data, error } = await client.catalog.notifyWhenAvailable('product-id', '[email protected]');