Skip to main content

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.

Headers

Authorization
string
required
Bearer token for authentication

Query Parameters

platform
string
Platform identifier (‘web’ or ‘mobile’)
re_init
integer
Force re-initialization of wishlist (1 = yes, 0 = no)

Body Parameters

payload
object
required
Wishlist operation payload
operation
string
required
Operation type: ‘get’, ‘add’, ‘set’, ‘delete’, or ‘clear’
data
object
Required for ‘add’, ‘set’, and ‘delete’ operations
prod_id
integer
Product ID to add/update/remove
quantity
integer
Product quantity (typically 1 for wishlist)
price
number
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

products
object
Wishlist products container
items
array
Array of wishlist items
prod_id
integer
Product ID
name
string
Product name
price
number
Product price
images
array
Product images (filtered by gender if applicable)
stock
integer
Available stock quantity
prod_qty
integer
Product quantity in wishlist
gender_type
integer
0 = unisex, 1 = male, 2 = female
variant
array
Product variants (for mystery products)
id
integer
Variant ID
size
string
Variant size
stock
integer
Variant stock
is_mystery_product
boolean
Whether this is a mystery product
gst_inclusive
boolean
Whether GST is included in price
total_items
integer
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

payload.operation
string
required
Must be “add”
payload.data.prod_id
integer
required
Product ID to add
payload.data.quantity
integer
required
Quantity (typically 1 for wishlist)
payload.data.price
number
required
Product price

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

payload.operation
string
required
Must be “set”
payload.data.prod_id
integer
required
Product ID to update
payload.data.quantity
integer
required
Updated quantity

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

payload.operation
string
required
Must be “delete”
payload.data.prod_id
integer
required
Product ID to remove

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

payload.operation
string
required
Must be “clear”

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

token
string
required
JWT authentication token
localwishlist
object
Guest wishlist to merge
products.items
array
Array of products with prod_id
prod_id
integer
Product 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

Build docs developers (and LLMs) love