Update Block Slot
Update block slot by ID
curl --request PUT \
--url https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "Test Event",
"assignedUserId": "CVokAlI8fgw4WYWoCtQz",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30"
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
calendarId: 'CVokAlI8fgw4WYWoCtQz',
locationId: 'C2QujeCh8ZnC7al2InWR',
title: 'Test Event',
assignedUserId: 'CVokAlI8fgw4WYWoCtQz',
startTime: '2021-06-23T03:30:00+05:30',
endTime: '2021-06-23T04:30:00+05:30'
})
};
fetch('https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId}"
payload = {
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "Test Event",
"assignedUserId": "CVokAlI8fgw4WYWoCtQz",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "0TkCdp9PfvLeWKYRRvIz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "My event",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30",
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"assignedUserId": "0007BWpSzSwfiuSl0tR2"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}Authorizations
Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
Headers
API Version
2021-04-15 Path Parameters
Event Id or Instance id. For recurring appointments send masterEventId to modify original series.
Body
Either calendarId or assignedUserId can be set, not both.
"CVokAlI8fgw4WYWoCtQz"
Location Id
"C2QujeCh8ZnC7al2InWR"
Title
"Test Event"
Either calendarId or assignedUserId can be set, not both.
"CVokAlI8fgw4WYWoCtQz"
Start Time
"2021-06-23T03:30:00+05:30"
End Time
"2021-06-23T04:30:00+05:30"
Response
Successful response
Id
"0TkCdp9PfvLeWKYRRvIz"
Location Id
"C2QujeCh8ZnC7al2InWR"
Title
"My event"
Start Time
"2021-06-23T03:30:00+05:30"
End Time
"2021-06-23T04:30:00+05:30"
Calendar id
"CVokAlI8fgw4WYWoCtQz"
Assigned User Id
"0007BWpSzSwfiuSl0tR2"
Was this page helpful?
curl --request PUT \
--url https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "Test Event",
"assignedUserId": "CVokAlI8fgw4WYWoCtQz",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30"
}
'const options = {
method: 'PUT',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
calendarId: 'CVokAlI8fgw4WYWoCtQz',
locationId: 'C2QujeCh8ZnC7al2InWR',
title: 'Test Event',
assignedUserId: 'CVokAlI8fgw4WYWoCtQz',
startTime: '2021-06-23T03:30:00+05:30',
endTime: '2021-06-23T04:30:00+05:30'
})
};
fetch('https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId}"
payload = {
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "Test Event",
"assignedUserId": "CVokAlI8fgw4WYWoCtQz",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "0TkCdp9PfvLeWKYRRvIz",
"locationId": "C2QujeCh8ZnC7al2InWR",
"title": "My event",
"startTime": "2021-06-23T03:30:00+05:30",
"endTime": "2021-06-23T04:30:00+05:30",
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"assignedUserId": "0007BWpSzSwfiuSl0tR2"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}