Manage Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "add",
"data": {
"prod_id": 12345,
"quantity": 1,
"price": 599.00
}
}
}'
Manages wishlist operations including get, add, set, delete, and clear. All operations return the updated wishlist state.
Bearer token for authentication
Query Parameters
Platform identifier (‘web’ or ‘mobile’)
Force re-initialization of wishlist (1 = yes, 0 = no)
Body Parameters
Wishlist operation payloadOperation type: ‘get’, ‘add’, ‘set’, ‘delete’, or ‘clear’
Required for ‘add’, ‘set’, and ‘delete’ operationsProduct ID to add/update/remove
Product quantity (typically 1 for wishlist)
Product price (for ‘add’ operation)
Get Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "get"
}
}'
Retrieves current wishlist with all product details including images, stock, and pricing.
Response
Wishlist products containerArray of wishlist itemsProduct images (filtered by gender if applicable)
Product quantity in wishlist
0 = unisex, 1 = male, 2 = female
Product variants (for mystery products) Whether this is a mystery product
Whether GST is included in price
Total number of items in wishlist
{
"products": {
"items": [
{
"prod_id": 12345,
"name": "Premium Cotton T-Shirt",
"price": 599.00,
"images": [
"https://cdn.example.com/products/12345/image1.jpg",
"https://cdn.example.com/products/12345/image2.jpg"
],
"stock": 50,
"prod_qty": 1,
"gender_type": 1,
"gst_inclusive": true
},
{
"prod_id": 67890,
"name": "Mystery Box - Large",
"price": 1499.00,
"images": [
"https://cdn.example.com/products/67890/image1.jpg"
],
"stock": 120,
"prod_qty": 1,
"variant": [
{
"id": 1001,
"size": "L",
"stock": 45
},
{
"id": 1002,
"size": "XL",
"stock": 75
}
],
"is_mystery_product": true,
"gst_inclusive": true
}
],
"total_items": 2
}
}
Add to Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "add",
"data": {
"prod_id": 12345,
"quantity": 1,
"price": 599.00
}
}
}'
Adds a product to the wishlist. Triggers Facebook pixel event if enabled and syncs with search analytics.
Body Parameters
Quantity (typically 1 for wishlist)
Response
Returns updated wishlist with all items (same format as Get Wishlist).
{
"products": {
"items": [
{
"prod_id": 12345,
"name": "Premium Cotton T-Shirt",
"price": 599.00,
"images": [
"https://cdn.example.com/products/12345/image1.jpg"
],
"stock": 50,
"prod_qty": 1,
"gst_inclusive": true
}
],
"total_items": 1
}
}
Update Wishlist Item
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "set",
"data": {
"prod_id": 12345,
"quantity": 1
}
}
}'
Updates an existing wishlist item. Typically used to refresh product details.
Body Parameters
Response
Returns updated wishlist with all items.
Remove from Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "delete",
"data": {
"prod_id": 12345
}
}
}'
Removes a product from the wishlist.
Body Parameters
Response
Returns updated wishlist without the deleted item.
{
"products": {
"items": [],
"total_items": 0
}
}
Clear Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"operation": "clear"
}
}'
Removes all items from the wishlist.
Body Parameters
Response
Returns empty wishlist.
{
"products": {
"items": [],
"total_items": 0
}
}
Sync Wishlist
curl -X POST "https://api.example.com/api/v2/wishlist/sync" \
-H "Content-Type: application/json" \
-d '{
"token": "YOUR_JWT_TOKEN",
"localwishlist": {
"products": {
"items": [
{
"prod_id": 12345
},
{
"prod_id": 67890
}
]
}
}
}'
Merges guest/local wishlist with user’s account wishlist after login. All items from local wishlist are added to the database.
Body Parameters
Guest wishlist to mergeArray of products with prod_id
Response
Returns merged wishlist with all items from both local and server.
{
"products": {
"items": [
{
"prod_id": 12345,
"name": "Premium Cotton T-Shirt",
"price": 599.00,
"images": ["https://cdn.example.com/products/12345/image1.jpg"],
"stock": 50,
"prod_qty": 1,
"gst_inclusive": true
},
{
"prod_id": 67890,
"name": "Graphic Hoodie",
"price": 1299.00,
"images": ["https://cdn.example.com/products/67890/image1.jpg"],
"stock": 30,
"prod_qty": 1,
"gst_inclusive": true
}
],
"total_items": 2
}
}
Error Responses
All wishlist endpoints may return these errors:
{
"title": "Bad Request",
"description": "Item already removed"
}
Notes
- Wishlist items are automatically re-initialized when accessing the
/wishlist page
- Product images are filtered based on gender type (male/female/unisex)
- Mystery products show aggregated stock across all variants
- GST inclusive pricing is calculated based on user status and system settings
- Facebook pixel events are sent for wishlist additions when enabled
- Changes are synced with search analytics for recommendation engine