{ "openapi": "3.0.0", "paths": { "/calendars/groups": { "get": { "operationId": "get-groups", "summary": "Get Groups", "description": "Get all calendar groups in a location.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "locationId", "required": true, "in": "query", "description": "Location Id", "schema": { "example": "ve9EPM428h8vShlRW1KT", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllGroupsSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.readonly" ] } ] }, "post": { "operationId": "create-calendar-group", "summary": "Create Calendar Group", "description": "Create Calendar Group", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupCreateDTO" } } } }, "responses": { "201": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupCreateSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.write" ] } ] } }, "/calendars/groups/validate-slug": { "post": { "operationId": "validate-groups-slug", "summary": "Validate group slug", "description": "Validate if group slug is available or not.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateGroupSlugPostBody" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidateGroupSlugSuccessResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.write" ] } ] } }, "/calendars/groups/{groupId}": { "delete": { "operationId": "delete-group", "summary": "Delete Group", "description": "Delete Group", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "groupId", "required": true, "in": "path", "description": "Group Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.write" ] } ] }, "put": { "operationId": "edit-group", "summary": "Update Group", "description": "Update Group by group ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "groupId", "required": true, "in": "path", "description": "Group Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupUpdateDTO" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupCreateSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.write" ] } ] } }, "/calendars/groups/{groupId}/status": { "put": { "operationId": "disable-group", "summary": "Disable Group", "description": "Disable Group", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "groupId", "required": true, "in": "path", "description": "Group Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupStatusUpdateParams" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Groups" ], "security": [ { "bearer": [ "calendars/groups.write" ] } ] } }, "/calendars/events/appointments": { "post": { "operationId": "create-appointment", "summary": "Create appointment", "description": "Create appointment", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppointmentCreateSchema" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppointmentSchemaResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/events/appointments/{eventId}": { "put": { "operationId": "edit-appointment", "summary": "Update Appointment", "description": "Update appointment", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "eventId", "required": true, "in": "path", "description": "Event Id or Instance id. For recurring appointments send masterEventId to modify original series.", "examples": { "example1": { "summary": "Event ID", "value": "ocQHyuzHvysMo5N5VsXc" }, "example2": { "summary": "Recurring Instance ID", "value": "ocQHyuzHvysMo5N5VsXc_1729821600000_1800" } }, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppointmentEditSchema" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppointmentSchemaResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] }, "get": { "operationId": "get-appointment", "summary": "Get Appointment", "description": "Get appointment by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "eventId", "required": true, "in": "path", "description": "Event Id or Instance id. For recurring appointments send masterEventId to modify original series.", "examples": { "example1": { "summary": "Event ID", "value": "ocQHyuzHvysMo5N5VsXc" }, "example2": { "summary": "Recurring Instance ID", "value": "ocQHyuzHvysMo5N5VsXc_1729821600000_1800" } }, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCalendarEventSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] } }, "/calendars/events": { "get": { "operationId": "get-calendar-events", "summary": "Get Calendar Events", "description": "Get Calendar Events", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "locationId", "required": true, "in": "query", "description": "Location Id", "schema": { "example": "0007BWpSzSwfiuSl0tR2", "type": "string" } }, { "name": "userId", "required": false, "in": "query", "description": "User Id - Owner of an appointment. Either of userId, groupId or calendarId is required", "schema": { "example": "CVokAlI8fgw4WYWoCtQz", "type": "string" } }, { "name": "calendarId", "required": false, "in": "query", "description": "Either of calendarId, userId or groupId is required", "schema": { "example": "BqTwX8QFwXzpegMve9EQ", "type": "string" } }, { "name": "groupId", "required": false, "in": "query", "description": "Either of groupId, calendarId or userId is required", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } }, { "name": "startTime", "required": true, "in": "query", "description": "Start Time (in millis)", "schema": { "example": "1680373800000", "type": "string" } }, { "name": "endTime", "required": true, "in": "query", "description": "End Time (in millis)", "schema": { "example": "1680978599999", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCalendarEventsSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] } }, "/calendars/blocked-slots": { "get": { "operationId": "get-blocked-slots", "summary": "Get Blocked Slots", "description": "Get Blocked Slots", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "locationId", "required": true, "in": "query", "description": "Location Id", "schema": { "example": "0007BWpSzSwfiuSl0tR2", "type": "string" } }, { "name": "userId", "required": false, "in": "query", "description": "User Id - Owner of an appointment. Either of userId, groupId or calendarId is required", "schema": { "example": "CVokAlI8fgw4WYWoCtQz", "type": "string" } }, { "name": "calendarId", "required": false, "in": "query", "description": "Either of calendarId, userId or groupId is required", "schema": { "example": "BqTwX8QFwXzpegMve9EQ", "type": "string" } }, { "name": "groupId", "required": false, "in": "query", "description": "Either of groupId, calendarId or userId is required", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } }, { "name": "startTime", "required": true, "in": "query", "description": "Start Time (in millis)", "schema": { "example": "1680373800000", "type": "string" } }, { "name": "endTime", "required": true, "in": "query", "description": "End Time (in millis)", "schema": { "example": "1680978599999", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCalendarEventsSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] } }, "/calendars/events/block-slots": { "post": { "operationId": "create-block-slot", "summary": "Create Block Slot", "description": "Create block slot", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockSlotCreateRequestDTO" } } } }, "responses": { "201": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockedSlotSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/events/block-slots/{eventId}": { "put": { "operationId": "edit-block-slot", "summary": "Update Block Slot", "description": "Update block slot by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "eventId", "required": true, "in": "path", "description": "Event Id or Instance id. For recurring appointments send masterEventId to modify original series.", "examples": { "example1": { "summary": "Event ID", "value": "ocQHyuzHvysMo5N5VsXc" }, "example2": { "summary": "Recurring Instance ID", "value": "ocQHyuzHvysMo5N5VsXc_1729821600000_1800" } }, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockSlotEditRequestDTO" } } } }, "responses": { "201": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockedSlotSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/{calendarId}/free-slots": { "get": { "operationId": "get-slots", "summary": "Get Free Slots", "description": "Get free slots for a calendar between a date range. Optionally a consumer can also request free slots in a particular timezone and also for a particular user.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "description": "Calendar Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } }, { "name": "startDate", "required": true, "in": "query", "description": "Start Date (**⚠️ Important:** Date range cannot be more than 31 days)", "schema": { "example": 1548898600000, "type": "number" } }, { "name": "endDate", "required": true, "in": "query", "description": "End Date (**⚠️ Important:** Date range cannot be more than 31 days)", "schema": { "example": 1601490599999, "type": "number" } }, { "name": "timezone", "required": false, "in": "query", "description": "The timezone in which the free slots are returned", "schema": { "example": "America/Chihuahua", "type": "string" } }, { "name": "userId", "required": false, "in": "query", "description": "The user for whom the free slots are returned", "schema": { "example": "082goXVW3lIExEQPOnd3", "type": "string" } }, { "name": "userIds", "required": false, "in": "query", "description": "The users for whom the free slots are returned", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "Availability map keyed by date (YYYY-MM-DD)", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/SlotsSchema" }, "example": { "2024-10-28": { "slots": [ "2024-10-28T10:00:00-05:00", "2024-10-28T11:00:00-05:00" ] }, "2024-10-29": { "slots": [ "2024-10-29T10:00:00-05:00", "2024-10-29T14:30:00-05:00" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.readonly" ] } ] } }, "/calendars/{calendarId}": { "put": { "operationId": "update-calendar", "summary": "Update Calendar", "description": "Update calendar by ID.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "description": "Calendar Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarUpdateDTO" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarByIdSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.write" ] } ] }, "get": { "operationId": "get-calendar", "summary": "Get Calendar", "description": "Get calendar by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "description": "Calendar Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarByIdSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.readonly" ] } ] }, "delete": { "operationId": "delete-calendar", "summary": "Delete Calendar", "description": "Delete calendar by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "description": "Calendar Id", "schema": { "example": "ocQHyuzHvysMo5N5VsXc", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarDeleteSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.write" ] } ] } }, "/calendars/events/{eventId}": { "delete": { "operationId": "delete-event", "summary": "Delete Event", "description": "Delete event by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "eventId", "required": true, "in": "path", "description": "Event Id or Instance id. For recurring appointments send masterEventId to modify original series.", "examples": { "example1": { "summary": "Event ID", "value": "ocQHyuzHvysMo5N5VsXc" }, "example2": { "summary": "Recurring Instance ID", "value": "ocQHyuzHvysMo5N5VsXc_1729821600000_1800" } }, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAppointmentSchema" } } } }, "responses": { "201": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteEventSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Events" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/appointments/{appointmentId}/notes": { "get": { "operationId": "get-appointment-notes", "summary": "Get Notes", "description": "Get Appointment Notes", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "limit", "required": true, "in": "query", "description": "Limit of notes to fetch", "schema": { "maximum": 20, "example": 10, "type": "number" } }, { "name": "offset", "required": true, "in": "query", "description": "Offset of notes to fetch", "schema": { "minimum": 0, "example": 0, "type": "number" } }, { "name": "appointmentId", "required": true, "in": "path", "description": "Appointment ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetNotesListSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Appointment Notes" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] }, "post": { "operationId": "create-appointment-note", "summary": "Create Note", "description": "Create Note", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "appointmentId", "required": true, "in": "path", "description": "Appointment ID", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotesDTO" } } } }, "responses": { "201": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCreateUpdateNoteSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Appointment Notes" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/appointments/{appointmentId}/notes/{noteId}": { "put": { "operationId": "update-appointment-note", "summary": "Update Note", "description": "Update Note", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "appointmentId", "required": true, "in": "path", "description": "Appointment ID", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotesDTO" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetCreateUpdateNoteSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Appointment Notes" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] }, "delete": { "operationId": "delete-appointment-note", "summary": "Delete Note", "description": "Delete Note", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "appointmentId", "required": true, "in": "path", "description": "Appointment ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteNoteSuccessfulResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Appointment Notes" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/resources/{resourceType}/{id}": { "get": { "operationId": "get-calendar-resource", "summary": "Get Calendar Resource", "description": "Get calendar resource by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "resourceType", "required": true, "in": "path", "description": "Calendar Resource Type", "schema": { "enum": [ "equipments", "rooms" ], "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Calendar Resource ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Calendar resource fetched", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarResourceByIdResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Resources: Rooms & Equipments" ], "security": [ { "Location-Access": [ "calendars/resources.readonly" ] } ] }, "put": { "operationId": "update-calendar-resource", "summary": "Update Calendar Resource", "description": "Update calendar resource by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "resourceType", "required": true, "in": "path", "description": "Calendar Resource Type", "schema": { "enum": [ "equipments", "rooms" ], "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Calendar Resource ID", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCalendarResourceDTO" } } } }, "responses": { "200": { "description": "Calendar resource updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarResourceResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Resources: Rooms & Equipments" ], "security": [ { "Location-Access": [ "calendars/resources.write" ] } ] }, "delete": { "operationId": "delete-calendar-resource", "summary": "Delete Calendar Resource", "description": "Delete calendar resource by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "resourceType", "required": true, "in": "path", "description": "Calendar Resource Type", "schema": { "enum": [ "equipments", "rooms" ], "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Calendar Resource ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Calendar resource deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResourceDeleteResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Resources: Rooms & Equipments" ], "security": [ { "Location-Access": [ "calendars/resources.write" ] } ] } }, "/calendars/resources/{resourceType}": { "get": { "operationId": "fetch-calendar-resources", "summary": "List Calendar Resources", "description": "List calendar resources by resource type and location ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "resourceType", "required": true, "in": "path", "description": "Calendar Resource Type", "schema": { "enum": [ "equipments", "rooms" ], "type": "string" } }, { "name": "locationId", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "limit", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "skip", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Calendar resources listed", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CalendarResourceByIdResponseDTO" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Resources: Rooms & Equipments" ], "security": [ { "Location-Access": [ "calendars/resources.readonly" ] } ] }, "post": { "operationId": "create-calendar-resource", "summary": "Create Calendar Resource", "description": "Create calendar resource by resource type", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "resourceType", "required": true, "in": "path", "description": "Calendar Resource Type", "schema": { "enum": [ "equipments", "rooms" ], "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCalendarResourceDTO" } } } }, "responses": { "201": { "description": "Calendar resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarResourceByIdResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Resources: Rooms & Equipments" ], "security": [ { "Location-Access": [ "calendars/resources.write" ] } ] } }, "/calendars/{calendarId}/notifications": { "get": { "operationId": "get-event-notification", "summary": "Get notifications", "description": "Get calendar notifications based on query", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "isActive", "required": false, "in": "query", "schema": { "type": "boolean" } }, { "name": "deleted", "required": false, "in": "query", "schema": { "type": "boolean" } }, { "name": "limit", "required": false, "in": "query", "description": "Number of records to return", "schema": { "default": 100, "type": "number" } }, { "name": "skip", "required": false, "in": "query", "description": "Number of records to skip", "schema": { "default": 0, "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CalendarNotificationResponseDTO" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Notifications" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] }, "post": { "operationId": "create-event-notification", "summary": "Create notification", "description": "Create Calendar notifications, either one or multiple. All notification settings must be for single calendar only", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CreateCalendarNotificationDTO" } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CalendarNotificationResponseDTO" } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Notifications" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/{calendarId}/notifications/{notificationId}": { "get": { "operationId": "find-event-notification", "summary": "Get notification", "description": "Find Event notification by notificationId", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "notificationId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarNotificationResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Notifications" ], "security": [ { "bearer": [ "calendars/events.readonly" ] } ] }, "put": { "operationId": "update-event-notification", "summary": "Update notification", "description": "Update Event notification by id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "notificationId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCalendarNotificationsDTO" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarNotificationDeleteResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Notifications" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] }, "delete": { "operationId": "delete-event-notification", "summary": "Delete Notification", "description": "Delete notification", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "calendarId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "notificationId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarNotificationDeleteResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendar Notifications" ], "security": [ { "bearer": [ "calendars/events.write" ] } ] } }, "/calendars/schedules/search": { "get": { "operationId": "getAllSchedules", "summary": "List user availability schedule", "description": "Retrieve user availability schedules based on various filters including location, calendar, and user. Supports pagination.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "locationId", "required": true, "in": "query", "description": "Location ID to filter schedules by", "schema": { "example": "IkqiJlXJ7o9h61tCHHod", "type": "string" } }, { "name": "userId", "required": true, "in": "query", "description": "User ID to filter schedules by specific user", "schema": { "example": "IkqiJlXJ7o9h61tCHHod", "type": "string" } }, { "name": "calendarId", "required": false, "in": "query", "description": "Calendar ID for filtering schedules by specific calendar", "schema": { "example": "WvVX9LpvlBO6K506xLbp", "type": "string" } }, { "name": "skip", "required": false, "in": "query", "description": "Number of items to skip for pagination", "schema": { "minimum": 0, "default": 0, "example": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of items to return (max 500)", "schema": { "minimum": 1, "maximum": 500, "default": 50, "example": 50, "type": "number" } } ], "responses": { "200": { "description": "Schedules retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAllSchedulesResponseDTO" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.readonly" ] } ] } }, "/calendars/schedules/{id}": { "get": { "operationId": "getScheduleById", "summary": "Get user availability schedule", "description": "Retrieve a specific schedule by its unique identifier. Returns detailed information including rules, timezone, and associated calendars/users.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "id", "required": true, "in": "path", "description": "Unique identifier of the schedule", "schema": { "example": "IkqiJlXJ7o9h61tCHHod", "type": "string" } } ], "responses": { "200": { "description": "Schedule found and retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponseDTO" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "404": { "description": "Schedule with the specified ID was not found" } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.readonly" ] } ] }, "put": { "operationId": "updateSchedule", "summary": "Update user availability schedule", "description": "Modify an existing schedule by updating its rules, timezone, and name All fields are optional - only provided fields will be updated.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "id", "required": true, "in": "path", "description": "Unique identifier of the schedule to update", "schema": { "example": "sch123def456ghi789", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateScheduleDTO" } } } }, "responses": { "200": { "description": "Schedule updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponseDTO" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "404": { "description": "Schedule with the specified ID was not found" }, "422": { "description": "Validation errors in schedule rules or conflicting data", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.write" ] } ] }, "delete": { "operationId": "deleteSchedule", "summary": "Delete user availability schedule", "description": "Permanently remove a schedule and all its associated rules. This action cannot be undone.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "id", "required": true, "in": "path", "description": "Unique identifier of the schedule to delete", "schema": { "example": "sch123def456ghi789", "type": "string" } } ], "responses": { "200": { "description": "Schedule deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the deletion was successful", "example": true } } } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "404": { "description": "Schedule with the specified ID was not found" } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.write" ] } ] } }, "/calendars/schedules": { "post": { "operationId": "createSchedule", "summary": "Create user availability schedule", "description": "Create new schedule with specified rules, timezone, location, user and calendar associations.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateScheduleDTO" } } } }, "responses": { "201": { "description": "Schedule created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponseDTO" } } } }, "400": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Validation errors in schedule rules or conflicting data", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.write" ] } ] } }, "/calendars/schedules/{id}/associations/{calendarId}": { "put": { "operationId": "add-calendar-to-schedule", "summary": "Apply user availability schedule to a calendar", "description": "Associates a calendar with the given schedule by adding the calendarId to a schedule", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "id", "required": true, "in": "path", "description": "Unique identifier of the schedule", "schema": { "example": "IkqiJlXJ7o9h61tCHHod", "type": "string" } }, { "name": "calendarId", "required": true, "in": "path", "description": "Unique identifier of the team calendar to add to the schedule", "schema": { "example": "WvVX9LpvlBO6K506xLbp", "type": "string" } } ], "responses": { "200": { "description": "Calendar successfully added to schedule", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } }, "400": { "description": "Schedule and calendar must belong to the same location", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "404": { "description": "Schedule or calendar not found", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.write" ] } ] }, "delete": { "operationId": "remove-calendar-from-schedule", "summary": "Remove user availability schedule from a calendar", "description": "Removes the association between a team calendar and the given schedule by removing the calendarId from the schedule", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "id", "required": true, "in": "path", "description": "Unique identifier of the schedule", "schema": { "example": "IkqiJlXJ7o9h61tCHHod", "type": "string" } }, { "name": "calendarId", "required": true, "in": "path", "description": "Unique identifier of the calendar to remove from the schedule", "schema": { "example": "WvVX9LpvlBO6K506xLbp", "type": "string" } } ], "responses": { "200": { "description": "Calendar successfully removed from schedule", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } } } } }, "400": { "description": "Schedule and calendar must belong to the same location", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "User not authenticated", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "404": { "description": "Schedule or calendar not found", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } } }, "tags": [ "Availability" ], "security": [ { "bearer": [ "calendars.write" ] } ] } }, "/calendars/": { "get": { "operationId": "get-calendars", "summary": "Get Calendars", "description": "Get all calendars in a location.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } }, { "name": "locationId", "required": true, "in": "query", "description": "Location Id", "schema": { "example": "ve9EPM428h8vShlRW1KT", "type": "string" } }, { "name": "groupId", "required": false, "in": "query", "description": "Group Id", "schema": { "example": "BqTwX8QFwXzpegMve9EQ", "type": "string" } }, { "name": "showDrafted", "required": false, "in": "query", "description": "Show drafted", "schema": { "default": true, "example": false, "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarsGetSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.readonly" ] } ] }, "post": { "operationId": "create-calendar", "summary": "Create Calendar", "description": "Create calendar in a location.", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-04-15" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarCreateDTO" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CalendarByIdSuccessfulResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Calendars" ], "security": [ { "bearer": [ "calendars.write" ] } ] } } }, "info": { "title": "Calendars API", "description": "Documentation for Calendars API", "version": "1.0", "contact": {} }, "tags": [ { "name": "Calendars", "description": "Documentation for Calendars API" }, { "name": "Calendar Groups", "description": "Documentation for Calendars API" }, { "name": "Calendar Events", "description": "Documentation for Calendars API" }, { "name": "Appointment Notes", "description": "Documentation for Calendars API" }, { "name": "Calendar Resources: Rooms & Equipments", "description": "Documentation for Calendars API" }, { "name": "Calendar Notifications", "description": "Documentation for Calendars API" }, { "name": "Availability", "description": "Documentation for Calendars API" } ], "servers": [ { "url": "https://services.leadconnectorhq.com" } ], "components": { "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", "type": "http" }, "Location-Access": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", "type": "http" }, "Location-Access-Only": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account.", "type": "http" }, "Agency-Access": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.", "type": "http" }, "Agency-Access-Only": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Agency.", "type": "http" } }, "schemas": { "GroupDTO": { "type": "object", "properties": { "locationId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "name": { "type": "string", "example": "group a" }, "description": { "type": "string", "example": "group description" }, "slug": { "type": "string", "example": "15-mins" }, "isActive": { "type": "boolean", "example": true }, "id": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" } }, "required": [ "locationId", "name", "description", "slug" ] }, "AllGroupsSuccessfulResponseDTO": { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/components/schemas/GroupDTO" } } } }, "ValidateGroupSlugPostBody": { "type": "object", "properties": { "locationId": { "type": "string", "description": "Location Id", "example": "ve9EPM428h8vShlRW1KT" }, "slug": { "type": "string", "description": "Slug", "example": "calendar-1" } }, "required": [ "locationId", "slug" ] }, "ValidateGroupSlugSuccessResponseDTO": { "type": "object", "properties": { "available": { "type": "boolean" } }, "required": [ "available" ] }, "GroupCreateDTO": { "type": "object", "properties": { "locationId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "name": { "type": "string", "example": "group a" }, "description": { "type": "string", "example": "group description" }, "slug": { "type": "string", "example": "15-mins" }, "isActive": { "type": "boolean", "example": true } }, "required": [ "locationId", "name", "description", "slug" ] }, "GroupCreateSuccessfulResponseDTO": { "type": "object", "properties": { "group": { "$ref": "#/components/schemas/GroupDTO" } } }, "GroupSuccessfulResponseDTO": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Success", "example": "true" } } }, "GroupStatusUpdateParams": { "type": "object", "properties": { "isActive": { "type": "boolean", "description": "Is Active?", "example": true } }, "required": [ "isActive" ] }, "GroupUpdateDTO": { "type": "object", "properties": { "name": { "type": "string", "example": "group a" }, "description": { "type": "string", "example": "group description" }, "slug": { "type": "string", "example": "15-mins" } }, "required": [ "name", "description", "slug" ] }, "AppointmentCreateSchema": { "type": "object", "properties": { "title": { "type": "string", "description": "Title", "example": "Test Event" }, "meetingLocationType": { "type": "string", "description": "Meeting location type. \n- If `address` is provided in the request body, the `meetingLocationType` defaults to **custom**.", "example": "custom", "enum": [ "custom", "zoom", "gmeet", "phone", "address", "ms_teams", "google" ] }, "meetingLocationId": { "type": "string", "description": "The unique identifier for the meeting location.\n- This value can be found in `calendar.locationConfigurations`or `calendar.teamMembers[].locationConfigurations`", "example": "custom_0", "default": "default" }, "overrideLocationConfig": { "type": "boolean", "description": "Flag to override location config\n- **false** - If only `meetingLocationId` is provided\n- **true** - If only `meetingLocationType` is provided\n", "example": true }, "appointmentStatus": { "type": "string", "example": "confirmed", "enum": [ "new", "confirmed", "cancelled", "showed", "noshow", "invalid" ] }, "assignedUserId": { "type": "string", "description": "Assigned User Id", "example": "0007BWpSzSwfiuSl0tR2" }, "description": { "type": "string", "description": "Appointment Description", "example": "Booking a call to discuss the project" }, "address": { "type": "string", "description": "Appointment Address", "example": "Zoom" }, "ignoreDateRange": { "type": "boolean", "description": "If set to true, the minimum scheduling notice and date range would be ignored", "example": false }, "toNotify": { "type": "boolean", "description": "If set to false, the automations will not run", "example": false }, "ignoreFreeSlotValidation": { "type": "boolean", "description": "If true the time slot validation would be avoided for any appointment creation (even the ignoreDateRange)", "example": true }, "rrule": { "type": "string", "description": "RRULE as per the iCalendar (RFC 5545) specification for recurring events. DTSTART is not required, instance ids are calculated on the basis of startTime of the event. The rrule only be applied if ignoreFreeSlotValidation is true.", "examples": [ "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5", "RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20210623T043000Z\nEXDATE:20211105T040000Z,20211105T040000Z" ] }, "calendarId": { "type": "string", "description": "Calendar Id", "example": "CVokAlI8fgw4WYWoCtQz" }, "locationId": { "type": "string", "description": "Location Id", "example": "C2QujeCh8ZnC7al2InWR" }, "contactId": { "type": "string", "description": "Contact Id", "example": "0007BWpSzSwfiuSl0tR2" }, "startTime": { "type": "string", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "string", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" } }, "required": [ "calendarId", "locationId", "contactId", "startTime" ] }, "AppointmentSchemaResponse": { "type": "object", "properties": { "calendarId": { "type": "string", "description": "Calendar Id", "example": "CVokAlI8fgw4WYWoCtQz" }, "locationId": { "type": "string", "description": "Location Id", "example": "C2QujeCh8ZnC7al2InWR" }, "contactId": { "type": "string", "description": "Contact Id", "example": "0007BWpSzSwfiuSl0tR2" }, "startTime": { "type": "string", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "string", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" }, "title": { "type": "string", "description": "Title", "example": "Test Event" }, "meetingLocationType": { "type": "string", "description": "Meeting Location Type", "example": "custom", "default": "default" }, "appointmentStatus": { "type": "string", "example": "confirmed", "enum": [ "new", "confirmed", "cancelled", "showed", "noshow", "invalid", "active", "completed" ] }, "assignedUserId": { "type": "string", "description": "Assigned User Id", "example": "0007BWpSzSwfiuSl0tR2" }, "address": { "type": "string", "description": "Appointment Address", "example": "Zoom" }, "isRecurring": { "type": "boolean", "description": "true if the event is recurring otherwise false", "example": "true" }, "rrule": { "type": "string", "description": "RRULE as per the iCalendar (RFC 5545) specification for recurring events", "examples": [ "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5", "RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20210623T043000Z\nEXDATE:20211105T040000Z,20211105T040000Z" ] }, "id": { "type": "string", "description": "Id", "example": "0TkCdp9PfvLeWKYRRvIz" } }, "required": [ "calendarId", "locationId", "contactId", "id" ] }, "AppointmentEditSchema": { "type": "object", "properties": { "title": { "type": "string", "description": "Title", "example": "Test Event" }, "meetingLocationType": { "type": "string", "description": "Meeting location type. \n- If `address` is provided in the request body, the `meetingLocationType` defaults to **custom**.", "example": "custom", "enum": [ "custom", "zoom", "gmeet", "phone", "address", "ms_teams", "google" ] }, "meetingLocationId": { "type": "string", "description": "The unique identifier for the meeting location.\n- This value can be found in `calendar.locationConfigurations`or `calendar.teamMembers[].locationConfigurations`", "example": "custom_0", "default": "default" }, "overrideLocationConfig": { "type": "boolean", "description": "Flag to override location config\n- **false** - If only `meetingLocationId` is provided\n- **true** - If only `meetingLocationType` is provided\n", "example": true }, "appointmentStatus": { "type": "string", "example": "confirmed", "enum": [ "new", "confirmed", "cancelled", "showed", "noshow", "invalid" ] }, "assignedUserId": { "type": "string", "description": "Assigned User Id", "example": "0007BWpSzSwfiuSl0tR2" }, "description": { "type": "string", "description": "Appointment Description", "example": "Booking a call to discuss the project" }, "address": { "type": "string", "description": "Appointment Address", "example": "Zoom" }, "ignoreDateRange": { "type": "boolean", "description": "If set to true, the minimum scheduling notice and date range would be ignored", "example": false }, "toNotify": { "type": "boolean", "description": "If set to false, the automations will not run", "example": false }, "ignoreFreeSlotValidation": { "type": "boolean", "description": "If true the time slot validation would be avoided for any appointment creation (even the ignoreDateRange)", "example": true }, "rrule": { "type": "string", "description": "RRULE as per the iCalendar (RFC 5545) specification for recurring events. DTSTART is not required, instance ids are calculated on the basis of startTime of the event. The rrule only be applied if ignoreFreeSlotValidation is true.", "examples": [ "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5", "RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20210623T043000Z\nEXDATE:20211105T040000Z,20211105T040000Z" ] }, "calendarId": { "type": "string", "description": "Calendar Id", "example": "CVokAlI8fgw4WYWoCtQz" }, "startTime": { "type": "string", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "string", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" } } }, "CreatedOrUpdatedBy": { "type": "object", "properties": { "userId": { "type": "string", "description": "The ID of the user who created or updated the appointment" }, "source": { "type": "string", "description": "The source of the appointment" } }, "required": [ "source" ] }, "CalendarEventDTO": { "type": "object", "properties": { "id": { "type": "string", "description": "Event Id or Instance id for a recurring event", "examples": [ "ocQHyuzHvysMo5N5VsXc", "ocQHyuzHvysMo5N5VsXc_1729821600000_1800" ] }, "address": { "type": "string", "description": "Calendar Event address", "example": "https://meet.google.com/yqp-gogr-wve" }, "title": { "type": "string", "description": "Calendar Event title", "example": "Appointment with GHL Dev team" }, "calendarId": { "type": "string", "description": "Calendar ID", "example": "BqTwX8QFwXzpegMve9EQ" }, "locationId": { "type": "string", "description": "Location ID", "example": "0007BWpSzSwfiuSl0tR2" }, "contactId": { "type": "string", "description": "Contact ID", "example": "9NkT25Vor1v4aQatFsv2" }, "groupId": { "type": "string", "description": "Group ID", "example": "9NkT25Vor1v4aQatFsv2" }, "appointmentStatus": { "type": "string", "description": "Appointment Status", "example": "confirmed" }, "assignedUserId": { "type": "string", "description": "AssignedUser - the primary owner of an appointment", "example": "YlWd2wuCAZQzh2cH1fVZ" }, "users": { "description": "Users - the secondary owners of an appointment.", "example": [ "YlWd2wuCAZQzh2cH1fVZ", "9NkT25Vor1v4aQatFsv2" ], "type": "array", "items": { "type": "string" } }, "notes": { "type": "string", "description": "Notes", "example": "Some dummy note" }, "description": { "type": "string", "description": "Description", "example": "Some dummy description" }, "isRecurring": { "type": "boolean", "description": "true if the event is recurring otherwise false", "example": "true" }, "rrule": { "type": "string", "description": "RRULE as per the iCalendar (RFC 5545) specification for recurring events. DTSTART is not required, instance ids are calculated on the basis of startTime of the event.", "examples": [ "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=5", "RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20210623T043000Z\nEXDATE:20211105T040000Z,20211105T040000Z" ] }, "startTime": { "type": "object", "description": "Start Time", "example": "2023-09-25T16:00:00+05:30" }, "endTime": { "type": "object", "description": "End Time", "example": "2023-09-25T16:00:00+05:30" }, "dateAdded": { "type": "object", "description": "Date Added", "example": "2023-09-25T16:00:00+05:30" }, "dateUpdated": { "type": "object", "description": "Date Updated", "example": "2023-09-25T16:00:00+05:30" }, "assignedResources": { "description": "Ids of associated resources rooms and/or equipments", "type": "array", "items": { "type": "string" } }, "createdBy": { "description": "Appointment booked by metadata", "allOf": [ { "$ref": "#/components/schemas/CreatedOrUpdatedBy" } ] }, "masterEventId": { "type": "string", "description": "Master event id for a recurring instance", "example": "ocWd2wuBGAQzh2cH1fSZ" } }, "required": [ "id", "title", "calendarId", "locationId", "contactId", "groupId", "appointmentStatus", "assignedUserId", "users", "startTime", "endTime", "dateAdded", "dateUpdated" ] }, "GetCalendarEventsSuccessfulResponseDTO": { "type": "object", "properties": { "events": { "type": "array", "items": { "$ref": "#/components/schemas/CalendarEventDTO" } } } }, "BlockSlotCreateRequestDTO": { "type": "object", "properties": { "title": { "type": "string", "description": "Title", "example": "Test Event" }, "calendarId": { "type": "string", "description": "Either calendarId or assignedUserId can be set, not both.", "example": "CVokAlI8fgw4WYWoCtQz" }, "assignedUserId": { "type": "string", "description": "Either calendarId or assignedUserId can be set, not both.", "example": "CVokAlI8fgw4WYWoCtQz" }, "locationId": { "type": "string", "description": "Location Id", "example": "C2QujeCh8ZnC7al2InWR" }, "startTime": { "type": "string", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "string", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" } }, "required": [ "calendarId", "locationId" ] }, "BlockedSlotSuccessfulResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Id", "example": "0TkCdp9PfvLeWKYRRvIz" }, "locationId": { "type": "string", "description": "Location Id", "example": "C2QujeCh8ZnC7al2InWR" }, "title": { "type": "string", "description": "Title", "example": "My event" }, "startTime": { "type": "object", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "object", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" }, "calendarId": { "type": "string", "description": "Calendar id", "example": "CVokAlI8fgw4WYWoCtQz" }, "assignedUserId": { "type": "string", "description": "Assigned User Id", "example": "0007BWpSzSwfiuSl0tR2" } }, "required": [ "id", "locationId", "title", "startTime", "endTime" ] }, "BlockSlotEditRequestDTO": { "type": "object", "properties": { "title": { "type": "string", "description": "Title", "example": "Test Event" }, "calendarId": { "type": "string", "description": "Either calendarId or assignedUserId can be set, not both.", "example": "CVokAlI8fgw4WYWoCtQz" }, "assignedUserId": { "type": "string", "description": "Either calendarId or assignedUserId can be set, not both.", "example": "CVokAlI8fgw4WYWoCtQz" }, "locationId": { "type": "string", "description": "Location Id", "example": "C2QujeCh8ZnC7al2InWR" }, "startTime": { "type": "string", "description": "Start Time", "example": "2021-06-23T03:30:00+05:30" }, "endTime": { "type": "string", "description": "End Time", "example": "2021-06-23T04:30:00+05:30" } }, "required": [ "calendarId", "locationId" ] }, "SlotsSchema": { "type": "object", "properties": { "slots": { "example": [ "2024-10-28T10:00:00-05:00", "2024-10-28T11:00:00-05:00" ], "type": "array", "items": { "type": "string" } } }, "required": [ "slots" ] }, "CalendarNotification": { "type": "object", "properties": { "type": { "type": "string", "description": "Calendar Notification", "example": "email", "enum": [ "email" ], "default": "email" }, "shouldSendToContact": { "type": "boolean" }, "shouldSendToGuest": { "type": "boolean" }, "shouldSendToUser": { "type": "boolean" }, "shouldSendToSelectedUsers": { "type": "boolean" }, "selectedUsers": { "type": "string", "description": "Comma separated emails", "example": "user1@testemail.com,user2@testemail.com" } }, "required": [ "shouldSendToContact", "shouldSendToGuest", "shouldSendToUser", "shouldSendToSelectedUsers", "selectedUsers" ] }, "LocationConfiguration": { "type": "object", "properties": { "kind": { "type": "string", "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type", "example": "custom", "enum": [ "custom", "zoom_conference", "google_conference", "inbound_call", "outbound_call", "physical", "booker", "ms_teams_conference" ] }, "location": { "type": "string", "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind", "examples": [ "+14455550132", "http://meet.google.com/your-meeting-location" ] } }, "required": [ "kind" ] }, "TeamMember": { "type": "object", "properties": { "userId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "priority": { "type": "number", "default": 0.5, "enum": [ 0, 0.5, 1 ] }, "meetingLocationType": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.kind` instead.", "deprecated": true, "example": "custom", "default": "custom", "readOnly": true, "enum": [ "custom", "zoom", "gmeet", "phone", "address", "teams", "booker" ] }, "meetingLocation": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.location` instead.", "deprecated": true, "readOnly": true }, "isPrimary": { "type": "boolean", "description": "Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary." }, "locationConfigurations": { "description": "Meeting location configuration for event calendar.\n- *Multiple locations are allowed only when one team member is selected.*\n- *For **Class booking** and **Collective** calendars, only one location configuration is allowed for each team member.*", "type": "array", "items": { "$ref": "#/components/schemas/LocationConfiguration" } } }, "required": [ "userId" ] }, "Hour": { "type": "object", "properties": { "openHour": { "type": "number", "minimum": 0, "maximum": 23 }, "openMinute": { "type": "number", "minimum": 0, "maximum": 60 }, "closeHour": { "type": "number", "minimum": 0, "maximum": 23 }, "closeMinute": { "type": "number", "minimum": 0, "maximum": 60 } }, "required": [ "openHour", "openMinute", "closeHour", "closeMinute" ] }, "OpenHour": { "type": "object", "properties": { "daysOfTheWeek": { "type": "array", "items": { "type": "number", "maximum": 6, "minimum": 0 } }, "hours": { "type": "array", "items": { "$ref": "#/components/schemas/Hour" } } }, "required": [ "daysOfTheWeek", "hours" ] }, "Recurring": { "type": "object", "properties": { "freq": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY" ] }, "count": { "type": "number", "description": "Number of recurrences", "maximum": 24 }, "bookingOption": { "type": "string", "description": "This setting contols what to do incase a recurring slot is unavailable", "enum": [ "skip", "continue", "book_next" ] }, "bookingOverlapDefaultStatus": { "type": "string", "description": "This setting contols what to do incase a recurring slot is unavailable", "enum": [ "confirmed", "new" ] } } }, "Availability": { "type": "object", "properties": { "date": { "type": "string", "description": "Formulate the date string in the format of `T00:00:00.000Z`.", "example": "2023-09-24T00:00:00.000Z" }, "hours": { "type": "array", "items": { "$ref": "#/components/schemas/Hour" } }, "deleted": { "type": "boolean", "default": false } }, "required": [ "date", "hours" ] }, "LookBusyConfiguration": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Apply Look Busy", "example": true, "default": false }, "LookBusyPercentage": { "type": "number", "description": "Percentage of slots that will be hidden" } }, "required": [ "enabled", "LookBusyPercentage" ] }, "CalendarCreateDTO": { "type": "object", "properties": { "isActive": { "type": "boolean", "description": "Should the created calendar be active or draft", "default": true }, "notifications": { "description": "🚨 Deprecated! Please use 'Calendar Notifications APIs' instead.", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/CalendarNotification" } }, "locationId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "groupId": { "type": "string", "description": "Group Id", "example": "BqTwX8QFwXzpegMve9EQ" }, "teamMembers": { "description": "Team members are required for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.", "type": "array", "items": { "$ref": "#/components/schemas/TeamMember" } }, "eventType": { "type": "string", "enum": [ "RoundRobin_OptimizeForAvailability", "RoundRobin_OptimizeForEqualDistribution" ], "default": "RoundRobin_OptimizeForAvailability" }, "name": { "type": "string", "example": "test calendar" }, "description": { "type": "string", "example": "this is used for testing" }, "slug": { "type": "string", "example": "test1" }, "widgetSlug": { "type": "string", "example": "test1" }, "calendarType": { "type": "string", "enum": [ "round_robin", "event", "class_booking", "collective", "service_booking", "personal" ] }, "widgetType": { "type": "string", "description": "Calendar widget type. Choose \"default\" for \"neo\" and \"classic\" for \"classic\" layout.", "example": "classic", "enum": [ "default", "classic" ], "default": "classic" }, "eventTitle": { "type": "string", "default": "{{contact.name}}" }, "eventColor": { "type": "string", "default": "#039be5" }, "meetingLocation": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.location` or `teamMembers[].locationConfigurations.location` instead.", "deprecated": true, "readOnly": true }, "locationConfigurations": { "description": "Meeting location configuration for event calendar", "type": "array", "items": { "$ref": "#/components/schemas/LocationConfiguration" } }, "slotDuration": { "type": "number", "description": "This controls the duration of the meeting", "default": 30 }, "slotDurationUnit": { "type": "string", "description": "Unit for slot duration.", "enum": [ "mins", "hours" ] }, "slotInterval": { "type": "number", "description": "Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.", "default": 30 }, "slotIntervalUnit": { "type": "string", "description": "Unit for slot interval.", "enum": [ "mins", "hours" ] }, "slotBuffer": { "type": "number", "description": "Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up" }, "slotBufferUnit": { "type": "string", "description": "Unit for slot buffer.", "enum": [ "mins", "hours" ] }, "preBuffer": { "type": "number", "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready" }, "preBufferUnit": { "type": "string", "description": "Unit for pre-buffer.", "enum": [ "mins", "hours" ] }, "appoinmentPerSlot": { "type": "number", "default": 1, "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar." }, "appoinmentPerDay": { "type": "number", "description": "Number of appointments that can be booked for a given day" }, "allowBookingAfter": { "type": "number", "description": "Minimum scheduling notice for events" }, "allowBookingAfterUnit": { "type": "string", "description": "Unit for minimum scheduling notice", "enum": [ "hours", "days", "weeks", "months" ], "example": "days" }, "allowBookingFor": { "type": "number", "description": "Minimum number of days/weeks/months for which to allow booking events" }, "allowBookingForUnit": { "type": "string", "description": "Unit for controlling the duration for which booking would be allowed for", "enum": [ "days", "weeks", "months" ], "example": "days" }, "openHours": { "description": "This is only to set the standard availability. For custom availability, use the availabilities property", "type": "array", "items": { "$ref": "#/components/schemas/OpenHour" } }, "enableRecurring": { "type": "boolean", "description": "Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this", "default": false }, "recurring": { "$ref": "#/components/schemas/Recurring" }, "formId": { "type": "string" }, "stickyContact": { "type": "boolean" }, "isLivePaymentMode": { "type": "boolean" }, "autoConfirm": { "type": "boolean", "default": true }, "shouldSendAlertEmailsToAssignedMember": { "type": "boolean" }, "alertEmail": { "type": "string" }, "googleInvitationEmails": { "type": "boolean", "default": false }, "allowReschedule": { "type": "boolean", "default": true }, "allowCancellation": { "type": "boolean", "default": true }, "shouldAssignContactToTeamMember": { "type": "boolean" }, "shouldSkipAssigningContactForExisting": { "type": "boolean" }, "notes": { "type": "string" }, "pixelId": { "type": "string" }, "formSubmitType": { "type": "string", "default": "ThankYouMessage", "enum": [ "RedirectURL", "ThankYouMessage" ] }, "formSubmitRedirectURL": { "type": "string" }, "formSubmitThanksMessage": { "type": "string" }, "availabilityType": { "type": "number", "description": "Determines which availability type to consider:\n- **1**: Only custom availabilities will be used.\n- **0**: Only open hours will be used.\n- **null**: Both custom availabilities and open hours will be considered.", "enum": [ 0, 1 ] }, "availabilities": { "description": "This is only to set the custom availability. For standard availability, use the openHours property", "type": "array", "items": { "$ref": "#/components/schemas/Availability" } }, "guestType": { "type": "string", "enum": [ "count_only", "collect_detail" ] }, "consentLabel": { "type": "string" }, "calendarCoverImage": { "type": "string", "example": "https://path-to-image.com" }, "lookBusyConfig": { "description": "Look Busy Configuration", "allOf": [ { "$ref": "#/components/schemas/LookBusyConfiguration" } ] } }, "required": [ "locationId", "name" ] }, "LocationConfigurationResponse": { "type": "object", "properties": { "kind": { "type": "string", "description": "Type of meeting location. zoom_conference/google_conference/ms_teams_conference is not supported in event calendar type", "example": "custom", "enum": [ "custom", "zoom_conference", "google_conference", "inbound_call", "outbound_call", "physical", "booker", "ms_teams_conference" ] }, "location": { "type": "string", "description": "Address for meeting location. Not applicable on \"zoom_conference\", \"google_conference\" and \"ms_teams_conference\" kind", "examples": [ "+14455550132", "http://meet.google.com/your-meeting-location" ] }, "meetingId": { "type": "string", "description": "Unique ID used to select a specific meeting location", "example": "my_conference_id" } }, "required": [ "kind" ] }, "TeamMemberResponse": { "type": "object", "properties": { "userId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "priority": { "type": "number", "default": 0.5, "enum": [ 0, 0.5, 1 ] }, "meetingLocationType": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.kind` instead.", "deprecated": true, "example": "custom", "default": "custom", "readOnly": true, "enum": [ "custom", "zoom", "gmeet", "phone", "address", "teams", "booker" ] }, "meetingLocation": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.location` instead.", "deprecated": true, "readOnly": true }, "isPrimary": { "type": "boolean", "description": "Marks a user as primary. This property is required in case of collective booking calendars. Only one user can be primary." }, "locationConfigurations": { "description": "Meeting location configurations", "type": "array", "items": { "$ref": "#/components/schemas/LocationConfigurationResponse" } } }, "required": [ "userId" ] }, "CalendarDTO": { "type": "object", "properties": { "isActive": { "type": "boolean", "description": "Should the created calendar be active or draft", "default": true }, "notifications": { "description": "🚨 Deprecated! Please use 'Calendar Notifications APIs' instead.", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/CalendarNotification" } }, "locationId": { "type": "string", "example": "ocQHyuzHvysMo5N5VsXc" }, "groupId": { "type": "string", "description": "Group Id", "example": "BqTwX8QFwXzpegMve9EQ" }, "teamMembers": { "description": "Team members are for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.", "type": "array", "items": { "$ref": "#/components/schemas/TeamMemberResponse" } }, "eventType": { "type": "string", "enum": [ "RoundRobin_OptimizeForAvailability", "RoundRobin_OptimizeForEqualDistribution" ], "default": "RoundRobin_OptimizeForAvailability" }, "name": { "type": "string", "example": "test calendar" }, "description": { "type": "string", "example": "this is used for testing" }, "slug": { "type": "string", "example": "test1" }, "widgetSlug": { "type": "string", "example": "test1" }, "calendarType": { "type": "string", "enum": [ "round_robin", "event", "class_booking", "collective", "service_booking", "personal" ] }, "widgetType": { "type": "string", "description": "Calendar widget type. Choose \"default\" for \"neo\" and \"classic\" for \"classic\" layout.", "example": "classic", "enum": [ "default", "classic" ], "default": "classic" }, "eventTitle": { "type": "string", "default": "{{contact.name}}" }, "eventColor": { "type": "string", "default": "#039be5" }, "meetingLocation": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.location` or `teamMembers[].locationConfigurations.location` instead.", "deprecated": true, "readOnly": true }, "locationConfigurations": { "description": "Meeting location configuration for event calendar", "type": "array", "items": { "$ref": "#/components/schemas/LocationConfigurationResponse" } }, "slotDuration": { "type": "number", "description": "This controls the duration of the meeting", "default": 30 }, "slotDurationUnit": { "type": "string", "description": "Unit for slot duration.", "enum": [ "mins", "hours" ] }, "slotInterval": { "type": "number", "description": "Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.", "default": 30 }, "slotIntervalUnit": { "type": "string", "description": "Unit for slot interval.", "enum": [ "mins", "hours" ] }, "slotBuffer": { "type": "number", "description": "Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up" }, "slotBufferUnit": { "type": "string", "description": "Unit for slot buffer.", "enum": [ "mins", "hours" ] }, "preBuffer": { "type": "number", "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready" }, "preBufferUnit": { "type": "string", "description": "Unit for pre-buffer.", "enum": [ "mins", "hours" ] }, "appoinmentPerSlot": { "type": "number", "default": 1, "description": "Maximum bookings per slot (per user). Maximum seats per slot in case of Class Booking Calendar." }, "appoinmentPerDay": { "type": "number", "description": "Number of appointments that can be booked for a given day" }, "allowBookingAfter": { "type": "number", "description": "Minimum scheduling notice for events" }, "allowBookingAfterUnit": { "type": "string", "description": "Unit for minimum scheduling notice", "enum": [ "hours", "days", "weeks", "months" ], "example": "days" }, "allowBookingFor": { "type": "number", "description": "Minimum number of days/weeks/months for which to allow booking events" }, "allowBookingForUnit": { "type": "string", "description": "Unit for controlling the duration for which booking would be allowed for", "enum": [ "days", "weeks", "months" ], "example": "days" }, "openHours": { "description": "This is only to set the standard availability. For custom availability, use the availabilities property", "type": "array", "items": { "$ref": "#/components/schemas/OpenHour" } }, "enableRecurring": { "type": "boolean", "description": "Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this", "default": false }, "recurring": { "$ref": "#/components/schemas/Recurring" }, "formId": { "type": "string" }, "stickyContact": { "type": "boolean" }, "isLivePaymentMode": { "type": "boolean" }, "autoConfirm": { "type": "boolean", "default": true }, "shouldSendAlertEmailsToAssignedMember": { "type": "boolean" }, "alertEmail": { "type": "string" }, "googleInvitationEmails": { "type": "boolean", "default": false }, "allowReschedule": { "type": "boolean", "default": true }, "allowCancellation": { "type": "boolean", "default": true }, "shouldAssignContactToTeamMember": { "type": "boolean" }, "shouldSkipAssigningContactForExisting": { "type": "boolean" }, "notes": { "type": "string" }, "pixelId": { "type": "string" }, "formSubmitType": { "type": "string", "default": "ThankYouMessage", "enum": [ "RedirectURL", "ThankYouMessage" ] }, "formSubmitRedirectURL": { "type": "string" }, "formSubmitThanksMessage": { "type": "string" }, "availabilityType": { "type": "number", "description": "Determines which availability type to consider:\n- **1**: Only custom availabilities will be used.\n- **0**: Only open hours will be used.\n- **null**: Both custom availabilities and open hours will be considered.", "enum": [ 0, 1 ] }, "availabilities": { "description": "This is only to set the custom availability. For standard availability, use the openHours property", "type": "array", "items": { "$ref": "#/components/schemas/Availability" } }, "guestType": { "type": "string", "enum": [ "count_only", "collect_detail" ] }, "consentLabel": { "type": "string" }, "calendarCoverImage": { "type": "string", "example": "https://path-to-image.com" }, "lookBusyConfig": { "description": "Look Busy Configuration", "allOf": [ { "$ref": "#/components/schemas/LookBusyConfiguration" } ] }, "id": { "type": "string", "example": "0TkCdp9PfvLeWKYRRvIz" } }, "required": [ "locationId", "name", "id" ] }, "CalendarsGetSuccessfulResponseDTO": { "type": "object", "properties": { "calendars": { "type": "array", "items": { "$ref": "#/components/schemas/CalendarDTO" } } } }, "CalendarByIdSuccessfulResponseDTO": { "type": "object", "properties": { "calendar": { "$ref": "#/components/schemas/CalendarDTO" } }, "required": [ "calendar" ] }, "UpdateAvailability": { "type": "object", "properties": { "date": { "type": "string", "description": "Formulate the date string in the format of `T00:00:00.000Z`.", "example": "2023-09-24T00:00:00.000Z" }, "hours": { "type": "array", "items": { "$ref": "#/components/schemas/Hour" } }, "deleted": { "type": "boolean", "default": false }, "id": { "type": "string", "description": "The ID of the custom availability object. It is required while updating or deleting the existing custom date availability" } }, "required": [ "date", "hours" ] }, "CalendarUpdateDTO": { "type": "object", "properties": { "notifications": { "description": "🚨 Deprecated! Please use 'Calendar Notifications APIs' instead.", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/CalendarNotification" } }, "groupId": { "type": "string", "description": "Group Id", "example": "BqTwX8QFwXzpegMve9EQ" }, "teamMembers": { "description": "Team members are required for calendars of type: Round Robin, Collective, Class, Service. Personal calendar must have exactly one team member.", "type": "array", "items": { "$ref": "#/components/schemas/TeamMember" } }, "eventType": { "type": "string", "enum": [ "RoundRobin_OptimizeForAvailability", "RoundRobin_OptimizeForEqualDistribution" ] }, "name": { "type": "string", "example": "test calendar" }, "description": { "type": "string", "example": "this is used for testing" }, "slug": { "type": "string", "example": "test1" }, "widgetSlug": { "type": "string", "example": "test1" }, "widgetType": { "type": "string", "description": "Calendar widget type. Choose \"default\" for \"neo\" and \"classic\" for \"classic\" layout.", "example": "classic", "enum": [ "default", "classic" ], "default": "classic" }, "eventTitle": { "type": "string" }, "eventColor": { "type": "string", "default": "#039be5" }, "locationConfigurations": { "description": "Meeting location configuration for event calendar", "type": "array", "items": { "$ref": "#/components/schemas/LocationConfiguration" } }, "meetingLocation": { "type": "string", "description": "🚨 Deprecated! Use `locationConfigurations.location` or `teamMembers[].locationConfigurations.location` instead.", "deprecated": true, "readOnly": true }, "slotDuration": { "type": "number", "description": "This controls the duration of the meeting", "default": 30 }, "slotDurationUnit": { "type": "string", "description": "Unit for slot duration.", "enum": [ "mins", "hours" ] }, "preBufferUnit": { "type": "string", "description": "Unit for pre-buffer.", "enum": [ "mins", "hours" ] }, "slotInterval": { "type": "number", "description": "Slot interval reflects the amount of time the between booking slots that will be shown in the calendar.", "default": 30 }, "slotIntervalUnit": { "type": "string", "description": "Unit for slot interval.", "enum": [ "mins", "hours" ] }, "slotBuffer": { "type": "number", "description": "Slot-Buffer is additional time that can be added after an appointment, allowing for extra time to wrap up" }, "preBuffer": { "type": "number", "description": "Pre-Buffer is additional time that can be added before an appointment, allowing for extra time to get ready" }, "appoinmentPerSlot": { "type": "number" }, "appoinmentPerDay": { "type": "number", "description": "Number of appointments that can be booked for a given day" }, "allowBookingAfter": { "type": "number", "description": "Minimum scheduling notice for events" }, "allowBookingAfterUnit": { "type": "string", "description": "Unit for minimum scheduling notice", "enum": [ "hours", "days", "weeks", "months" ], "example": "days" }, "allowBookingFor": { "type": "number", "description": "Minimum number of days/weeks/months for which to allow booking events" }, "allowBookingForUnit": { "type": "string", "description": "Unit for controlling the duration for which booking would be allowed for", "enum": [ "days", "weeks", "months" ], "example": "days" }, "openHours": { "type": "array", "items": { "$ref": "#/components/schemas/OpenHour" } }, "enableRecurring": { "type": "boolean", "description": "Enable recurring appointments for the calendars. Please note that only one member should be added in the calendar to enable this", "default": false }, "recurring": { "$ref": "#/components/schemas/Recurring" }, "formId": { "type": "string" }, "stickyContact": { "type": "boolean" }, "isLivePaymentMode": { "type": "boolean" }, "autoConfirm": { "type": "boolean" }, "shouldSendAlertEmailsToAssignedMember": { "type": "boolean" }, "alertEmail": { "type": "string" }, "googleInvitationEmails": { "type": "boolean" }, "allowReschedule": { "type": "boolean" }, "allowCancellation": { "type": "boolean" }, "shouldAssignContactToTeamMember": { "type": "boolean" }, "shouldSkipAssigningContactForExisting": { "type": "boolean" }, "notes": { "type": "string" }, "pixelId": { "type": "string" }, "formSubmitType": { "type": "string", "default": "ThankYouMessage", "enum": [ "RedirectURL", "ThankYouMessage" ] }, "formSubmitRedirectURL": { "type": "string" }, "formSubmitThanksMessage": { "type": "string" }, "availabilityType": { "type": "number", "description": "Determines which availability type to consider:\n- **1**: Only custom availabilities will be used.\n- **0**: Only open hours will be used.\n- **null**: Both the custom availabilities and open hours will be considered.", "enum": [ 0, 1 ] }, "availabilities": { "description": "This is only to set the custom availability. For standard availability, use the openHours property", "type": "array", "items": { "$ref": "#/components/schemas/UpdateAvailability" } }, "guestType": { "type": "string", "enum": [ "count_only", "collect_detail" ] }, "consentLabel": { "type": "string" }, "calendarCoverImage": { "type": "string" }, "lookBusyConfig": { "description": "Look Busy Configuration", "allOf": [ { "$ref": "#/components/schemas/LookBusyConfiguration" } ] }, "isActive": { "type": "boolean" } } }, "CalendarDeleteSuccessfulResponseDTO": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Success", "example": "true" } }, "required": [ "success" ] }, "GetCalendarEventSuccessfulResponseDTO": { "type": "object", "properties": { "event": { "$ref": "#/components/schemas/CalendarEventDTO" } } }, "DeleteAppointmentSchema": { "type": "object", "properties": {} }, "DeleteEventSuccessfulResponseDto": { "type": "object", "properties": { "succeeded": { "type": "boolean", "example": true } } }, "NoteCreatedBySchema": { "type": "object", "properties": { "id": { "type": "string", "example": "TUcmRxWr" }, "name": { "type": "string", "example": "John Doe" } } }, "GetNoteSchema": { "type": "object", "properties": { "id": { "type": "string", "example": "HGPcayliwcdoUFzvbTok" }, "body": { "type": "string", "example": "lorem ipsum" }, "userId": { "type": "string", "example": "TUcmRxWrjqzJS8EjkxNK" }, "dateAdded": { "type": "string", "example": "2021-07-08T12:02:11.285Z" }, "contactId": { "type": "string", "example": "TUcmRxWrjqzJS8EjkxNK" }, "createdBy": { "$ref": "#/components/schemas/NoteCreatedBySchema" } } }, "GetNotesListSuccessfulResponseDto": { "type": "object", "properties": { "notes": { "type": "array", "items": { "$ref": "#/components/schemas/GetNoteSchema" } }, "hasMore": { "type": "boolean", "example": true } } }, "NotesDTO": { "type": "object", "properties": { "userId": { "type": "string", "example": "GCs5KuzPqTls7vWclkEV" }, "body": { "type": "string", "example": "lorem ipsum", "description": "Note body", "maxLength": 5000 } }, "required": [ "body" ] }, "GetCreateUpdateNoteSuccessfulResponseDto": { "type": "object", "properties": { "note": { "$ref": "#/components/schemas/GetNoteSchema" } } }, "DeleteNoteSuccessfulResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } }, "CalendarResourceByIdResponseDTO": { "type": "object", "properties": { "locationId": { "type": "string", "description": "Location ID of the resource" }, "name": { "type": "string", "description": "Name of the resource", "example": "yoga room" }, "resourceType": { "type": "string", "enum": [ "equipments", "rooms" ] }, "isActive": { "type": "boolean", "description": "Whether the resource is active" }, "description": { "type": "string", "description": "Description of the resource" }, "quantity": { "type": "number", "description": "Quantity of the resource" }, "outOfService": { "type": "number", "description": "Indicates if the resource is out of service", "example": 0 }, "capacity": { "type": "number", "description": "Capacity of the resource", "example": 85 }, "calendarIds": { "description": "Calendar IDs", "example": [ "Jsj0xnlDDjw0SuvX1J13", "oCM5feFC86FAAbcO7lJK" ], "type": "array", "items": { "type": "string" } } }, "required": [ "locationId", "name", "resourceType", "isActive", "calendarIds" ] }, "UpdateCalendarResourceDTO": { "type": "object", "properties": { "locationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number", "description": "Quantity of the equipment." }, "outOfService": { "type": "number", "description": "Quantity of the out of service equipment." }, "capacity": { "type": "number", "description": "Capacity of the room." }, "calendarIds": { "description": "Service calendar IDs to be mapped with the resource.\n\n One equipment can only be mapped with one service calendar.\n \nOne room can be mapped with multiple service calendars.", "maxItems": 100, "type": "array", "items": { "type": "string" } }, "isActive": { "type": "boolean" } } }, "CalendarResourceResponseDTO": { "type": "object", "properties": { "locationId": { "type": "string", "description": "Location ID of the resource" }, "name": { "type": "string", "description": "Name of the resource", "example": "yoga room" }, "resourceType": { "type": "string", "enum": [ "equipments", "rooms" ] }, "isActive": { "type": "boolean", "description": "Whether the resource is active" }, "description": { "type": "string", "description": "Description of the resource" }, "quantity": { "type": "number", "description": "Quantity of the resource" }, "outOfService": { "type": "number", "description": "Indicates if the resource is out of service", "example": 0 }, "capacity": { "type": "number", "description": "Capacity of the resource", "example": 85 } }, "required": [ "locationId", "name", "resourceType", "isActive" ] }, "ResourceDeleteResponseDTO": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Success", "example": "true" } } }, "CreateCalendarResourceDTO": { "type": "object", "properties": { "locationId": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "quantity": { "type": "number", "description": "Quantity of the equipment." }, "outOfService": { "type": "number", "description": "Quantity of the out of service equipment." }, "capacity": { "type": "number", "description": "Capacity of the room." }, "calendarIds": { "description": "Service calendar IDs to be mapped with the resource.\n\n One equipment can only be mapped with one service calendar.\n \nOne room can be mapped with multiple service calendars.", "maxItems": 100, "type": "array", "items": { "type": "string" } } }, "required": [ "locationId", "name", "description", "quantity", "outOfService", "capacity", "calendarIds" ] }, "SchedulesDTO": { "type": "object", "properties": { "timeOffset": { "type": "number" }, "unit": { "type": "string" } } }, "CalendarNotificationResponseDTO": { "type": "object", "properties": { "_id": { "type": "string", "description": "Notification ID" }, "receiverType": { "type": "string", "example": "contact", "enum": [ "contact", "guest", "assignedUser", "emails", "phoneNumbers", "business" ] }, "additionalEmailIds": { "example": [ "example1@email.com", "example2@email.com" ], "type": "array", "items": { "type": "string" } }, "additionalPhoneNumbers": { "example": [ "+919876744444", "+919876744445" ], "type": "array", "items": { "type": "string" } }, "channel": { "type": "string", "example": "email", "enum": [ "email", "inApp", "sms", "whatsapp" ] }, "notificationType": { "type": "string", "example": "confirmation", "enum": [ "booked", "confirmation", "cancellation", "reminder", "followup", "reschedule" ] }, "isActive": { "type": "boolean", "example": true }, "additionalWhatsappNumbers": { "example": [ "+919876744444", "+919876744445" ], "type": "array", "items": { "type": "string" } }, "templateId": { "type": "string", "example": "0as9d8as0d" }, "body": { "type": "string", "example": "This is a test notification" }, "subject": { "type": "string", "example": "Test Notification" }, "afterTime": { "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "beforeTime": { "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "selectedUsers": { "example": [ "user1", "user2" ], "type": "array", "items": { "type": "string" } }, "deleted": { "type": "boolean", "example": false } } }, "CreateCalendarNotificationDTO": { "type": "object", "properties": { "receiverType": { "type": "string", "description": "notification recipient type", "enum": [ "contact", "guest", "assignedUser", "emails", "phoneNumbers", "business" ] }, "channel": { "type": "string", "description": "Notification channel", "enum": [ "email", "inApp", "sms", "whatsapp" ] }, "notificationType": { "type": "string", "description": "Notification type", "enum": [ "booked", "confirmation", "cancellation", "reminder", "followup", "reschedule" ] }, "isActive": { "type": "boolean", "description": "Is the notification active", "default": true }, "templateId": { "type": "string", "description": "Template ID for email notification. Not necessary for in-App notification" }, "body": { "type": "string", "description": "Body for email notification. Not necessary for in-App notification" }, "subject": { "type": "string", "description": "Subject for email notification. Not necessary for in-App notification" }, "afterTime": { "description": "Specifies the time after which the follow-up notification should be sent. This is not required for other notification types.", "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "beforeTime": { "description": "Specifies the time before which the reminder notification should be sent. This is not required for other notification types.", "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "additionalEmailIds": { "description": "Additional email addresses to receive notifications.", "example": [ "example1@email.com", "example2@email.com" ], "type": "array", "items": { "type": "string" } }, "additionalPhoneNumbers": { "description": "Additional phone numbers to receive notifications.", "example": [ "+919876744444", "+919876744445" ], "type": "array", "items": { "type": "string" } }, "selectedUsers": { "description": "Selected users for in-App and business email notifications. Supports user IDs and special keyword \"sub_account_admin\"", "example": [ "userId1", "userId2", "sub_account_admin" ], "type": "array", "items": { "type": "string" } }, "fromAddress": { "type": "string", "description": "from address for email notification" }, "fromName": { "type": "string", "description": "from name for email/sms notification" }, "fromNumber": { "type": "string", "description": "from number for sms notification" } }, "required": [ "receiverType", "channel", "notificationType" ] }, "UpdateCalendarNotificationsDTO": { "type": "object", "properties": { "receiverType": { "type": "string", "description": "Notification recipient type", "enum": [ "contact", "guest", "assignedUser", "emails", "phoneNumbers", "business" ] }, "additionalEmailIds": { "description": "Additional email addresses to receive notifications.", "example": [ "example1@email.com", "example2@email.com" ], "type": "array", "items": { "type": "string" } }, "additionalPhoneNumbers": { "description": "Additional phone numbers to receive notifications.", "example": [ "+919876744444", "+919876744445" ], "type": "array", "items": { "type": "string" } }, "selectedUsers": { "description": "Selected users for in-App and business email notifications. Supports user IDs and special keyword \"sub_account_admin\"", "example": [ "userId1", "userId2", "sub_account_admin" ], "type": "array", "items": { "type": "string" } }, "channel": { "type": "string", "description": "Notification channel", "enum": [ "email", "inApp", "sms", "whatsapp" ] }, "notificationType": { "type": "string", "description": "Notification type", "enum": [ "booked", "confirmation", "cancellation", "reminder", "followup", "reschedule" ] }, "isActive": { "type": "boolean", "description": "Is the notification active", "default": true }, "deleted": { "type": "boolean", "description": "Marks the notification as deleted (soft delete)", "default": false }, "templateId": { "type": "string", "description": "Template ID for email notification" }, "body": { "type": "string", "description": "Body for email notification. Not necessary for in-App notification" }, "subject": { "type": "string", "description": "Subject for email notification. Not necessary for in-App notification" }, "afterTime": { "description": "Specifies the time after which the follow-up notification should be sent. This is not required for other notification types.", "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "beforeTime": { "description": "Specifies the time before which the reminder notification should be sent. This is not required for other notification types.", "example": [ { "timeOffset": 1, "unit": "hours" } ], "type": "array", "items": { "$ref": "#/components/schemas/SchedulesDTO" } }, "fromAddress": { "type": "string", "description": "From address for email notification" }, "fromNumber": { "type": "string", "description": "from number for sms notification" }, "fromName": { "type": "string", "description": "From name for email/sms notification" } } }, "CalendarNotificationDeleteResponseDTO": { "type": "object", "properties": { "message": { "type": "string", "description": "Result of delete/update operation" } }, "required": [ "message" ] }, "ScheduleIntervalDTO": { "type": "object", "properties": { "from": { "type": "string", "description": "Start time in HH:MM format (24-hour format)", "example": "09:00", "pattern": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$" }, "to": { "type": "string", "description": "End time in HH:MM format (24-hour format)", "example": "17:00", "pattern": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$" } }, "required": [ "from", "to" ] }, "ScheduleRuleDTO": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "wday", "date" ], "description": "Type of schedule rule - weekday (recurring) or date (specific date)", "example": "wday" }, "intervals": { "description": "Time intervals for the rule (e.g., 9 AM to 5 PM)", "example": [ { "from": "09:00", "to": "17:00" } ], "type": "array", "items": { "$ref": "#/components/schemas/ScheduleIntervalDTO" } }, "date": { "type": "string", "description": "Specific date in YYYY-MM-DD format (only for date-type rules)", "example": "2023-04-15", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "day": { "type": "string", "enum": [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ], "description": "Day of week (only for weekday-type rules)", "example": "monday" } }, "required": [ "type", "intervals" ] }, "ScheduleObjectResponseDTO": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the schedule", "example": "IkqiJlXJ7o9h61tCHHod" }, "name": { "type": "string", "description": "Human-readable name for the schedule", "example": "Business Hours Schedule" }, "locationId": { "type": "string", "description": "Location ID where this schedule applies", "example": "IkqiJlXJ7o9h61tCHHod" }, "rules": { "description": "Schedule rules defining when the schedule is active", "type": "array", "items": { "$ref": "#/components/schemas/ScheduleRuleDTO" } }, "timezone": { "type": "string", "description": "Timezone for the schedule (IANA timezone identifier)", "example": "America/New_York" }, "dateAdded": { "type": "string", "description": "ISO date string when the schedule was created", "example": "2023-01-15T10:30:00.000Z" }, "dateUpdated": { "type": "string", "description": "ISO date string when the schedule was last updated", "example": "2023-01-20T14:45:00.000Z" }, "userId": { "type": "string", "description": "User ID associated with the schedule", "example": "IkqiJlXJ7o9h61tCHHod" }, "calendarIds": { "description": "Calendar IDs associated with the schedule", "type": "array", "items": { "type": "string" } }, "deleted": { "type": "boolean", "description": "Whether the schedule has been deleted", "example": false } }, "required": [ "id", "name", "locationId", "rules", "timezone", "dateAdded", "dateUpdated", "userId", "deleted" ] }, "GetAllSchedulesResponseDTO": { "type": "object", "properties": { "schedules": { "description": "Array of schedules", "type": "array", "items": { "$ref": "#/components/schemas/ScheduleObjectResponseDTO" } } }, "required": [ "schedules" ] }, "ScheduleResponseDTO": { "type": "object", "properties": { "schedule": { "description": "Schedule", "allOf": [ { "$ref": "#/components/schemas/ScheduleObjectResponseDTO" } ] } }, "required": [ "schedule" ] }, "CreateScheduleDTO": { "type": "object", "properties": { "rules": { "description": "Schedule rules defining when the schedule is active", "example": [ { "type": "wday", "day": "monday", "intervals": [ { "from": "09:00", "to": "17:00" } ] } ], "type": "array", "items": { "$ref": "#/components/schemas/ScheduleRuleDTO" } }, "timezone": { "type": "string", "description": "Timezone for the schedule (IANA timezone identifier)", "example": "America/New_York", "pattern": "^[A-Za-z_]+/[A-Za-z_]+$" }, "locationId": { "type": "string", "description": "Location ID where this schedule applies", "example": "IkqiJlXJ7o9h61tCHHod" }, "name": { "type": "string", "description": "Human-readable name for the schedule", "example": "Business Hours Schedule" }, "userId": { "type": "string", "description": "User ID associated with the schedule", "example": "IkqiJlXJ7o9h61tCHHod" }, "calendarIds": { "description": "Calendar IDs associated with the schedule", "example": [ "WvVX9LpvlBO6K506xLbp", "XyZ8MnQrStUvWxYzAbCdEf" ], "type": "array", "items": { "type": "string" } } }, "required": [ "timezone", "locationId", "name", "userId" ] }, "UpdateScheduleDTO": { "type": "object", "properties": { "name": { "type": "string", "description": "Human-readable name for the schedule", "example": "Updated Business Hours" }, "rules": { "description": "Updated schedule rules defining when the schedule is active", "example": [ { "type": "wday", "day": "monday", "intervals": [ { "from": "08:00", "to": "18:00" } ] } ], "type": "array", "items": { "$ref": "#/components/schemas/ScheduleRuleDTO" } }, "timezone": { "type": "string", "description": "Updated timezone for the schedule (IANA timezone identifier)", "example": "America/Los_Angeles", "pattern": "^[A-Za-z_]+/[A-Za-z_]+$" } } } } }, "x-tagGroups": { "name": "Calendars", "tags": [ "Calendars", "Calendar Groups", "Calendar Events", "Appointment Notes", "Calendar Resources: Rooms & Equipments", "Calendar Notifications", "Availability" ] } }