Products
Delete a product
Removes the product from the store. Past orders keep their lines.
DELETE
https://elmatajer.com/api/v1/vendor/products/{id}Permission:
products.writePath parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The product id. |
Request
curl -X DELETE "https://elmatajer.com/api/v1/vendor/products/4904" \
-H "Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
const res = await fetch("https://elmatajer.com/api/v1/vendor/products/4904", {
method: "DELETE",
headers: {
"Api-Key": process.env.ELMATAJER_API_KEY,
"Accept": "application/json"
}
});
const data = await res.json();
$ch = curl_init("https://elmatajer.com/api/v1/vendor/products/4904");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Api-Key: " . getenv('ELMATAJER_API_KEY'), "Accept: application/json"],
]);
$data = json_decode(curl_exec($ch), true);
Response 200
{
"status": "ok",
"data": {
"deleted": true
}
}