Overview
Partially updates an existing booking. You can reschedule the booking to a new date and/or timeslot, add notes, or update your externalReference.
Only bookings in in progress or waiting payment status can be updated. Attempting to update a booking in any other status will return a 422 error.
Endpoint
PATCH /partners/bookings/:bookingId
Authentication
Requires a valid API Key with the partner_bookings_update permission.
Path Parameters
| Parameter | Type | Required | Description |
|---|
bookingId | UUID | Yes | The booking ID returned at creation time. |
Request Body
All fields are optional. Only include the fields you want to change.
{
"date": "2026-06-25",
"timeslot": {
"startAt": "10:00",
"endAt": "13:00"
},
"notes": "Customer prefers the team to arrive exactly on time.",
"externalReference": "ORDER-20260615-001-V2"
}
| Field | Type | Required | Description |
|---|
date | ISO date string | No | New service date (YYYY-MM-DD in Riyadh local time). |
timeslot | object | No | New timeslot. If provided, both startAt and endAt should be included. |
timeslot.startAt | string | No | New start time (HH:MM or HH:MM:SS). |
timeslot.endAt | string | No | New end time (HH:MM or HH:MM:SS). |
notes | string | No | Free-text notes about the booking. |
externalReference | string | No | Updates your external reference. Must be unique within your partner account. Max 150 characters. |
Example Request
curl -X PATCH "https://apiv3.thecleanlife.dev/v1/partners/bookings/11111111-0000-0000-0000-000000000001" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-06-25",
"timeslot": {
"startAt": "10:00",
"endAt": "13:00"
}
}'
Success Response
HTTP Status: 200 OK
{
"success": true,
"data": {
"bookingId": "11111111-0000-0000-0000-000000000001",
"externalReference": "ORDER-20260615-001",
"appointmentId": "22222222-0000-0000-0000-000000000002",
"status": "in progress",
"paymentStatus": "NOT_REQUIRED",
"trackingReference": "SA-0042",
"date": "2026-06-25T00:00:00.000Z",
"timeslot": {
"startAt": "10:00",
"endAt": "13:00",
"endsAtNextDay": false
},
"appointment": {
"id": "22222222-0000-0000-0000-000000000002",
"name": "SA-0042",
"status": "Scheduled",
"scheduledStartDateTime": "2026-06-25T10:00:00+03:00",
"scheduledEndDateTime": "2026-06-25T13:00:00+03:00"
}
}
}
Error Responses
| HTTP Status | Code | Description |
|---|
400 | VALIDATION_ERROR | Invalid field values |
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | Missing partner_bookings_update permission |
404 | RESOURCE_NOT_FOUND | Booking not found or does not belong to your partner account |
409 | DUPLICATE_EXTERNAL_REFERENCE | The new externalReference is already used by another booking |
422 | BOOKING_NOT_EDITABLE | Booking status is not in progress or waiting payment |
422 | BOOKING_APPOINTMENT_NOT_FOUND | Cannot reschedule — no service appointment exists |
Business Rules
-
Status restriction. Only bookings in
in progress or waiting payment can be updated. Completed, cancelled, and failed bookings are immutable.
-
Rescheduling. If you provide a new
date or timeslot, the linked service appointment is updated with the new schedule.
-
Partial timeslot update. If you provide only
date without timeslot (or vice versa), the existing values are preserved. For example, providing only a new date keeps the existing startAt/endAt times.
-
Overnight bookings. The
endsAtNextDay flag is preserved from the original booking during rescheduling.
-
externalReference upsert. If the booking did not have an externalReference at creation time, providing one in an update will associate it. If a reference already exists, it is updated (subject to uniqueness).
-
Webhook on update. A
booking.updated webhook event is fired after a successful update.
Notes
- The
notes field is saved on the booking but is not returned in the API response.
- Verifying timeslot availability before rescheduling is recommended to avoid scheduling conflicts.
GET /partners/bookings/:bookingId/status — Verify current booking status before updating
GET /partners/timeslots/available — Check available slots for the new date
PATCH /partners/bookings/:bookingId/cancel — Cancel the booking