Function to delete product
https://rest.crmango.com/api/DeleteProduct
Bearer
varchar
Auth token
Function to delete product
code
integer
Return code
message
varchar
Info message
curl --request DELETE \
--url 'https://rest.crmango.com/api/DeleteProduct' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
{
"product_id" : 59
}
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/DeleteProduct',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => '{
{
"product_id" : 59
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
{
"product_id" : 59
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://rest.crmango.com/api/DeleteProduct");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
import requests
import json
url = "https://rest.crmango.com/api/DeleteProduct"
payload = json.dumps({
{
"product_id" : 59
}
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"message": "Product has been deleted"
}
{
"code": "int",
"message": "string"
}