api:pbx:calendar:get
Table of Contents
API : PBX : Calendar Get
Request
This request will return a single calendar event from the phonebook.
Calendar events are personal, but other employees can be given readCalendar and/or writeCalendar permissions through PBX groups.
If a user does not have readCalendar and writeCalendar but is from the same customer requests an event that that does not belong to the user, then a reduced version for overviews are returned, like in the App/Employees list api.
| URL | https://api.telecomx.dk/pbx/calendar/EVENT_ID | |
|---|---|---|
| Method | GET | |
| Access level | PERSONAL if event belongs to the user otherwise reduced response. VIEWER, MANAGER, OWNER if event belongs to the user or user has group right 'readCalendar' on the events owner. RESELLER, RESELLER_ADMIN or ADMIN no access. |
|
| Param | EVENT_ID | Id of the calendar event (24 hex-char string). |
Query examples
https://api.telecomx.dk/pbx/calendar/12345678901234567890ABAB
Response
| JSON object | ||
|---|---|---|
| _id | Id | Unique id of the calendar event. |
| externalId | String | External ID, can be used to reference events from another system. |
| customer | Id | Id of the customer. |
| employee | Id | Id of the employee the event belongs to. |
| subject | String | Subject. |
| body | Object | Body. |
| body.content | String | Body content. |
| body.type | String | Type of body: html or text. |
| body.preview | String | Textual preview of the body. |
| start | Date | Start |
| end | Date | End |
| isAllDay | Boolean | True if event is all day. |
| importance | String | Event importance: low, normal, high |
| type | String | Type of event: singleInstance - single event, occurrence - occurrence of a series, exception - exception from a series, seriesMaster - recurring series of events. |
| seriesMasterId | String | Id of the series master. Only applies for types occurrence and exception. |
| showAs | String | State of employee during event: unknown, free, tentative, busy, oof, workingElsewhere. |
| sensitivity | String | Sensitivity: normal - all may view, personal - marked as non-work, private - non-work visible to owner only, confidential - work, visible to owner only. |
| isCancelled | Boolean | True if cancelled. |
| isOnlineMeeting | Boolean | True if this is an online meeting. |
| onlineMeetingJoinUrl | String | If this is an online meeting (teams) this is the url to join the meeting. |
| isOrganizer | Boolean | True if employee has created this event. |
| isReminderOn | Boolean | True if a reminder for this event is enabled. |
| reminderMinutesBeforeStart | Number | Number of minutes to be reminded before start. |
| created | Date | When it was created. |
| lastModified | Date | When it was last modified. |
| location | Object | Location data. |
| location.displayName | String | Optional name of location. |
| location.emailAddress | String | Optional email address of the location. |
| location.address | Object | Optional address of the location. |
| location.address.street | String | Street. |
| location.address.zip | String | Zip. |
| location.address.city | String | City. |
| location.address.state | String | State. |
| location.address.country | String | Country. |
| recurrence | Object | Recurrence settings |
| recurrence.pattern | Object | Recurrence pattern |
| recurrence.pattern.dayOfMonth | Number | day of month the event occurs or null, if type=absoluteMonthly,absoluteYearly. |
| recurrence.pattern.daysOfWeek | Array | Days of the week the event occurs or null: sunday, monday, tuesday, wednesday, thursday, friday, saturday, if type=weekly,relativeMonthly,relativeYearly. |
| recurrence.pattern.firstDayOfWeek | String | First day of week, if type=weekly. |
| recurrence.pattern.index | String | which instance of allow days in daysOfWeek, counted from start of month to invoke: first, second, third, fourth, last, if type=relativeMonthly,relativeYearly. |
| recurrence.pattern.interval | Number | The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. |
| recurrence.pattern.month | Number | The month in which the event occurs. This is a number from 1 to 12. |
| recurrence.pattern.type | String | daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. |
| recurrence.range | Object | Recurrence range |
| recurrence.range.endDate | Date | Last date it may occur. |
| recurrence.range.numberOfOccurrences | Number | Number of occurrences, if range-type=numbered. |
| recurrence.range.startDate | Date | Must be same as start of master event. |
| recurrence.range.type | String | endDate, noEnd, numbered. |
| attendees | Array | List of attendees |
| attendees[].type | String | required, optional, resource. |
| attendees[].emailAddress | String | email address. |
| attendees[].name | String | Name of attendee. |
| attendees[].statusResponse | String | Status response: none, organizer, tentativelyAccepted, accepted, declined, notResponded. |
| attendees[].statusTime | Date | When attendee responded. |
| statusResponse | String | Users response to an invite for this event: none, organizer, tentativelyAccepted, accepted, declined, notResponded. |
| statusTime | Date | When user responded to the invite. |
| categories | Array | Optional list of names of categories the event is tagged with. |
Example
{ "_id":"12345678901234567890ABCD", "externalId": "MS365-sfhu3hfnbjob3u09ihfionbuoeh0hcnonboeunonsc", "customer": "12345678901234567890AAAA", "employee": "12345678901234567890BBBB", "subject": "My event", "body": { "content": "<b>this</b> is the message body", "type": "HTML", "preview": "this is the message body" }, "start": "2024-01-01T00:00:00.000Z", "end": "2024-01-01T01:00:00.000Z", "isAllDay": false, "importance": "normal", "type": "singleInstance", "seriesMasterId": null, "showAs": "busy", "sensitivity": "normal", "isCancelled": false, "isOnlineMeeting": false, "isOrganizer": true, "isReminderOn": true, "reminderMinutesBeforeStart": 15, "created": "2024-01-01T00:00:00.000Z", "lastModified": "2024-01-01T00:00:00.000Z", "location": { "displayName": "Restaurant Beef", "emailAddress": "location@mail.com", "address": { "street": "Main street 24", "zip": "1234", "city": "Copenhagen", "state": null, "country": "Danmark" } }, "recurrence": { "pattern": { "dayOfMonth": null, "daysOfWeek": [ "monday","tuesday" ], "firstDayOfWeek": "monday", "index": "first", "interval": 2, "month": null, "type": "absoluteMonthly" }, "range": { "endDate": "2024-06-01T00:00:00.000Z", "numberOfOccurrences": null, "startDate": "2024-01-01T00:00:00.000Z", "type": "endDate" } }, "attendees": [ { "type": "required", "emailAddress": "user1@telecomx.dk", "name": "User 1", "statusResponse": "accepted", "statusTime": "2024-01-01T00:00:00.000Z" }, { "type": "required", "emailAddress": "user2@telecomx.dk", "name": "User 2", "statusResponse": "declined", "statusTime": "2024-01-01T00:02:00.000Z" } ], "statusResponse": "accepted", "statusTime": "2024-01-01T00:00:00.000Z", "categories": [ "Internal meeting", "Coffee", "Buns" ] }
Response - if reduced
| JSON object | ||
|---|---|---|
| _id | Id | Unique id of the calendar event. |
| employee | Id | Id of the employee the event belongs to. |
| subject | String | Subject, or null if sensitivity is not normal (e.g. private). |
| start | Date | Start |
| end | Date | End |
| isAllDay | Boolean | True if event is all day. |
| type | String | Type of event: singleInstance - single event, occurrence - occurrence of a series, exception - exception from a series, seriesMaster - recurring series of events. |
| showAs | String | State of employee during event: unknown, free, tentative, busy, oof, workingElsewhere. |
| sensitivity | String | Sensitivity: normal - all may view, personal - marked as non-work, private - non-work visible to owner only, confidential - work, visible to owner only. |
Example - reduced
{ "_id":"12345678901234567890ABCD", "employee": "12345678901234567890BBBB", "subject": "My event", "start": "2024-01-01T00:00:00.000Z", "end": "2024-01-01T01:00:00.000Z", "isAllDay": false, "type": "singleInstance", "showAs": "busy", "sensitivity": "normal", }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | not_found | Event not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/calendar/get.txt · Last modified: 2025/03/04 10:54 by Per Møller