PUT https://services.leadconnectorhq.com/calendars/{calendarId}
Autorización
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
string
default:"ocQHyuzHvysMo5N5VsXc"
required
Calendar Id
Body
object[]
string
default:"BqTwX8QFwXzpegMve9EQ"
Group Id
object[]
Team members are required for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.
Show cada item
Show cada item
string
default:"ocQHyuzHvysMo5N5VsXc"
required
number
Posibles valores: 0, 0.5, 1
string
default:"custom"
🚨 Deprecated! Use
locationConfigurations.kind instead. Posibles valores: ‘custom’, ‘zoom’, ‘gmeet’, ‘phone’, ‘address’, ‘teams’, ‘booker’string
🚨 Deprecated! Use
locationConfigurations.account instead.boolean
Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary.
object[]
Meeting account configuration for event calendar.
- Multiple accounts are allowed only when one team member is selected.
- For Class booking and Collective calendars, only one account configuration is allowed for each team member.
Show cada item
Show cada item
string
default:"custom"
required
Type of meeting account. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type Posibles valores: ‘custom’, ‘zoom_conference’, ‘google_conference’, ‘inbound_call’, ‘outbound_call’, ‘physical’, ‘booker’, ‘ms_teams_conference’
string
Address for meeting account. Not applicable on “zoom_conference”, “google_conference” and “ms_teams_conference” kind
string
Posibles valores: ‘RoundRobin_OptimizeForAvailability’, ‘RoundRobin_OptimizeForEqualDistribution’
string
default:"test calendar"
string
default:"this is used for testing"
string
default:"test1"
string
default:"test1"
string
default:"classic"
Calendar widget type. Choose “default” for “neo” and “classic” for “classic” layout. Posibles valores: ‘default’, ‘classic’
string
string
object[]
Meeting account configuration for event calendar
Show cada item
Show cada item
string
default:"custom"
required
Type of meeting account. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type Posibles valores: ‘custom’, ‘zoom_conference’, ‘google_conference’, ‘inbound_call’, ‘outbound_call’, ‘physical’, ‘booker’, ‘ms_teams_conference’
string
Address for meeting account. Not applicable on “zoom_conference”, “google_conference” and “ms_teams_conference” kind
string
🚨 Deprecated! Use
locationConfigurations.account or teamMembers[].locationConfigurations.account instead.number
This controls the duration of the meeting
string
Unit for slot duration. Posibles valores: ‘mins’, ‘hours’
string
Unit for pre-buffer. Posibles valores: ‘mins’, ‘hours’
number
Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.
string
Unit for slot interval. Posibles valores: ‘mins’, ‘hours’
number
Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up
number
Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready
number
number
Number of appointments that can be booked for a given day
number
Minimum scheduling notice for events
string
default:"days"
Unit for minimum scheduling notice Posibles valores: ‘hours’, ‘days’, ‘weeks’, ‘months’
number
Minimum number of days/weeks/months for which to allow booking events
string
default:"days"
Unit for controlling the duration for which booking would be allowed for Posibles valores: ‘days’, ‘weeks’, ‘months’
object[]
boolean
Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this
object
Show propiedades
Show propiedades
string
Posibles valores: ‘DAILY’, ‘WEEKLY’, ‘MONTHLY’
number
Number of recurrences
string
This setting contols what to do incase a recurring slot is unavailable Posibles valores: ‘skip’, ‘continue’, ‘book_next’
string
This setting contols what to do incase a recurring slot is unavailable Posibles valores: ‘confirmed’, ‘new’
string
boolean
boolean
boolean
boolean
string
boolean
boolean
boolean
boolean
boolean
string
string
string
Posibles valores: ‘RedirectURL’, ‘ThankYouMessage’
string
string
number
Determines which availability type to consider:
- 1: Only custom availabilities will be used.
- 0: Only open hours will be used.
- null: Both the custom availabilities and open hours will be considered. Posibles valores: 0, 1
object[]
This is only to set the custom availability. For standard availability, use the openHours property
Show cada item
Show cada item
string
default:"2023-09-24T00:00:00.000Z"
required
Formulate the date string in the format of
<YYYY-MM-DD in local timezone>T00:00:00.000Z.boolean
string
The ID of the custom availability object. It is required while updating or deleting the existing custom date availability
string
Posibles valores: ‘count_only’, ‘collect_detail’
string
string
object
Look Busy Configuration
boolean
Respuestas
200 - Successful response
200 - Successful response
object
required
Show propiedades
Show propiedades
boolean
Should the created calendar be active or draft
object[]
string
default:"ocQHyuzHvysMo5N5VsXc"
required
string
default:"BqTwX8QFwXzpegMve9EQ"
Group Id
object[]
Team members are for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.
Show cada item
Show cada item
string
default:"ocQHyuzHvysMo5N5VsXc"
required
number
Posibles valores: 0, 0.5, 1
string
default:"custom"
🚨 Deprecated! Use
locationConfigurations.kind instead. Posibles valores: ‘custom’, ‘zoom’, ‘gmeet’, ‘phone’, ‘address’, ‘teams’, ‘booker’string
🚨 Deprecated! Use
locationConfigurations.account instead.boolean
Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary.
object[]
Meeting account configurations
Show cada item
Show cada item
string
default:"custom"
required
Type of meeting account. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type Posibles valores: ‘custom’, ‘zoom_conference’, ‘google_conference’, ‘inbound_call’, ‘outbound_call’, ‘physical’, ‘booker’, ‘ms_teams_conference’
string
Address for meeting account. Not applicable on “zoom_conference”, “google_conference” and “ms_teams_conference” kind
string
default:"my_conference_id"
Unique ID used to select a specific meeting account
string
Posibles valores: ‘RoundRobin_OptimizeForAvailability’, ‘RoundRobin_OptimizeForEqualDistribution’
string
default:"test calendar"
required
string
default:"this is used for testing"
string
default:"test1"
string
default:"test1"
string
Posibles valores: ‘round_robin’, ‘event’, ‘class_booking’, ‘collective’, ‘service_booking’, ‘personal’
string
default:"classic"
Calendar widget type. Choose “default” for “neo” and “classic” for “classic” layout. Posibles valores: ‘default’, ‘classic’
string
string
string
🚨 Deprecated! Use
locationConfigurations.account or teamMembers[].locationConfigurations.account instead.object[]
Meeting account configuration for event calendar
Show cada item
Show cada item
string
default:"custom"
required
Type of meeting account. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type Posibles valores: ‘custom’, ‘zoom_conference’, ‘google_conference’, ‘inbound_call’, ‘outbound_call’, ‘physical’, ‘booker’, ‘ms_teams_conference’
string
Address for meeting account. Not applicable on “zoom_conference”, “google_conference” and “ms_teams_conference” kind
string
default:"my_conference_id"
Unique ID used to select a specific meeting account
number
This controls the duration of the meeting
string
Unit for slot duration. Posibles valores: ‘mins’, ‘hours’
number
Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.
string
Unit for slot interval. Posibles valores: ‘mins’, ‘hours’
number
Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up
string
Unit for slot buffer. Posibles valores: ‘mins’, ‘hours’
number
Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready
string
Unit for pre-buffer. Posibles valores: ‘mins’, ‘hours’
number
Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar.
number
Number of appointments that can be booked for a given day
number
Minimum scheduling notice for events
string
default:"days"
Unit for minimum scheduling notice Posibles valores: ‘hours’, ‘days’, ‘weeks’, ‘months’
number
Minimum number of days/weeks/months for which to allow booking events
string
default:"days"
Unit for controlling the duration for which booking would be allowed for Posibles valores: ‘days’, ‘weeks’, ‘months’
object[]
boolean
Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this
object
Show propiedades
Show propiedades
string
Posibles valores: ‘DAILY’, ‘WEEKLY’, ‘MONTHLY’
number
Number of recurrences
string
This setting contols what to do incase a recurring slot is unavailable Posibles valores: ‘skip’, ‘continue’, ‘book_next’
string
This setting contols what to do incase a recurring slot is unavailable Posibles valores: ‘confirmed’, ‘new’
string
boolean
boolean
boolean
boolean
string
boolean
boolean
boolean
boolean
boolean
string
string
string
Posibles valores: ‘RedirectURL’, ‘ThankYouMessage’
string
string
number
Determines which availability type to consider:
- 1: Only custom availabilities will be used.
- 0: Only open hours will be used.
- null: Both custom availabilities and open hours will be considered. Posibles valores: 0, 1
object[]
This is only to set the custom availability. For standard availability, use the openHours property
string
Posibles valores: ‘count_only’, ‘collect_detail’
string
string
default:"https://path-to-image.com"
object
Look Busy Configuration
string
default:"0TkCdp9PfvLeWKYRRvIz"
required
{
"calendar": {
"isActive": true,
"notifications": [
{
"type": "email",
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com"
}
],
"locationId": "ocQHyuzHvysMo5N5VsXc",
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"meetingLocationType": "custom",
"meetingLocation": "string",
"isPrimary": true,
"locationConfigurations": []
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"name": "test calendar",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"calendarType": "round_robin",
"widgetType": "classic",
"eventTitle": "{{contact.name}}",
"eventColor": "#039be5",
"meetingLocation": "string",
"locationConfigurations": [
{
"kind": "custom",
"location": "string",
// truncado: 60 lineas mas
}
400 - Bad Request
400 - Bad Request
{}
401 - Unauthorized
401 - Unauthorized
{}
Ejemplo
curl -X PUT 'https://services.leadconnectorhq.com/calendars/YOUR_calendarId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"notifications": [
{
"type": "email",
"shouldSendToContact": true,
"shouldSendToGuest": true,
"shouldSendToUser": true,
"shouldSendToSelectedUsers": true,
"selectedUsers": "user1@testemail.com,user2@testemail.com"
}
],
"groupId": "BqTwX8QFwXzpegMve9EQ",
"teamMembers": [
{
"userId": "ocQHyuzHvysMo5N5VsXc",
"priority": 0.5,
"meetingLocationType": "custom",
"meetingLocation": "string",
"isPrimary": true,
"locationConfigurations": [
{}
]
}
],
"eventType": "RoundRobin_OptimizeForAvailability",
"name": "test calendar",
"description": "this is used for testing",
"slug": "test1",
"widgetSlug": "test1",
"widgetType": "classic",
"eventTitle": "string",
"eventColor": "#039be5",
"locationConfigurations": [
{
"kind": "custom",
"location": "string"
}
],
"meetingLocation": "string",
"slotDuration": 30,
"slotDurationUnit": "mins",
"preBufferUnit": "mins",
"slotInterval": 30,
"slotIntervalUnit": "mins",
"slotBuffer": 0,
"preBuffer": 0,
"appoinmentPerSlot": 0,
"appoinmentPerDay": 0,
"allowBookingAfter": 0,
"allowBookingAfterUnit": "days",
"allowBookingFor": 0,
"allowBookingForUnit": "days",
"openHours": [
{
"daysOfTheWeek": [
0
],
"hours": [
{}
]
}
],
"enableRecurring": false,
"recurring": {
"freq": "DAILY",
"count": 0,
"bookingOption": "skip",
"bookingOverlapDefaultStatus": "confirmed"
},
"formId": "string",
"stickyContact": true,
"isLivePaymentMode": true,
"autoConfirm": true,
"shouldSendAlertEmailsToAssignedMember": true,
"alertEmail": "string",
"googleInvitationEmails": true,
"allowReschedule": true,
"allowCancellation": true,
"shouldAssignContactToTeamMember": true,
"shouldSkipAssigningContactForExisting": true,
"notes": "string",
"pixelId": "string",
"formSubmitType": "ThankYouMessage",
"formSubmitRedirectURL": "string",
"formSubmitThanksMessage": "string",
"availabilityType": 0,
"availabilities": [
{
"date": "2023-09-24T00:00:00.000Z",
"hours": [
{}
],
"deleted": false,
"id": "string"
}
],
"guestType": "count_only",
"consentLabel": "string",
"calendarCoverImage": "string",
"isActive": true
}'
const response = await fetch('https://services.leadconnectorhq.com/calendars/YOUR_calendarId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"notifications": [{"type": "email", "shouldSendToContact": true, "shouldSendToGuest": true, "shouldSendToUser": true, "shouldSendToSelectedUsers": true, "selectedUsers": "user1@testemail.com,user2@testemail.com"}], "groupId": "BqTwX8QFwXzpegMve9EQ", "teamMembers": [{"userId": "ocQHyuzHvysMo5N5VsXc", "priority": 0.5, "meetingLocationType": "custom", "meetingLocation": "string", "isPrimary": true, "locationConfigurations": [{}]}], "eventType": "RoundRobin_OptimizeForAvailability", "name": "test calendar", "description": "this is used for testing", "slug": "test1", "widgetSlug": "test1", "widgetType": "classic", "eventTitle": "string", "eventColor": "#039be5", "locationConfigurations": [{"kind": "custom", "location": "string"}], "meetingLocation": "string", "slotDuration": 30, "slotDurationUnit": "mins", "preBufferUnit": "mins", "slotInterval": 30, "slotIntervalUnit": "mins", "slotBuffer": 0, "preBuffer": 0, "appoinmentPerSlot": 0, "appoinmentPerDay": 0, "allowBookingAfter": 0, "allowBookingAfterUnit": "days", "allowBookingFor": 0, "allowBookingForUnit": "days", "openHours": [{"daysOfTheWeek": [0], "hours": [{}]}], "enableRecurring": false, "recurring": {"freq": "DAILY", "count": 0, "bookingOption": "skip", "bookingOverlapDefaultStatus": "confirmed"}, "formId": "string", "stickyContact": true, "isLivePaymentMode": true, "autoConfirm": true, "shouldSendAlertEmailsToAssignedMember": true, "alertEmail": "string", "googleInvitationEmails": true, "allowReschedule": true, "allowCancellation": true, "shouldAssignContactToTeamMember": true, "shouldSkipAssigningContactForExisting": true, "notes": "string", "pixelId": "string", "formSubmitType": "ThankYouMessage", "formSubmitRedirectURL": "string", "formSubmitThanksMessage": "string", "availabilityType": 0, "availabilities": [{"date": "2023-09-24T00:00:00.000Z", "hours": [{}], "deleted": false, "id": "string"}], "guestType": "count_only", "consentLabel": "string", "calendarCoverImage": "string", "isActive": true}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/calendars/YOUR_calendarId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"notifications": [{"type": "email", "shouldSendToContact": true, "shouldSendToGuest": true, "shouldSendToUser": true, "shouldSendToSelectedUsers": true, "selectedUsers": "user1@testemail.com,user2@testemail.com"}], "groupId": "BqTwX8QFwXzpegMve9EQ", "teamMembers": [{"userId": "ocQHyuzHvysMo5N5VsXc", "priority": 0.5, "meetingLocationType": "custom", "meetingLocation": "string", "isPrimary": true, "locationConfigurations": [{}]}], "eventType": "RoundRobin_OptimizeForAvailability", "name": "test calendar", "description": "this is used for testing", "slug": "test1", "widgetSlug": "test1", "widgetType": "classic", "eventTitle": "string", "eventColor": "#039be5", "locationConfigurations": [{"kind": "custom", "location": "string"}], "meetingLocation": "string", "slotDuration": 30, "slotDurationUnit": "mins", "preBufferUnit": "mins", "slotInterval": 30, "slotIntervalUnit": "mins", "slotBuffer": 0, "preBuffer": 0, "appoinmentPerSlot": 0, "appoinmentPerDay": 0, "allowBookingAfter": 0, "allowBookingAfterUnit": "days", "allowBookingFor": 0, "allowBookingForUnit": "days", "openHours": [{"daysOfTheWeek": [0], "hours": [{}]}], "enableRecurring": false, "recurring": {"freq": "DAILY", "count": 0, "bookingOption": "skip", "bookingOverlapDefaultStatus": "confirmed"}, "formId": "string", "stickyContact": true, "isLivePaymentMode": true, "autoConfirm": true, "shouldSendAlertEmailsToAssignedMember": true, "alertEmail": "string", "googleInvitationEmails": true, "allowReschedule": true, "allowCancellation": true, "shouldAssignContactToTeamMember": true, "shouldSkipAssigningContactForExisting": true, "notes": "string", "pixelId": "string", "formSubmitType": "ThankYouMessage", "formSubmitRedirectURL": "string", "formSubmitThanksMessage": "string", "availabilityType": 0, "availabilities": [{"date": "2023-09-24T00:00:00.000Z", "hours": [{}], "deleted": false, "id": "string"}], "guestType": "count_only", "consentLabel": "string", "calendarCoverImage": "string", "isActive": true},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/YOUR_calendarId');
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({'notifications': [{'type': 'email', 'shouldSendToContact': true, 'shouldSendToGuest': true, 'shouldSendToUser': true, 'shouldSendToSelectedUsers': true, 'selectedUsers': 'user1@testemail.com,user2@testemail.com'}], 'groupId': 'BqTwX8QFwXzpegMve9EQ', 'teamMembers': [{'userId': 'ocQHyuzHvysMo5N5VsXc', 'priority': 0.5, 'meetingLocationType': 'custom', 'meetingLocation': 'string', 'isPrimary': true, 'locationConfigurations': [{}]}], 'eventType': 'RoundRobin_OptimizeForAvailability', 'name': 'test calendar', 'description': 'this is used for testing', 'slug': 'test1', 'widgetSlug': 'test1', 'widgetType': 'classic', 'eventTitle': 'string', 'eventColor': '#039be5', 'locationConfigurations': [{'kind': 'custom', 'location': 'string'}], 'meetingLocation': 'string', 'slotDuration': 30, 'slotDurationUnit': 'mins', 'preBufferUnit': 'mins', 'slotInterval': 30, 'slotIntervalUnit': 'mins', 'slotBuffer': 0, 'preBuffer': 0, 'appoinmentPerSlot': 0, 'appoinmentPerDay': 0, 'allowBookingAfter': 0, 'allowBookingAfterUnit': 'days', 'allowBookingFor': 0, 'allowBookingForUnit': 'days', 'openHours': [{'daysOfTheWeek': [0], 'hours': [{}]}], 'enableRecurring': false, 'recurring': {'freq': 'DAILY', 'count': 0, 'bookingOption': 'skip', 'bookingOverlapDefaultStatus': 'confirmed'}, 'formId': 'string', 'stickyContact': true, 'isLivePaymentMode': true, 'autoConfirm': true, 'shouldSendAlertEmailsToAssignedMember': true, 'alertEmail': 'string', 'googleInvitationEmails': true, 'allowReschedule': true, 'allowCancellation': true, 'shouldAssignContactToTeamMember': true, 'shouldSkipAssigningContactForExisting': true, 'notes': 'string', 'pixelId': 'string', 'formSubmitType': 'ThankYouMessage', 'formSubmitRedirectURL': 'string', 'formSubmitThanksMessage': 'string', 'availabilityType': 0, 'availabilities': [{'date': '2023-09-24T00:00:00.000Z', 'hours': [{}], 'deleted': false, 'id': 'string'}], 'guestType': 'count_only', 'consentLabel': 'string', 'calendarCoverImage': 'string', 'isActive': true}),
]);
$data = json_decode(curl_exec($ch), true);

