@gnosticdev/highlevel-sdk
Version:
SDK for the HighLevel API
784 lines (783 loc) • 390 kB
text/typescript
import * as openapi_fetch from 'openapi-fetch';
import { ClientOptions } from 'openapi-fetch';
type paths = {
'/v1/appointments/': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* /v1/appointments/
* @description <h4>Get all booked events.</h4> <p>Required fields in the query</p><table><thead><tr><th>Fields</th><th>Types</th><th>Example</th></tr></thead><tbody><tr><td>startDate</td><td>integer</td><td>epoch timestamp. for ex: <code>1548898600000</code></td></tr><tr><td>endDate</td><td>integer</td><td>epoch timestamp. for ex: <code>1601490599999</code></td></tr><tr><td>userId(or calendarId or teamId)</td><td>string</td><td>082goXVW3lIExEQPOnd3</td></tr><tr><td>calendarId(or userId or teamId)</td><td>string</td><td>0nU7uKSrtT2RVM1KknuF</td></tr><tr><td>teamId(or userId or calendarId)</td><td>string</td><td>O4qa8K1M6xA4oPXu1b8O</td></tr></tbody></table><p>Allowed field in the query</p><table><thead><tr><th>Fields</th><th>Types</th><th>Example</th></tr></thead><tbody><tr><td>includeAll</td><td>boolean</td><td>Include contact and more data. for ex: <code>true</code></td></tr></tbody></table> <br /> <strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
get: {
parameters: {
query?: {
/**
* @description Calendar Id
* @example 0nU7uKSrtT2RVM1KknuF
*/
calendarId?: string;
/**
* @description (Required) epoch timestamp
* @example 1601490599999
*/
endDate?: number;
/**
* @description Include contact and more data.
* @example true
*/
includeAll?: boolean;
/**
* @description (Required) epoch timestamp
* @example 1548898600000
*/
startDate?: number;
/**
* @description Team Id
* @example O4qa8K1M6xA4oPXu1b8O
*/
teamId?: string;
/**
* @description User Id
* @example 082goXVW3lIExEQPOnd3
*/
userId?: string;
};
header?: {
/** @description Access Token */
Authorization?: string;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__get_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__get_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__get_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__get_422_response'];
};
};
};
};
put?: never;
/**
* /v1/appointments/
* @description <h4>Booking Appoinment.</h4><p>HL Appointments API provides several different ways the endpoints can be leveraged, You can examine its application depending on any of the following use cases:</p><p><strong>Use case #1</strong>: Schedule Appointments</p><p>This predominantly focuses on consumer facing online booking applications. To be able to use it effectively, consider the following parameters during your set-up.</p><p>Required JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th></thead><tbody><tr><td>email(or phone)</td><td>string</td><td>johndeo@gmail.com</td></tr><tr><td>phone(or email)</td><td>string</td><td>+1 888-888-8888</td></tr><tr><td>selectedSlot</td><td>datetime</td><td>2021-02-05T11:00:00+05:30</td></tr><tr><td>selectedTimezone</td><td>string</td><td>Asia/Calcutta</td></tr><tr><td>calendarId</td><td>string</td><td>J37gEVtdFMRYVQWPdXIc</td></tr></tbody></table><p>Allowed JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th></thead><tbody><tr><td>firstName</td><td>string</td><td>John</td></tr><tr><td>lastName</td><td>string</td><td>Deo</td></tr><tr><td>name</td><td>string</td><td>John Deo</td></tr><tr><td>title</td><td>string</td><td>Best Event</td></tr><tr><td>address1</td><td>long</td><td>Tonkawa Trail W</td></tr><tr><td>city</td><td>string</td><td>Austin</td></tr><tr><td>state</td><td>string</td><td>Texas</td></tr><tr><td>website</td><td>string(url)</td><td>https://www.google.com</td></tr><tr><td>__custome_field_id__</td><td>string/array</td><td>Test</td></tr><tr><td>calendarNotes</td><td>long</td><td>Booked from public api</td></tr></tbody></table><p><strong>Use case #2</strong>: Block Off Time (Event Blocks)</p><p>This focuses specifically on actions surrounding internal applications such as posting a custom event block availability within your own application. While its application covers a range of different scenarios, you can use the following parameters during your set-up.</p><p>Required JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th></thead><tbody><tr><td>selectedSlot</td><td>datetime</td><td>2021-02-10T10:00:00Z</td></tr><tr><td>endAt</td><td>datetime</td><td>2021-02-12T10:00:00Z</td></tr><tr><td>calendarId/userId</td><td>string</td><td>J37gEVtdFMRYVQWPdXIc</td></tr></tbody></table><p>Allowed JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th></thead><tbody><tr><td>title</td><td>string</td><td>Blocking Event</td></tr></tbody></table> <br /> <strong>Authorization:</strong><p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
post: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
/** @example application/json */
'Content-Type'?: string;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
'application/json': components['schemas']['_v1_appointments__post_request'];
};
};
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__post_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__post_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__post_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments__post_422_response'];
};
};
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/appointments/{appointmentId}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* /v1/appointments/:appointmentId
* @description <h4>Get appointment by id.</h4><br /><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
get: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
};
path: {
/**
* @description (Required) Appointment Id
* @example 004B1SpcAvh3s9E3rqk8
*/
appointmentId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_get_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_get_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_get_401_response'];
};
};
};
};
/**
* /v1/appointments/:appointmentId
* @description <h4>Update exisiting appoinment.</h4><br /><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
put: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
/** @example application/json */
'Content-Type'?: string;
};
path: {
/**
* @description (Required) Appointment Id
* @example 004B1SpcAvh3s9E3rqk8
*/
appointmentId: string;
};
cookie?: never;
};
requestBody?: {
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_put_request'];
};
};
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_put_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_put_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_put_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_put_422_response'];
};
};
};
};
post?: never;
/**
* /v1/appointments/:appointmentId
* @description <h4>Delete exisiting appoinment.</h4><br /><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
delete: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
};
path: {
/**
* @description (Required) Appointment Id
* @example 004B1SpcAvh3s9E3rqk8
*/
appointmentId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': Record<string, unknown>;
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_delete_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_delete_401_response'];
};
};
};
};
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/appointments/{appointmentId}/status': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
/**
* /v1/appointments/:appointmentId/status
* @description <h4>Update exisiting appoinment status.</h4><p>Required JSON fields in the body</p><table><thead><tr><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th></tr></thead><tbody><tr><td>status</td><td>string</td><td>confirmed</td><td><ul><li>confirmed</li><li>cancelled</li><li>showed</li><li>noshow</li><li>invalid</li></ul></td></tr></tbody></table><br /><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
put: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
/** @example application/json */
'Content-Type'?: string;
};
path: {
/**
* @description (Required) Appointment Id
* @example 004B1SpcAvh3s9E3rqk8
*/
appointmentId: string;
};
cookie?: never;
};
requestBody?: {
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_status_put_request'];
};
};
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'text/plain': string;
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_status_put_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_status_put_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_{appointmentId}_status_put_422_response'];
};
};
};
};
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/appointments/slots': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* /v1/appointments/slots
* @description <h4>Get free slots.</h4><p>Required fields in the query</p><table><thead><tr><th>Fields</th><th>Types</th><th>Example</th></tr></thead><tbody><tr><td>calendarId</td><td>string</td><td>CVokAlI8fgw4WYWoCtQz</td></tr><tr><td>startDate</td><td>integer</td><td>epoch timestamp. for ex: <code>1548898600000</code></td></tr><tr><td>endDate</td><td>integer</td><td>epoch timestamp. for ex: <code>1601490599999</code></td></tr></tbody></table><p>Allowed field in the query</p><table><thead><tr><th>Fields</th><th>Types</th><th>Example</th></tr></thead><tbody><tr><td>userId</td><td>string</td><td>082goXVW3lIExEQPOnd3</td></tr><tr><td>timezone</td><td>string</td><td>America/Chihuahua</td></tr></tbody></table> <br /> <strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
get: {
parameters: {
query?: {
/**
* @description (Required) Calendar Id
* @example CVokAlI8fgw4WYWoCtQz
*/
calendarId?: string;
/**
* @description (Required) epoch timestamp
* @example 1601490599999
*/
endDate?: number;
/**
* @description (Required) epoch timestamp
* @example 1598898600000
*/
startDate?: number;
/**
* @description Timezone
* @example America/Chihuahua
*/
timezone?: string;
/**
* @description User Id
* @example 082goXVW3lIExEQPOnd3
*/
userId?: string;
};
header?: {
/** @description Access Token */
Authorization?: string;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_slots_get_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_slots_get_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_slots_get_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_appointments_slots_get_422_response'];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/calendars/check-slug-availability/{slug}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* /v1/calendars/check-slug-availability/:slug
* @description <h4>Check Calendar (Provider) slug availability.</h4><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
get: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
};
path: {
/**
* @description (Required) Slug
* @example xyz
*/
slug: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_check-slug-availability_{slug}_get_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_check-slug-availability_{slug}_get_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_check-slug-availability_{slug}_get_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_check-slug-availability_{slug}_get_422_response'];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/calendars/services': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* /v1/calendars/services
* @description <h4>Get all calendar services.</h4> <strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
get: {
parameters: {
query?: {
/**
* @description Filter service by team id.
* @example ABXdTR0kegkPcTvtdr1L
*/
teamId?: string;
};
header?: {
/** @description Access Token */
Authorization?: string;
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services_get_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services_get_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services_get_401_response'];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/calendars/services/': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* /v1/calendars/services/
* @description <h4>Create a service</h4> <p>Required JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Option?</th></thead><tbody><tr><td>teamId</td><td>string</td><td>O4qa8K1M6xA4oPXu1b8O</td><td></td></tr><tr><td>name</td><td>string</td><td>Awsome Service</td><td></td></tr><tr><td>description</td><td>string</td><td>Awsome description</td><td></td></tr><tr><td>eventType</td><td>string</td><td>RoundRobin_OptimizeForAvailability</td><td><ul><li>RoundRobin_OptimizeForAvailability</li><li>RoundRobin_OptimizeForEqualDistribution</li></ul></td></tr><tr><td>teamMembers</td><td>obbject</td><td>See field info on the <code>teamMembers</code> table</td><td></td></tr><tr><td>slug</td><td>string</td><td>awsome-service</td><td></td></tr><tr><td>appointmentTitle</td><td>string</td><td><code>{{contact.name}}</code></td><td></td></tr><tr><td>eventColor</td><td>string</td><td>Tomato</td><td><ul><li>Banana</li><li>Basil</li><li>Blueberry</li><li>Flamingo</li><li>Grape</li><li>Graphite</li><li>Lavender</li><li>Peacock</li><li>Sage</li><li>Tangerine</li><li>Tomato</li></ul></td></tr><tr><td>availability</td><td>object</td><td>See field info on <code>availability</code> table.</td><td></td></tr><tr><td>confirmation</td><td>object</td><td>See field info on <code>confirmation</code> table.</td><td></td></tr></tbody></table><p>Allowed JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Option</th></thead><tbody><tr><td>isActive</td><td>boolean</td><td><code>true</code></td><td></td></tr><tr><td>syncOption</td><td>string</td><td>oneway</td><td><ul><li>oneway</li><li>twoway</li></ul></td></tr><tr><td>slug</td><td>string</td><td>first-calendar</td></tr></tbody></table><p>Allowed JSON fields in the <code>teamMembers</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>userId</td><td>string</td><td>GCs5KuzPqTls7vWclkEV</td><td></td><td>Yes</td></tr><tr><td>priority</td><td>string</td><td>High</td><td><ul><li>High</li><li>Medium</li><li>Low</li></ul></td><td>Yes</td></tr><tr><td>selected</td><td>boolean</td><td>true</td><td></td><td>Yes</td></tr><tr><td>meetingLocation</td><td>string</td><td>https://zoom.us/j/XXXXXXXXXX</td><td></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>eventTiming</td><td>object</td><td>See field info on <code>availability.eventTiming</code> table.</td><td>Yes</td></tr><tr><td>officeHours</td><td>object</td><td>See field info on <code>availability.officeHours</code> table.</td><td>Yes</td></tr><tr><td>appointmentInfo</td><td>object</td><td>See field info on <code>availability.appointmentInfo</code> table.</td><td>No</td></tr><tr><td>schedule</td><td>object</td><td>See field info on <code>availability.schedule</code> table.</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.eventTiming</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>slotDuration</td><td>number</td><td>30</td><td><ul><li>10</li><li>15</li><li>20</li><li>30</li><li>45</li><li>60</li><li>90</li><li>120</li><li>180</li><li>240</li><li>300</li><li>360</li><li>420</li><li>480</li></ul></td><td>Yes</td></tr><tr><td>slotInterval</td><td>number</td><td>30</td><td><ul><li>10</li><li>15</li><li>20</li><li>30</li><li>45</li><li>60</li><li>90</li><li>120</li><li>180</li><li>240</li><li>300</li><li>360</li><li>420</li><li>480</li></ul></td><td>Yes</td></tr><tr><td>slotBuffer</td><td>number</td><td>1</td><td></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.appointmentInfo</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>perSlot</td><td>number</td><td>1</td><td>No</td></tr><tr><td>perDay</td><td>number</td><td>5</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.schedule</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>allowBookingAfter</td><td>number</td><td>1</td><td></td><td>No</td></tr><tr><td>allowBookingAfterUnit</td><td>string</td><td>days</td><td><ul><li>hours</li><li>days</li><li>weeks</li><li>months</li></ul></td><td>No</td></tr><tr><td>allowBookingFor</td><td>number</td><td>5</td><td>No</td></tr><tr><td>allowBookingForUnit</td><td>string</td><td>days</td><td><ul><li>hours</li><li>days</li><li>weeks</li><li>months</li></ul></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.officeHours</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>monday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>tuesday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>wednesday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>thursday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>friday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.officeHours.days</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>openMinute</td><td>number</td><td>0</td><td>Yes</td></tr><tr><td>openHour</td><td>number</td><td>8</td><td>Yes</td></tr><tr><td>closeMinute</td><td>number</td><td>0</td><td>Yes</td></tr><tr><td>closeHour</td><td>number</td><td>17</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>form</td><td>object</td><td>See field info on <code>confirmation.form</code> table.</td><td>No</td></tr><tr><td>notificationAndOther</td><td>object</td><td>See field info on <code>confirmation.notificationAndOther</code> table.</td><td>Yes</td></tr><tr><td>formSubmission</td><td>object</td><td>See field info on <code>confirmation.formSubmission</code> table.</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation.form</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>customFormId</td><td>string</td><td>jjusM6EOngDExnbo2DbU</td><td>No</td></tr><tr><td>stickyContact</td><td>boolean</td><td>false</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation.notificationAndOther</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>autoConfirm</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>shouldSendAlertEmailsToAssignedMember</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>googleInvitationEmails</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>allowReschedule</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>allowCancellation</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>alertEmail</td><td>string</td><td>john@deo.com</td><td>No</td></tr><tr><td>notes</td><td>string</td><td>Awesome Notes</td><td>No</td></tr><tr><td>facebookPixelId</td><td>string</td><td>XXXXXXXXXX</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation.formSubmission</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>type</td><td>string</td><td>ThankYouMessage</td><td><ul><li>ThankYouMessage</li><li>RedirectURL</li></ul></td><td>Yes</td></tr><tr><td>content</td><td>string</td><td>Thank you for your appointment request.</td><td></td><td>Yes</td></tr></tbody></table><br /><strong>Authorization:</strong> <p>Provide your location api key (Bearer Token). <a href="https://help.gohighlevel.com/support/solutions/articles/48000982605-company-settings" target="_blank">You can find here</a></p>
*/
post: {
parameters: {
query?: never;
header?: {
/** @description Access Token */
Authorization?: string;
/** @example application/json */
'Content-Type'?: string;
};
path?: never;
cookie?: never;
};
requestBody?: {
content: {
'application/json': components['schemas']['_v1_calendars_services__post_request'];
};
};
responses: {
/** @description OK */
200: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services__post_200_response'];
};
};
/** @description Bad Request */
400: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services__post_400_response'];
};
};
/** @description Unauthorized */
401: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services__post_401_response'];
};
};
/** @description Unprocessable Entity (WebDAV) (RFC 4918) */
422: {
headers: {
'Content-Type'?: string;
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['_v1_calendars_services__post_422_response'];
};
};
};
};
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/v1/calendars/services/{serviceId}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
/**
* /v1/calendars/services/:serviceId
* @description <h4>Update existing service</h4> <p>Required JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Option?</th></thead><tbody><tr><td>teamId</td><td>string</td><td>O4qa8K1M6xA4oPXu1b8O</td><td></td></tr><tr><td>name</td><td>string</td><td>Awsome Service</td><td></td></tr><tr><td>description</td><td>string</td><td>Awsome description</td><td></td></tr><tr><td>eventType</td><td>string</td><td>RoundRobin_OptimizeForAvailability</td><td><ul><li>RoundRobin_OptimizeForAvailability</li><li>RoundRobin_OptimizeForEqualDistribution</li></ul></td></tr><tr><td>teamMembers</td><td>obbject</td><td>See field info on the <code>teamMembers</code> table</td><td></td></tr><tr><td>slug</td><td>string</td><td>awsome-service</td><td></td></tr><tr><td>appointmentTitle</td><td>string</td><td><code>{{contact.name}}</code></td><td></td></tr><tr><td>eventColor</td><td>string</td><td>Tomato</td><td><ul><li>Banana</li><li>Basil</li><li>Blueberry</li><li>Flamingo</li><li>Grape</li><li>Graphite</li><li>Lavender</li><li>Peacock</li><li>Sage</li><li>Tangerine</li><li>Tomato</li></ul></td></tr><tr><td>availability</td><td>object</td><td>See field info on <code>availability</code> table.</td><td></td></tr><tr><td>confirmation</td><td>object</td><td>See field info on <code>confirmation</code> table.</td><td></td></tr></tbody></table><p>Allowed JSON fields in the body</p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Option</th></thead><tbody><tr><td>isActive</td><td>boolean</td><td><code>true</code></td><td></td></tr><tr><td>syncOption</td><td>string</td><td>oneway</td><td><ul><li>oneway</li><li>twoway</li></ul></td></tr><tr><td>slug</td><td>string</td><td>first-calendar</td></tr></tbody></table><p>Allowed JSON fields in the <code>teamMembers</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>userId</td><td>string</td><td>GCs5KuzPqTls7vWclkEV</td><td></td><td>Yes</td></tr><tr><td>priority</td><td>string</td><td>High</td><td><ul><li>High</li><li>Medium</li><li>Low</li></ul></td><td>Yes</td></tr><tr><td>selected</td><td>boolean</td><td>true</td><td></td><td>Yes</td></tr><tr><td>meetingLocation</td><td>string</td><td>https://zoom.us/j/XXXXXXXXXX</td><td></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>eventTiming</td><td>object</td><td>See field info on <code>availability.eventTiming</code> table.</td><td>Yes</td></tr><tr><td>officeHours</td><td>object</td><td>See field info on <code>availability.officeHours</code> table.</td><td>Yes</td></tr><tr><td>appointmentInfo</td><td>object</td><td>See field info on <code>availability.appointmentInfo</code> table.</td><td>No</td></tr><tr><td>schedule</td><td>object</td><td>See field info on <code>availability.schedule</code> table.</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.eventTiming</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>slotDuration</td><td>number</td><td>30</td><td><ul><li>10</li><li>15</li><li>20</li><li>30</li><li>45</li><li>60</li><li>90</li><li>120</li><li>180</li><li>240</li><li>300</li><li>360</li><li>420</li><li>480</li></ul></td><td>Yes</td></tr><tr><td>slotInterval</td><td>number</td><td>30</td><td><ul><li>10</li><li>15</li><li>20</li><li>30</li><li>45</li><li>60</li><li>90</li><li>120</li><li>180</li><li>240</li><li>300</li><li>360</li><li>420</li><li>480</li></ul></td><td>Yes</td></tr><tr><td>slotBuffer</td><td>number</td><td>1</td><td></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.appointmentInfo</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>perSlot</td><td>number</td><td>1</td><td>No</td></tr><tr><td>perDay</td><td>number</td><td>5</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.schedule</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>Allowed Options</th><th>is Required?</th></thead><tbody><tr><td>allowBookingAfter</td><td>number</td><td>1</td><td></td><td>No</td></tr><tr><td>allowBookingAfterUnit</td><td>string</td><td>days</td><td><ul><li>hours</li><li>days</li><li>weeks</li><li>months</li></ul></td><td>No</td></tr><tr><td>allowBookingFor</td><td>number</td><td>5</td><td>No</td></tr><tr><td>allowBookingForUnit</td><td>string</td><td>days</td><td><ul><li>hours</li><li>days</li><li>weeks</li><li>months</li></ul></td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.officeHours</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>monday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>tuesday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>wednesday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>thursday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr><tr><td>friday</td><td>array</td><td>Please see field info <code>availability.officeHours.days</code> table. include as a array.</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>availability.officeHours.days</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>openMinute</td><td>number</td><td>0</td><td>Yes</td></tr><tr><td>openHour</td><td>number</td><td>8</td><td>Yes</td></tr><tr><td>closeMinute</td><td>number</td><td>0</td><td>Yes</td></tr><tr><td>closeHour</td><td>number</td><td>17</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>form</td><td>object</td><td>See field info on <code>confirmation.form</code> table.</td><td>No</td></tr><tr><td>notificationAndOther</td><td>object</td><td>See field info on <code>confirmation.notificationAndOther</code> table.</td><td>Yes</td></tr><tr><td>formSubmission</td><td>object</td><td>See field info on <code>confirmation.formSubmission</code> table.</td><td>Yes</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation.form</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>customFormId</td><td>string</td><td>jjusM6EOngDExnbo2DbU</td><td>No</td></tr><tr><td>stickyContact</td><td>boolean</td><td>false</td><td>No</td></tr></tbody></table><p>Allowed JSON fields in the <code>confirmation.notificationAndOther</code></p><table><thead><th>Fields</th><th>Types</th><th>Example</th><th>is Required?</th></thead><tbody><tr><td>autoConfirm</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>shouldSendAlertEmailsToAssignedMember</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>googleInvitationEmails</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>allowReschedule</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>allowCancellation</td><td>boolean</td><td>false</td><td>Yes</td></tr><tr><td>alertEmail</td><td>string</td><td>john@deo.com</td><td>No</td></tr><tr><td>n