Contents
On this page

Update Booking - Plugixa Chauffeur

PUT /plugixa-chauffeur/v1/bookings/{id}

Change the fields you send and keep the others: confirm, complete or cancel a booking, assign a driver, or fix its details.

Needs a signed-in user with the plugixa_chauffeur_manage capability (administrators have it after activation).

A status change sends an e-mail. When status changes, the customer gets the status e-mail for the new status, if e-mails are on. See Emails.

Note. price_total is recalculated as price_base + price_distance + price_time only when the body holds at least one of those three. Then any pricing-rule adjustment or flat-rate price the booking had is replaced by the plain sum. Without them, the stored total is left alone.

Request

PUT https://your-site.example/wp-json/plugixa-chauffeur/v1/bookings/42

Path parameters

Name Type Description
id integer The booking’s id

Request body

Content type: application/json

Field Type Required Description
status string No pending, processing, completed, cancelled, on_hold, refunded or failed. Anything else is saved as pending.
service_type string No distance, hourly, or flat with Pro. Stored as sent.
transfer_type string No one_way or return. Stored as sent.
booking_form_id integer No The form the booking belongs to. 0 or empty stores null.
vehicle_id integer No The vehicle. 0 or empty stores null. Not checked against existing vehicles.
driver_id integer No The driver PRO. 0 or empty stores null. Not checked against existing drivers.
pickup_address string No Plain text.
dropoff_address string No Plain text.
pickup_lat number No Pickup latitude.
pickup_lng number No Pickup longitude.
dropoff_lat number No Drop-off latitude.
dropoff_lng number No Drop-off longitude.
pickup_datetime string No YYYY-MM-DD HH:MM:SS, site local time. Stored as sent, without a format check.
return_datetime string No The same, for the return leg.
distance_km number No Trip distance.
duration_hours number No Hours booked.
travel_minutes integer No Expected travel time.
passengers integer No Default 1.
luggage integer No Default 0.
customer_name string No Plain text.
customer_email string No Characters not allowed in an e-mail address are removed. Not otherwise validated.
customer_phone string No Plain text.
notes string No Plain text, line breaks kept.
price_base number No Base fare.
price_distance number No Distance part of the fare.
price_time number No Time part of the fare.
currency string No For example EUR.
payment_method string No For example cash, wire, pickup or stripe. Stored as sent.
payment_status string No For example unpaid or paid. Stored as sent.

A merge: fields you leave out keep their value. For booking_form_id, vehicle_id and driver_id, sending null or 0 clears the link. The other fields cannot be cleared by sending null. booking_number and price_total cannot be sent.

{
  "status": "completed",
  "driver_id": 2
}

Responses

200 OK. data is the updated booking.

{
  "success": true,
  "message": "",
  "data": {
    "id": "42",
    "booking_number": "PXC-20261112-0815",
    "booking_form_id": 1,
    "service_type": "distance",
    "transfer_type": "one_way",
    "status": "completed",
    "vehicle_id": 3,
    "driver_id": 2,
    "pickup_address": "Paris Charles de Gaulle Airport, Terminal 2E",
    "pickup_lat": null,
    "pickup_lng": null,
    "dropoff_address": "Hotel Lutetia, 45 Boulevard Raspail, Paris",
    "dropoff_lat": null,
    "dropoff_lng": null,
    "pickup_datetime": "2026-11-20 14:30:00",
    "return_datetime": null,
    "duration_hours": null,
    "distance_km": 32.5,
    "travel_minutes": null,
    "passengers": 2,
    "luggage": 3,
    "customer_name": "Claire Martin",
    "customer_email": "claire.martin@example.com",
    "customer_phone": "+33 6 12 34 56 78",
    "notes": "Flight AF1234, arriving 14:05.",
    "price_base": 20.0,
    "price_distance": 58.5,
    "price_time": 0.0,
    "price_total": 78.5,
    "currency": "EUR",
    "payment_method": "stripe",
    "payment_status": "paid",
    "payment_reference": "pi_3QaBcD2eZvKYlo2C1x9yAbCd",
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-20 16:05:00",
    "vehicle_name": "Mercedes E-Class",
    "driver_name": "Thomas Leroy"
  }
}
Field Type Meaning
data.status string pending, processing, completed, cancelled, on_hold, refunded or failed
data.driver_id integer|null The driver PRO, null when none
data.price_total number What the customer pays. Can differ from the sum of the three parts when a pricing rule or a flat rate set it
data.payment_status string unpaid, pending, paid, failed, partially_refunded, refunded or disputed
data.modified_at string Site local time of this change

Errors

Status Code When
404 rest_error No booking with that id.
400 rest_error The body holds none of the fields below (“No fields to update.”).

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-chauffeur/v1/bookings/42" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"status":"completed","driver_id":2}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/bookings/42');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'status'    => 'completed',
        'driver_id' => 2,
    ]),
]);
$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-chauffeur/v1/bookings/42', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ status: 'completed', driver_id: 2 }),
});
const { data } = await response.json();

Quick Links

Share