Saltar al contenido principal

Delete Booking Service

This endpoint allows you to permanently remove a booking service from the system. This operation cannot be undone and should be used with caution, especially if there are existing appointments.

🔹 Endpoint Details

DELETE /api/v1/booking-services/{id}

🔒 Authentication

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

📝 Request Structure

Path Parameters

ParameterTypeRequiredDescriptionExample
idstring (UUID)YesUnique identifier of the service to delete1610c525-f19a-40d0-8cd1-03daba3d2d98

🧩 Request Example

curl -X DELETE "https://openapi.onlive.site/api/v1/booking-services/1610c525-f19a-40d0-8cd1-03daba3d2d98" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

📤 Response Format

Successful Response (200 OK)

{
"id": "1610c525-f19a-40d0-8cd1-03daba3d2d98",
"name": "Test Drive Standard",
"duration": 30,
"createdAt": "2025-03-09T19:32:03.735Z",
"updatedAt": "2025-03-09T19:32:06.669Z",
"deletedAt": "2025-03-09T20:00:00.000Z"
}

❌ Error Responses

401 Unauthorized

{
"statusCode": 401,
"message": "Invalid or missing authorization credentials"
}

403 Forbidden

{
"statusCode": 403,
"message": "Cannot delete service with active appointments"
}

404 Not Found

{
"statusCode": 404,
"message": "Service not found"
}

📘 Notes

  • This operation permanently removes the service
  • All service configuration will be deleted
  • Future appointments will be affected
  • The deletion cannot be undone
  • System tracks deletion time (deletedAt)
  • Only services in your organization can be deleted
  • Consider using deactivation instead of deletion

⚠️ Pre-deletion Checklist

  1. Appointment Review

    • Check for existing appointments
    • Notify affected users
    • Consider rescheduling options
  2. Resource Review

    • Check calendar associations
    • Review asset assignments
    • Document configurations
  3. System Impact

    • Evaluate scheduling impact
    • Check integration dependencies
    • Review automated processes

🔄 Post-deletion Actions

  1. System Updates

    • Update service listings
    • Adjust calendar availability
    • Clean up asset associations
  2. User Communication

    • Notify affected users
    • Update service catalogs
    • Remove from bookings
  3. Data Management

    • Archive service data
    • Update reports
    • Clean cache

✅ Best Practices

  • 🔍 Verify ID: Double-check service ID before deletion
  • 📊 Document Reason: Keep records of deletion reasons
  • 🔐 Access Control: Ensure proper authorization
  • 📱 Notification: Inform relevant stakeholders
  • 🔄 Alternative: Consider deactivating instead of deleting

🚫 Limitations

  1. Cannot Delete If

    • Active appointments exist
    • Service is in use by integrations
    • Required by system processes
  2. System Constraints

    • Operation is permanent
    • No partial deletion
    • All or nothing process