Skip to main content
Get Calendar Events
GET https://services.leadconnectorhq.com/calendars/events

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Query parameters

locationId
string
default:"0007BWpSzSwfiuSl0tR2"
required
Account Id
userId
string
default:"CVokAlI8fgw4WYWoCtQz"
User Id - Owner of an appointment. Either of userId, groupId or calendarId is required
calendarId
string
default:"BqTwX8QFwXzpegMve9EQ"
Either of calendarId, userId or groupId is required
groupId
string
default:"ocQHyuzHvysMo5N5VsXc"
Either of groupId, calendarId or userId is required
startTime
string
default:"1680373800000"
required
Start Time (in millis)
endTime
string
default:"1680978599999"
required
End Time (in millis)

Respuestas

events
object[]
{
  "events": [
    {
      "id": "string",
      "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",
      "description": "Some dummy description",
      "isRecurring": "true",
      "rrule": "string",
      "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"
      ],
      "masterEventId": "ocWd2wuBGAQzh2cH1fSZ"
    }
  ]
}
{}
{}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/calendars/events' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/calendars/events', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
  },
});
const data = await response.json();
import os, requests
response = requests.request(
    'GET',
    'https://services.leadconnectorhq.com/calendars/events',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/events');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
    ],
]);
$data = json_decode(curl_exec($ch), true);