Skip to main content
Update block slot by ID
PUT https://services.leadconnectorhq.com/calendars/events/block-slots/{eventId}

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.

Path parameters

eventId
string
required
Event Id or Instance id. For recurring appointments send masterEventId to modify original series.

Body

title
string
default:"Test Event"
Title
calendarId
string
default:"CVokAlI8fgw4WYWoCtQz"
required
Either calendarId or assignedUserId can be set, not both.
assignedUserId
string
default:"CVokAlI8fgw4WYWoCtQz"
Either calendarId or assignedUserId can be set, not both.
locationId
string
default:"C2QujeCh8ZnC7al2InWR"
required
Account Id
startTime
string
default:"2021-06-23T03:30:00+05:30"
Start Time
endTime
string
default:"2021-06-23T04:30:00+05:30"
End Time

Respuestas

id
string
default:"0TkCdp9PfvLeWKYRRvIz"
required
Id
locationId
string
default:"C2QujeCh8ZnC7al2InWR"
required
Account Id
title
string
default:"My event"
required
Title
startTime
object
default:"2021-06-23T03:30:00+05:30"
required
Start Time
endTime
object
default:"2021-06-23T04:30:00+05:30"
required
End Time
calendarId
string
default:"CVokAlI8fgw4WYWoCtQz"
Calendar id
assignedUserId
string
default:"0007BWpSzSwfiuSl0tR2"
Assigned User Id
{
  "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"
}
{}
{}

Ejemplo

curl -X PUT 'https://services.leadconnectorhq.com/calendars/events/block-slots/YOUR_eventId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "Test Event",
  "calendarId": "CVokAlI8fgw4WYWoCtQz",
  "assignedUserId": "CVokAlI8fgw4WYWoCtQz",
  "locationId": "C2QujeCh8ZnC7al2InWR",
  "startTime": "2021-06-23T03:30:00+05:30",
  "endTime": "2021-06-23T04:30:00+05:30"
}'
const response = await fetch('https://services.leadconnectorhq.com/calendars/events/block-slots/YOUR_eventId', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"title": "Test Event", "calendarId": "CVokAlI8fgw4WYWoCtQz", "assignedUserId": "CVokAlI8fgw4WYWoCtQz", "locationId": "C2QujeCh8ZnC7al2InWR", "startTime": "2021-06-23T03:30:00+05:30", "endTime": "2021-06-23T04:30:00+05:30"}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'PUT',
    'https://services.leadconnectorhq.com/calendars/events/block-slots/YOUR_eventId',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"title": "Test Event", "calendarId": "CVokAlI8fgw4WYWoCtQz", "assignedUserId": "CVokAlI8fgw4WYWoCtQz", "locationId": "C2QujeCh8ZnC7al2InWR", "startTime": "2021-06-23T03:30:00+05:30", "endTime": "2021-06-23T04:30:00+05:30"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/events/block-slots/YOUR_eventId');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode({'title': 'Test Event', 'calendarId': 'CVokAlI8fgw4WYWoCtQz', 'assignedUserId': 'CVokAlI8fgw4WYWoCtQz', 'locationId': 'C2QujeCh8ZnC7al2InWR', 'startTime': '2021-06-23T03:30:00+05:30', 'endTime': '2021-06-23T04:30:00+05:30'}),
]);
$data = json_decode(curl_exec($ch), true);