Contents
On this page
Move Booking - Plugixa Car Wash
POST /plugixa-carwash/v1/bookings/{id}/move
Move a booking that has not started to another date, time, bay or team at the same location.
Needs the plugixa_carwash_edit capability.
Note. Only the time and the bay change. The booking keeps its duration and its price, and, as for a staff booking, the opening hours and the time grid are not checked: the bay just has to be free.
Request
POST https://your-site.example/wp-json/plugixa-carwash/v1/bookings/42/move
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The booking’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
date |
string |
Yes | Y-m-d, in the location’s time zone. |
time |
string |
Yes | H:i, in the location’s time zone. |
resource_id |
integer |
No | A bay or team at the same location. Left out, the first suitable free one is chosen, which may be another bay than today’s. |
The move is written in the history as “Moved from” the old local date and time, and fires the booking.moved webhook PRO.
{
"date": "2026-11-14",
"time": "11:00",
"resource_id": 6
}
Responses
200 OK. data is the booking at its new time.
{
"success": true,
"data": {
"id": 42,
"number": "CW2026-0042",
"form_id": null,
"location_id": 3,
"resource_id": 6,
"customer_id": 25,
"customer_vehicle_id": 31,
"vehicle_type_id": 2,
"package_id": 4,
"start_at": "2026-11-14 17:00:00",
"end_at": "2026-11-14 18:00:00",
"blocked_until": "2026-11-14 18:10:00",
"duration": 60,
"status": "confirmed",
"hold_expires_at": null,
"first_name": "Lucas",
"last_name": "Bernard",
"email": "lucas@example.com",
"phone": "+1 217 555 0199",
"company": "",
"vehicle_make": "Toyota RAV4",
"vehicle_plate": "ABC1234",
"address": "",
"message": "",
"agreements": [],
"currency": "USD",
"subtotal": 49.0,
"discount": 0.0,
"coupon_code": "",
"tax": 3.06,
"total": 52.06,
"payment_method": "cash",
"payment_status": "unpaid",
"source": "staff",
"page_url": "",
"staff_notes": "Regular customer",
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 10:20:00",
"deleted_at": null,
"items": [
{
"role": "package",
"item_id": 4,
"name": "Deluxe",
"price": 49.0,
"duration": 60
}
],
"events": [
{
"from": "",
"to": "confirmed",
"note": "Booked by staff",
"user_id": 1,
"created_at": "2026-11-12 09:30:00"
},
{
"from": "confirmed",
"to": "confirmed",
"note": "Moved from 2026-11-14 09:00",
"user_id": 1,
"created_at": "2026-11-12 10:20:00"
}
],
"next": [
"in_progress",
"completed",
"cancelled",
"no_show"
],
"location": {
"id": 3,
"name": "Riverside"
},
"local_date": "2026-11-14",
"local_time": "11:00",
"resource": {
"id": 6,
"name": "Bay 2",
"color": "#22C55E"
},
"payments": []
}
}
| Field | Type | Meaning |
|---|---|---|
data.start_at |
string |
New UTC start |
data.resource_id |
integer |
The bay or team it is on now |
data.local_date |
string |
New local date |
data.local_time |
string |
New local time |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_carwash_not_found |
No booking with that id, or it is in the trash. |
409 |
plugixa_carwash_not_movable |
The booking is in_progress, completed, cancelled or no_show: only hold, pending and confirmed bookings move. |
422 |
plugixa_carwash_invalid_time |
date or time is missing or not in the right format. |
422 |
plugixa_carwash_invalid_resource |
resource_id is not a bay or team at this location. |
409 |
plugixa_carwash_slot_taken |
The chosen bay, or every suitable bay, is booked at the new time. |
503 |
plugixa_carwash_busy |
Too many bookings were being made at that location at once. Try again. |
409 |
plugixa_carwash_conflict |
You sent modified_at and somebody saved the booking since. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-carwash/v1/bookings/42/move" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"date":"2026-11-14","time":"11:00","resource_id":6}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-carwash/v1/bookings/42/move');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'date' => '2026-11-14',
'time' => '11:00',
'resource_id' => 6,
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-carwash/v1/bookings/42/move', {
method: 'POST',
headers: {
'Authorization': `Basic ${auth}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ date: '2026-11-14', time: '11:00', resource_id: 6 }),
});
const { data } = await response.json();
Quick Links
Share