Function to delete a calendar event or a whole recurring series. The event is also deleted from the owner's Google and Microsoft calendar
https://rest.crmango.com/api/DeleteCalendarEvent
Bearer
varchar
Auth token (required in Authorization header)
delete_scope
varchar
single (default) = only this event, series = all events of the series of this user including past ones
Function to delete a calendar event
code
integer
HTTP status code (200 = OK)
message
varchar
Info message
deleted
integer
Number of deleted events
sync.google
varchar
Synchronization with the owner's Google and Microsoft calendar: ok, failed, partial (series - only some dates), not_connected
sync.microsoft
varchar
Synchronization with the owner's Google and Microsoft calendar: ok, failed, partial (series - only some dates), not_connected
curl --request DELETE \
--url 'https://rest.crmango.com/api/DeleteCalendarEvent' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
{
"event_id": 1301,
"delete_scope": "series"
}
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/DeleteCalendarEvent',
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 => '{
{
"event_id": 1301,
"delete_scope": "series"
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
{
"event_id": 1301,
"delete_scope": "series"
}
});
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/DeleteCalendarEvent");
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/DeleteCalendarEvent"
payload = json.dumps({
{
"event_id": 1301,
"delete_scope": "series"
}
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"message": "Calendar series has been deleted",
"deleted": 4,
"sync": {
"google": "ok",
"microsoft": "not_connected"
}
}
{
"code": "int",
"message": "string"
}