Function to get calendar events (one event by event_id, or all events overlapping the period date_from - date_to)
https://rest.crmango.com/api/GetAllCalendarEvents
Bearer
varchar
Auth token (required in Authorization header)
event_id
integer
ID of one event. If filled, the dates are not used
date_from
varchar
Start of the period - unix timestamp or date (required without event_id)
date_to
varchar
End of the period - unix timestamp or date. A date without time means the whole day. Maximum period is 366 days (required without event_id)
limit
integer
Number of events per page, 1-500 (default 100)
page
integer
Page number starting from 0 (default 0)
Function to get calendar events
code
integer
HTTP status code (200 = OK)
response
array
List of events, or "Empty response" when nothing was found
response[0].event_id
integer
Event ID
response[0].uuid
varchar
Unique event identifier
response[0].owner_id
integer
User ID whose calendar the event belongs to
response[0].created_by
integer
User ID who created the event
response[0].created
integer
Creation time (unix timestamp)
response[0].title
varchar
Event title
response[0].description
varchar
Event description (plain text)
response[0].date_from
integer
Event start (unix timestamp)
response[0].date_to
integer
Event end (unix timestamp)
response[0].type
integer
Event type
response[0].is_private
integer
Private event (0 = public, 1 = private)
response[0].source
varchar
Event source (MANGO_CAL, MANGO_PRIV)
response[0].company_id
integer
ID of the related company
response[0].branch_id
integer
ID of the related company branch
response[0].person_id
integer
ID of the related person
response[0].activity_id
integer
ID of the related activity (null if none)
response[0].guests
array
Guest e-mail addresses
response[0].color
varchar
Event color
response[0].address
varchar
Event address
response[0].latitude
varchar
Latitude
response[0].longitude
varchar
Longitude
response[0].notification_type
integer
Notification unit (null if no notification)
response[0].notification_value
integer
Notification value (null if no notification)
response[0].notification_who
integer
Who receives the notification (null if no notification)
response[0].is_series
integer
1 = event is part of a series
response[0].series_id
varchar
Series ID (shared by all dates of the series, empty if not a series)
response[0].google_synced
boolean
Event exists in the owner's Google calendar
response[0].microsoft_synced
boolean
Event exists in the owner's Microsoft calendar
curl --request GET \
--url 'https://rest.crmango.com/api/GetAllCalendarEvents' \
--header 'Authorization: Bearer auth_token'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/GetAllCalendarEvents',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token'
),
));
$response = curl_exec($curl);
echo $response;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://rest.crmango.com/api/GetAllCalendarEvents");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.send();
import requests
url = "https://rest.crmango.com/api/GetAllCalendarEvents"
payload = {}
headers = {
'Authorization': 'Bearer auth_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"response": [
{
"event_id": 1234,
"uuid": "a1b2c3d4e5f6a7b81790805600",
"owner_id": 5,
"created_by": 5,
"created": 1790000000,
"title": "Meeting with client",
"description": "Discuss the offer",
"date_from": 1790845200,
"date_to": 1790848800,
"type": 3,
"is_private": 0,
"source": "MANGO_CAL",
"company_id": 8,
"branch_id": 0,
"person_id": 0,
"activity_id": null,
"guests": [
"client@example.com"
],
"color": "#00ff00",
"address": "Bratislava",
"latitude": "",
"longitude": "",
"notification_type": 1,
"notification_value": 30,
"notification_who": 1,
"is_series": 0,
"series_id": "",
"google_synced": true,
"microsoft_synced": false
}
]
}
{
"code": "int",
"message": "string"
}