Create Wishlist Item
Add a product to the authenticated customer's wishlist.
Endpoint
POST /api/shop/wishlistsRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Customer Bearer token (Bearer <accessToken>) |
Request Body
json
{
"productId": 2
}| Field | Type | Required | Description |
|---|---|---|---|
productId | integer | Yes | ID of the product to add to the wishlist. |
Response Fields (201 Created)
| Field | Type | Description |
|---|---|---|
id | integer | New wishlist item ID |
message | string | Confirmation message |
product | object | Associated product details |
TIP
The exact response shape follows the package's serialization. Confirm field presence against the live endpoint for your installation.
Validation
productIdis required and must reference an existing product.- A valid customer Bearer token is required.
- Adding the same product again is a no-op or returns the existing item (use Toggle to add/remove).
Use Cases
- "Add to wishlist" buttons on product pages
- Save-for-later from cart or category listings

