Delete Product
Delete Product
POST https://sandbox.mnasati.com/v1/delete_product
This endpoint allows you to delete products from store.
Headers
Name
Type
Description
Content-Type
string
Application/JSON
Access Token
string
Authentication token (JWT)
Request Body
Name
Type
Description
product_id
integer
To delete a Product ID
{"status":true,"message":"Brand successfully deleted."}{ "message": "Not found."}Examples
import http.client
conn = http.client.HTTPSConnection("sandbox.mnasati.com")
payload = "{\"product_id\":\"2280\"}"
headers = {
'Content-Type': "",
'Authorization-Jwt': ""
}
conn.request("POST", "/v1/delete_product", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.mnasati.com/v1/delete_product",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"product_id\":\"2280\"}",
CURLOPT_HTTPHEADER => [
"Authorization-Jwt: ",
"Content-Type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Last updated
Was this helpful?