Delete CRM Notice
Usuwanie komunikatu CRM
PUT /crm_notice/{crm_notice_id}
URL Parameters
Nazwa | Rodzaj | Przykład | Opis |
---|---|---|---|
crm_notice_id | <STRING> |
64476899cd16c07f5a58a26b | Identyfikator komunikatu CRM |
Response Body
{
"success": <BOOLEAN>
}
Response Code
Status | Opis |
---|---|
200 | Rekordy zostały pobrane pomyślnie |
400 | Nieprawidłowe dane |
404 | Nie znaleziono zasobu |
Example
curl -X DELETE \
$CONPEEK_URL/crm_notice/64476899cd16c07f5a58a26b \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json' \
import requests
import os
from urllib import parse
crm_notice_id = "64476899cd16c07f5a58a26b"
url = parse.urljoin(os.environ["CONPEEK_URL"], f"/crm_notice/{crm_notice_id}")
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers)
print(response.text)
<?php
$curl = curl_init();
$crm_notice_id = "64476899cd16c07f5a58a26b";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/crm_notice/$crm_notice_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => array(
"Authorization: ".getenv("CONPEEK_KEY"),
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}