Skip to main content
POST
/
wishlist
Add item to wishlist
curl --request POST \
  --url https://store.salesive.com/api/v1/wishlist \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-shop-id: <api-key>' \
  --data '
{
  "productId": "<string>",
  "variantId": "<string>"
}
'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "user": "<string>",
    "shop": "<string>",
    "items": [
      {
        "product": {
          "_id": "<string>",
          "name": "<string>",
          "price": 123,
          "images": [
            "<string>"
          ],
          "formattedPrice": "<string>",
          "sku": "<string>"
        },
        "addedAt": "2023-11-07T05:31:56Z",
        "variant": "<string>",
        "variantAttributes": {}
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Request

POST /wishlist
Authorization: Bearer {{token}}
X-Shop-Id: {{shopId}}
Content-Type: application/json

{
  "productId": "68e5bb463a1fc56a8ac150bf",
  "variantId": "68e5c1303a1fc56a8ac151e2"
}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
X-Shop-IdstringIdentify the shop that owns the wishlist.
Content-TypestringAlways set to application/json.

Body parameters

FieldTypeRequiredDescription
productIdstringYesProduct identifier to add to wishlist.
variantIdstringNoVariant identifier. Include it to add a specific variant.

Successful response

{
  "status": 200,
  "success": true,
  "message": "Item added to wishlist",
  "data": {
    "_id": "68f98d77c8502e9619569c24",
    "user": "68f976e92bb0b821425fdda6",
    "shop": "68b8f52575da81b332af29f1",
    "items": [
      {
        "product": {
          "_id": "68e5bb463a1fc56a8ac150bf",
          "name": "Head phone",
          "price": 10000,
          "formattedPrice": "$100.00"
        },
        "variant": "68e5c1303a1fc56a8ac151e2",
        "variantAttributes": {
          "size": "1",
          "color": "a"
        },
        "addedAt": "2025-11-14T16:00:00.000Z"
      }
    ],
    "createdAt": "2025-11-14T15:00:00.000Z",
    "updatedAt": "2025-11-14T16:00:00.000Z"
  }
}

Error response

{
  "status": 404,
  "success": false,
  "message": "Product not found",
  "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json
productId
string
required

Product identifier to add to wishlist.

variantId
string

Optional variant identifier to add specific variant.

Response

Item added to wishlist.

status
integer
required
success
boolean
required
message
string
required
data
object
required