Get Appointments for Contact
GET https://services.leadconnectorhq.com/contacts/{contactId}/appointments
Authorization
Path parameters
Responses
200 - Successful response
events (object[])
id (string): Example: YS3jaqqeehkR2Is80miy
calendarId (string): Example: YlWd2wuCAZQzh2cH1fVZ
status (string): Example: booked
title (string): Example: Test
assignedUserId (string): Example: YlWd2wuCAZQzh2cH1fVZ
notes (string): Example: test
startTime (string): Example: 2021-07-16 11:00:00
endTime (string): Example: 2021-07-16 11:30:00
address (string): Example: Address
locationId (string): Example: YlWd2wuCAZQzh2cH1fVZ
contactId (string): Example: YlWd2wuCAZQzh2cH1fVZ
groupId (string): Example: YlWd2wuCAZQzh2cH1fVZ
appointmentStatus (string): Example: booked
dateAdded (string): Example: 2021-07-16 11:00:00
dateUpdated (string): Example: 2021-07-16 11:30:00
assignedResources (string[])
{
"events": [
{
"id": "YS3jaqqeehkR2Is80miy",
"calendarId": "YlWd2wuCAZQzh2cH1fVZ",
"status": "booked",
"title": "Test",
"assignedUserId": "YlWd2wuCAZQzh2cH1fVZ",
"notes": "test",
"startTime": "2021-07-16 11:00:00",
"endTime": "2021-07-16 11:30:00",
"address": "Address",
"locationId": "YlWd2wuCAZQzh2cH1fVZ",
"contactId": "YlWd2wuCAZQzh2cH1fVZ",
"groupId": "YlWd2wuCAZQzh2cH1fVZ",
"appointmentStatus": "booked",
"users": [
"YlWd2wuCAZQzh2cH1fVZ",
"YlWd2wuCAZQzh2cH1fVZ"
],
"dateAdded": "2021-07-16 11:00:00",
"dateUpdated": "2021-07-16 11:30:00",
"assignedResources": [
"YlWd2wuCAZQzh2cH1fVZ",
"YlWd2wuCAZQzh2cH1fVZ"
]
}
]
}
400 - Bad Request
401 - Unauthorized
422 - Unprocessable Entity
Example
curl -X GET 'https://services.leadconnectorhq.com/contacts/YOUR_contactId/appointments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/contacts/YOUR_contactId/appointments', {
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/contacts/YOUR_contactId/appointments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/contacts/YOUR_contactId/appointments');
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);