Saltar al contenido principal

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

HeaderRequiredDescription
Content-TypeYesMust be application/json
AuthorizationYesFormat: 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:

  1. Notification Actions

    • All associated guests are notified (if configured)
    • Calendar owner is notified
    • Service provider is notified (if applicable)
  2. Resource Updates

    • Calendar availability is updated
    • Service slots are freed
    • Related resources are released
    • Linked video conferences are cancelled
  3. System Updates

    • Historical records are maintained
    • Audit logs are updated
    • Analytics are adjusted
    • Search indexes are updated

🔐 Required Permissions

  1. 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

  1. Pre-deletion Checks

    • Confirm deletion intent with users
    • Check appointment status
    • Verify guest notification preferences
    • Review linked resources
  2. Deletion Strategy

    • Consider using cancellation for future appointments
    • Archive important information before deletion
    • Document deletion reasons
    • Handle recurring appointments properly
  3. Error Handling

    • Implement proper rollback mechanisms
    • Handle notification failures gracefully
    • Log deletion failures
    • Monitor deletion patterns
  4. User Communication

    • Send clear cancellation notices
    • Include rescheduling options
    • Provide support contact
    • Explain deletion reasons

📘 Notes

  1. Data Retention

    • Soft deletion is used by default
    • Data retained for compliance period
    • Audit logs maintained indefinitely
    • Recovery possible within retention period
  2. Compliance

    • State changes tracked