Get Calendar Events
Get Calendar Events
Request
Security: Bearer Auth
Utiliza el Access Token generado con tipo de usuario Subcuenta o el Token de Integración Privada de la Subcuenta en PowerLeads. Proporciona tu token Bearer en el encabezado Authorization al realizar solicitudes a recursos protegidos.
Example: Authorization: Bearer 123
Query Parameters
calendarId string
Either of calendarId, userId or groupId is required
Example: BqTwX8QFwXzpegMve9EQ
groupId string
Either of groupId, calendarId or userId is required
Example: ocQHyuzHvysMo5N5VsXc
userId string
User Id - Owner of an appointment. Either of userId, groupId or calendarId is required
Example: CVokAlI8fgw4WYWoCtQz
endTime string (required)
End Time (in millis)
Example: 1680978599999
locationId string (required)
Location Id
Example: 0007BWpSzSwfiuSl0tR2
startTime string (required)
Start Time (in millis)
Example: 1680373800000
Headers
Authorization string (required)
Access Token
Example: Bearer 9c48df2694a849b6089f9d0d3513efe
Version string (required)
API Version
Allowed value: 2021-04-15
Responses
Successful response 201
Response Body
events array[object]
- id
string– Event ID or instance ID
Examples:ocQHyuzHvysMo5N5VsXc,ocQHyuzHvysMo5N5VsXc_1729821600000_1800 - address
string– Calendar event address
Example:https://meet.google.com/yqp-gogr-wve - title
string– Calendar event title
Example:Appointment with GHL Dev team - calendarId
string– Calendar ID
Example:BqTwX8QFwXzpegMve9EQ - locationId
string– Location ID
Example:0007BWpSzSwfiuSl0tR2 - contactId
string– Contact ID
Example:9NkT25Vor1v4aQatFsv2 - groupId
string– Group ID
Example:9NkT25Vor1v4aQatFsv2 - appointmentStatus
string– Status
Example:confirmed - assignedUserId
string– Primary owner of the appointment
Example:YlWd2wuCAZQzh2cH1fVZ - users
array[string]– Secondary owners
Example:["YlWd2wuCAZQzh2cH1fVZ","9NkT25Vor1v4aQatFsv2"] - notes
string– Notes
Example:Some dummy note - isRecurring
boolean– If the event is recurring
Example:true - rrule
string– Recurrence rule (RFC 5545)
Examples:RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5 - startTime
object– Start time
Example:2023-09-25T16:00:00+05:30 - endTime
object– End time
Example:2023-09-25T16:00:00+05:30 - dateAdded
object– Date the event was added
Example:2023-09-25T16:00:00+05:30 - dateUpdated
object– Last updated date
Example:2023-09-25T16:00:00+05:30 - assignedResources
array[string]– Rooms/equipment assigned - createdBy
object– Metadata of the creator - masterEventId
string– Master event ID for recurring instances
Example:ocWd2wuBGAQzh2cH1fSZ
Responses
✅Successful response 200
array[object]string (required)Event Id or Instance id for a recurring event
Examples:
ocQHyuzHvysMo5N5VsXc, ocQHyuzHvysMo5N5VsXc_1729821600000_1800stringCalendar Event address
Example:
https://meet.google.com/yqp-gogr-wvestring (required)Calendar Event title
Example:
Appointment with PowerLeads Dev teamstring (required)Calendar ID
Example:
BqTwX8QFwXzpegMve9EQstring (required)Location ID
Example:
0007BWpSzSwfiuSl0tR2string (required)Contact ID
Example:
9NkT25Vor1v4aQatFsv2string (required)Group ID
Example:
9NkT25Vor1v4aQatFsv2string (required)Appointment Status
Example:
confirmedstring (required)AssignedUser - the primary owner of an appointment
Example:
YlWd2wuCAZQzh2cH1fVZarray[string] (required)Users - the secondary owners of an appointment.
Example:
["YlWd2wuCAZQzh2cH1fVZ","9NkT25Vor1v4aQatFsv2"]stringNotes
Example:
Some dummy notebooleantrue if the event is recurring otherwise false
Example:
truestringRRULE as per the iCalendar (RFC 5545) specification for recurring events. DTSTART is not required, instance ids are calculated on the basis of startTime of the event.
Examples:
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5, RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20210623T043000Z EXDATE:20211105T040000Z,20211105T040000Zobject (required)Start Time
Example:
2023-09-25T16:00:00+05:30object (required)End Time
Example:
2023-09-25T16:00:00+05:30object (required)Date Added
Example:
2023-09-25T16:00:00+05:30object (required)Date Updated
Example:
2023-09-25T16:00:00+05:30array[string]Ids of associated resources rooms and/or equipments
objectAppointment booked by metadata
- userId string
The ID of the user who created or updated the appointment
string requiredThe source of the appointment
stringMaster event id for a recurring instance
Example:
ocWd2wuBGAQzh2cH1fSZ
Request Sample: Shell / cURL
curl --request GET \ --url 'https://services.leadconnectorhq.com/calendars/events?locationId=0007BWpSzSwfiuSl0tR2&startTime=1680373800000&endTime=1680978599999' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123' \ --header 'Version: 2021-04-15'
Response Example
{ "events": [ { "id": "ocQHyuzHvysMo5N5VsXc", "address": "https://meet.google.com/yqp-gogr-wve", "title": "Appointment with GHL Dev team", "calendarId": "BqTwX8QFwXzpegMve9EQ", "locationId": "0007BWpSzSwfiuSl0tR2", "contactId": "9NkT25Vor1v4aQatFsv2", "groupId": "9NkT25Vor1v4aQatFsv2", "appointmentStatus": "confirmed", "assignedUserId": "YlWd2wuCAZQzh2cH1fVZ", "users": [ "YlWd2wuCAZQzh2cH1fVZ", "9NkT25Vor1v4aQatFsv2" ], "notes": "Some dummy note", "isRecurring": "true", "rrule": "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5", "startTime": "2023-09-25T16:00:00+05:30", "endTime": "2023-09-25T16:00:00+05:30", "dateAdded": "2023-09-25T16:00:00+05:30", "dateUpdated": "2023-09-25T16:00:00+05:30", "assignedResources": [ "string" ], "createdBy": { "userId": "string", "source": "string" }, "masterEventId": "ocWd2wuBGAQzh2cH1fSZ" } ]}