Saltar al contenido principal

Delete Weekly Availability

This endpoint allows you to permanently remove a weekly availability schedule from the system. This operation cannot be undone and should be used with caution.

🔹 Endpoint Details

DELETE /api/v1/weekly-schedules/{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 schedule to delete"f57b71ad-c1cc-4af6-853b-616ecb7d234c"

🧩 Request Example

curl -X DELETE "https://openapi.onlive.site/api/v1/weekly-schedules/f57b71ad-c1cc-4af6-853b-616ecb7d234c" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"

📤 Response Format

Successful Response (200 OK)

{
"id": "f57b71ad-c1cc-4af6-853b-616ecb7d234c",
"name": "Test Drive Availability",
"calendarId": "4fb502ee-35cf-4e75-ad68-49b46b505a46",
"createdAt": "2025-05-22T12:45:06.490Z",
"updatedAt": "2025-05-22T12:45:06.490Z",
"deletedAt": "2025-05-22T13:00:00.000Z"
}

❌ Error Responses

401 Unauthorized

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

403 Forbidden

{
"statusCode": 403,
"message": "User does not have permission to delete this schedule"
}

404 Not Found

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

📘 Notes

  • This operation permanently removes the schedule
  • All schedule configurations will be deleted
  • Future availability will be affected
  • The deletion cannot be undone
  • System tracks deletion time (deletedAt)
  • Only schedules in your organization can be deleted
  • Consider updating instead of deleting if temporary change needed

⚠️ Pre-deletion Checklist

  1. Service Impact

    • Check associated services
    • Review dependent schedules
    • Document configurations
  2. Availability Review

    • Check future appointments
    • Review service availability
    • Consider business impact
  3. System Impact

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

🔄 Post-deletion Actions

  1. System Updates

    • Update service configurations
    • Adjust availability calculations
    • Clean up related data
  2. Service Management

    • Update service availability
    • Modify booking rules
    • Adjust scheduling options
  3. Documentation

    • Update schedule records
    • Archive configurations
    • Document changes

✅ Best Practices

  • 🔍 Verify ID: Double-check schedule ID before deletion
  • 📊 Document Reason: Keep records of deletion reasons
  • 🔐 Access Control: Ensure proper authorization
  • 📱 Communication: Inform affected stakeholders
  • 🔄 Alternative: Consider deactivation instead of deletion

🚫 Limitations

  1. Cannot Delete If

    • Schedule is required by system
    • Active appointments depend on it
    • Required by service configuration
  2. System Constraints

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