Delete Appointment
This endpoint allows you to delete an existing appointment from the system. This operation is permanent and cannot be undone.
πΉ Endpoint Detailsβ
DELETE /api/v1/appointments/{appointmentId}
π Authenticationβ
Header | Required | Description |
---|---|---|
Content-Type | Yes | Must be application/json |
Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π§© Request Examplesβ
Basic Delete Requestβ
curl -X DELETE "https://openapi.onlive.site/api/v1/appointments/1610c525-f19a-40d0-8cd1-03daba3d2d98" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
Delete with Notificationβ
curl -X DELETE "https://openapi.onlive.site/api/v1/appointments/1610c525-f19a-40d0-8cd1-03daba3d2d98?notify=true" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
π€ Response Formatβ
Success Response (200 OK)β
{
"id": "1610c525-f19a-40d0-8cd1-03daba3d2d98",
"status": "deleted",
"deletedAt": "2025-03-09T19:32:06.669Z"
}
β Error Responsesβ
400 Bad Requestβ
{
"statusCode": 400,
"message": "Invalid appointment ID format",
"errors": [
{
"field": "appointmentId",
"message": "Must be a valid UUID"
}
]
}
403 Forbiddenβ
{
"statusCode": 403,
"message": "Insufficient permissions to delete this appointment"
}
404 Not Foundβ
{
"statusCode": 404,
"message": "Appointment not found"
}
409 Conflictβ
{
"statusCode": 409,
"message": "Cannot delete appointment in current state",
"errors": [
{
"field": "state",
"message": "Appointment is locked or in progress"
}
]
}
π Side Effectsβ
When an appointment is deleted:
-
Notification Actions
- All associated guests are notified (if configured)
- Calendar owner is notified
- Service provider is notified (if applicable)
-
Resource Updates
- Calendar availability is updated
- Service slots are freed
- Related resources are released
- Linked video conferences are cancelled
-
System Updates
- Historical records are maintained
- Audit logs are updated
- Analytics are adjusted
- Search indexes are updated
π Required Permissionsβ
- Basic Delete Permission
- Organization-level delete permission
- Calendar-specific delete permission (if applicable)
- Service-specific delete permission (if appointment is tied to a service)
π‘ Best Practicesβ
-
Pre-deletion Checks
- Confirm deletion intent with users
- Check appointment status
- Verify guest notification preferences
- Review linked resources
-
Deletion Strategy
- Consider using cancellation for future appointments
- Archive important information before deletion
- Document deletion reasons
- Handle recurring appointments properly
-
Error Handling
- Implement proper rollback mechanisms
- Handle notification failures gracefully
- Log deletion failures
- Monitor deletion patterns
-
User Communication
- Send clear cancellation notices
- Include rescheduling options
- Provide support contact
- Explain deletion reasons
π Notesβ
-
Data Retention
- Soft deletion is used by default
- Data retained for compliance period
- Audit logs maintained indefinitely
- Recovery possible within retention period
-
Compliance
- State changes tracked