Store Kit
Wishlist

Del Wishlist Items

Removes an item from the customer's wishlist

Remove Product from Wishlist

Remove a specific product from the customer's wishlist using the wishlist item ID.

Endpoint

DELETE /v1/wishlist/{id}

Base URL: https://api.storekit.app

Authentication

Info: All API requests require authentication using an API key. Generate your API key from the StoreKit Dashboard under API Key Usage section.

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key from the StoreKit dashboard

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the wishlist item to remove

Response

Success Response (200 OK)

When a product is successfully removed from the wishlist, the API returns a 200 OK status with response body.

{
  "success": true,
  "message": "Item removed from wishlist successfully"
}

Error Responses

Wishlist Item Not Found (404)

{
  "success": false,
  "message": "Wishlist item not found"
}

Invalid API Key (401)

{
  "success": false,
  "message": "Invalid or missing API key"
}

Invalid ID Parameter (422)

{
  "success": false,
  "message": "Invalid id error",
  "errors": {
    "id": ["Invalid ID format"]
  }
}

Internal Server Error (500)

{
  "success": false,
  "message": "Failed to get all items from cart"
}

Code Examples

curl -X DELETE "https://api.storekit.app/v1/wishlist/wishlist_item_123456789" \
  -H "x-api-key: sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402"
const response = await fetch("https://api.storekit.app/v1/wishlist/wishlist_item_123456789", {
  method: "DELETE",
  headers: {
    "x-api-key":
      "sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402",
  },
});

if (response.status === 204) {
console.log("Product removed from wishlist successfully");
} else {
const errorData = await response.json();
console.error("Error:", errorData.message);
}
import axios from "axios";

try {
  const response = await axios.delete("https://api.storekit.app/v1/wishlist/wishlist_item_123456789", {
    headers: {
      "x-api-key":
        "sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402",
    },
  });

  if (response.status === 204) {
    console.log("Product removed from wishlist successfully");
  }
} catch (error) {
  if (error.response) {
    console.error("Error:", error.response.data.message);
  } else {
    console.error("Request failed:", error.message);
  }
}
const https = require("https");

const options = {
hostname: "api.storekit.app",
port: 443,
path: "/v1/wishlist/wishlist_item_123456789",
method: "DELETE",
headers: {
"x-api-key":
"sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402",
},
};

const req = https.request(options, (res) => {
let data = "";

res.on("data", (chunk) => {
data += chunk;
});

res.on("end", () => {
if (res.statusCode === 204) {
console.log("Product removed from wishlist successfully");
} else {
const result = JSON.parse(data);
console.error("Error:", result.message);
}
});
});

req.on("error", (error) => {
console.error("Request failed:", error);
});

req.end();
import requests

url = "https://api.storekit.app/v1/wishlist/wishlist_item_123456789"
headers = {
    "x-api-key": "sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402"
}

try:
    response = requests.delete(url, headers=headers)

    if response.status_code == 204:
        print("Product removed from wishlist successfully")
    else:
        error_data = response.json()
        print(f"Error: {error_data['message']}")

except requests.exceptions.RequestException as e:
    print(f"Request failed: {e}")
<?php
$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.storekit.app/v1/wishlist/wishlist_item_123456789",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402"
],
]);

$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

if ($httpCode === 204) {
    echo "Product removed from wishlist successfully\n";
} else {
    $errorData = json_decode($response, true);
echo "Error: " . $errorData['message'] . "\n";
}
?>
$.ajax({
  url: "https://api.storekit.app/v1/wishlist/wishlist_item_123456789",
  method: "DELETE",
  headers: {
    "x-api-key":
      "sk_live_be186797384f05ff038e1751e8ff9572cf8a05adfdba79abb7e8bcd165f2c402",
  },
  success: function (data, textStatus, xhr) {
    if (xhr.status === 204) {
      console.log("Product removed from wishlist successfully");

      // Example: Update UI
      $("#wishlist-success").show().text("Product removed from wishlist");
      $(".wishlist-item[data-id='wishlist_item_123456789']").fadeOut();

      // Update wishlist count
      const currentCount = parseInt($("#wishlist-count").text());
      $("#wishlist-count").text(currentCount - 1);
    }
  },
  error: function (xhr, status, error) {
    if (xhr.responseJSON) {
      console.error("Error:", xhr.responseJSON.message);
      $("#wishlist-error").show().text(xhr.responseJSON.message);
    } else {
      console.error("Request failed:", error);
      $("#wishlist-error").show().text("Failed to remove product from wishlist");
    }
  },
});

Authentication & Session Management

This endpoint automatically handles both authenticated and anonymous users:

  • Authenticated users: Removes items from their customer account wishlist
  • Anonymous users: Removes items from their session-based wishlist

No manual session management is required - the API handles this automatically through cookies.

Important Notes

  • The id parameter must be a valid wishlist item ID (not a product ID)
  • To get wishlist item IDs, use the Get Wishlist Items endpoint first
  • Successfully removed items return a 204 No Content status with no response body
  • API key is required for all requests and can be generated in your StoreKit Dashboard

Customer Context

Info: This endpoint uses customer identification middleware that tracks items by:

  • Authenticated users: Items are associated with their customerId
  • Guest users: Items are tracked by sessionId for the current browser session automatically

Status Codes

CodeDescription
204Product successfully removed from wishlist
401Invalid or missing API key
404Wishlist item not found
422Invalid ID parameter format
500Internal server error

Getting Wishlist Item IDs

To remove items from the wishlist, you'll need the wishlist item ID. You can get this by first calling the Get Wishlist Items endpoint