Skip to main content

Overview

Returns the list of active customer cancellation reasons supported by CleanLife. You must call this endpoint before cancelling a booking and pass the chosen reasonId in PATCH /partners/bookings/:bookingId/cancel.

Endpoint

GET /partners/bookings/cancellation-reasons

Authentication

Requires a valid API Key with the partner_bookings_cancel permission.

Example Request

curl -X GET "https://apiv3.thecleanlife.dev/v1/partners/bookings/cancellation-reasons" \
  -H "x-api-key: YOUR_API_KEY"

Success Response

HTTP Status: 200 OK
{
  "success": true,
  "data": [
    {
      "id": "aaaaaaaa-0000-0000-0000-000000000001",
      "nameEn": "Customer changed plans",
      "nameAr": "العميل غيّر خطته"
    },
    {
      "id": "bbbbbbbb-0000-0000-0000-000000000002",
      "nameEn": "Wrong date or time selected",
      "nameAr": "تاريخ أو وقت غير صحيح"
    }
  ]
}

Response fields

FieldTypeDescription
idUUIDCancellation reason ID — pass as reasonId when cancelling a booking
nameEnstringEnglish label (display to English-speaking users)
nameArstringArabic label (display to Arabic-speaking users)

Error Responses

HTTP StatusCodeDescription
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENMissing partner_bookings_cancel permission

Notes

  • Cache this list with a moderate TTL (e.g. 1–24 hours). Reasons change infrequently.
  • Only active customer-facing reasons are returned.
  • reasonId is required when calling the cancel endpoint.

  • PATCH /partners/bookings/:bookingId/cancel — Cancel a booking using a reasonId from this list
  • GET /partners/bookings/:bookingId/status — Verify booking status before cancelling