GetAllCalendarEvents

Function to get calendar events (one event by event_id, or all events overlapping the period date_from - date_to)

GET https://rest.crmango.com/api/GetAllCalendarEvents

Authorization

1 Sent in the request headers
Bearer varchar

Auth token (required in Authorization header)

Body data

6 Sent in the request body
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)

owner_id integer

Show only events of this user
Reference: GetAllUsers

limit integer

Number of events per page, 1-500 (default 100)

page integer

Page number starting from 0 (default 0)

Response

30 HTTP 200

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

Example request

curl --request GET \
  --url 'https://rest.crmango.com/api/GetAllCalendarEvents' \
  --header 'Authorization: Bearer auth_token'
{
    "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
        }
    ]
}