Saltar al contenido principal

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

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

📝 Request Structure

Path Parameters

ParameterTypeRequiredDescriptionExample
idstringYesA valid appointment ID.123e4567-e89b-12d3-a456-426614174000

Body Fields (CancelAppointmentDto)

FieldTypeRequiredDescriptionExample
statusstringNoAppointment status to set (e.g., cancelled)"cancelled"
subStatusstringNoAppointment sub status (e.g., user-request)"cancelled"
guestsarray of stringNoEmail list of guests to cancel["[email protected]", "[email protected]"]
strategyenumNoCancellation strategy. One of: guest-only, guest-appointment (default)."guest-only"

Notes:

  • If strategy is guest-only, only guests are cancelled.
  • If strategy is guest-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 organizationId is automatically set from your authentication credentials.
  • Cancellation may trigger notifications depending on configuration.
  • When using guest-only strategy, the appointment remains active for other guests.
  • Access control: Requires permission to manage the appointment and its guests.