Cancel Appointment
Cancel an appointment or selected guests of an appointment.
This endpoint uses the v2 controller (AppointmentController) and the request body follows CancelAppointmentDto.
πΉ Endpoint Detailsβ
POST /api/v2/appointments/{id}/cancel
π Authenticationβ
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Request Structureβ
Path Parametersβ
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | Yes | A valid appointment ID. | 123e4567-e89b-12d3-a456-426614174000 |
Body Fields (CancelAppointmentDto)β
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
status | string | No | Appointment status to set (e.g., cancelled) | "cancelled" |
subStatus | string | No | Appointment sub status (e.g., user-request) | "cancelled" |
guests | array of string | No | Email list of guests to cancel | ["[email protected]", "[email protected]"] |
strategy | enum | No | Cancellation strategy. One of: guest-only, guest-appointment (default). | "guest-only" |
Notes:
- If
strategyisguest-only, only guests are cancelled. - If
strategyisguest-appointment(default), cancelling target guests also cancels the appointment when appropriate by business rules.
π§© Request Examplesβ
Cancel Entire Appointmentβ
curl -X POST "https://openapi.onlive.site/api/v2/appointments/1610c525-f19a-40d0-8cd1-03daba3d2d98/cancel" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"status": "cancelled",
"subStatus": "user-request"
}'
Cancel Specific Guests Onlyβ
curl -X POST "https://openapi.onlive.site/api/v2/appointments/1610c525-f19a-40d0-8cd1-03daba3d2d98/cancel" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"guests": [
"[email protected]",
"[email protected]"
],
"strategy": "guest-only"
}'
π€ Response Format (HTTP 200)β
Returns the updated Appointment object.
{
"id": "1610c525-f19a-40d0-8cd1-03daba3d2d98",
"createdAt": "2025-03-09T19:32:03.735Z",
"updatedAt": "2025-03-09T19:45:06.669Z",
"title": "Product Demo Meeting",
"description": "Product demonstration with new features",
"lang": "en-US",
"startAt": "2025-05-20T14:00:00Z",
"endAt": "2025-05-20T15:00:00Z",
"calendarIds": ["af6c6be0-689a-4cf3-a8c8-550dd97b3a6b"],
"serviceId": "01392598-e4b2-4810-ac7c-8c9cf4286a26",
"reminders": [
{
"time": 10,
"unit": "m",
"direction": "before"
}
],
"guests": [
{
"email": "[email protected]"
}
],
"extraFields": {
"priority": "high",
"location": "Conference Room A"
},
"status": "cancelled",
"cancellationOrigin": "user",
"cancelledAt": "2025-03-09T19:45:06.669Z",
"origin": "web"
}
β Error Responsesβ
This endpoint follows the standard error format.
π Notesβ
- The
organizationIdis automatically set from your authentication credentials. - Cancellation may trigger notifications depending on configuration.
- When using
guest-onlystrategy, the appointment remains active for other guests. - Access control: Requires permission to manage the appointment and its guests.