Contents
On this page

Update Booking Form - Plugixa Chauffeur

PUT /plugixa-chauffeur/v1/booking-forms/{id}

Change the fields you send and keep the others.

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

Note. settings is replaced as a whole: send require_phone and the full appearance together, or the keys you leave out go back to their defaults.

Request

PUT https://your-site.example/wp-json/plugixa-chauffeur/v1/booking-forms/1

Path parameters

Name Type Description
id integer The form’s id

Request body

Content type: application/json

Field Type Required Description
name string No Must not be blank.
slug string No Made from the name when empty. Made unique by appending -2, -3, …
enable_distance boolean No Default true.
enable_hourly boolean No Default true.
enable_flat boolean No Flat-rate routes, used with Pro.
enable_return boolean No Default true.
default_service_type string No distance or hourly, plus flat with Pro. Anything else is saved as distance.
currency string No A currency code such as EUR. Empty uses the site currency.
min_lead_time integer No Minutes of notice, 0 or more.
min_passengers integer No At least 1.
status string No published; anything else is saved as draft.
display_order integer No Default 0.
settings object No require_phone (boolean) and appearance: scheme (auto, light or dark), accent, accent_text, background and card (hex colours; background also takes transparent), radius (square, rounded or xl) and border (boolean). Unknown keys and invalid values are dropped.

A merge: fields you leave out keep their value. A new slug is made unique if another form uses it.

{
  "status": "draft"
}

Responses

200 OK. data is the updated form.

{
  "success": true,
  "message": "",
  "data": {
    "id": "1",
    "name": "Airport transfers",
    "slug": "airport-transfers",
    "enable_distance": true,
    "enable_hourly": true,
    "enable_flat": false,
    "enable_return": true,
    "default_service_type": "distance",
    "currency": "EUR",
    "min_lead_time": 120,
    "min_passengers": 1,
    "settings": {
      "require_phone": true,
      "appearance": {
        "scheme": "auto",
        "accent": "#1d4ed8",
        "accent_text": "",
        "background": "",
        "card": "",
        "radius": "rounded",
        "border": true
      }
    },
    "status": "draft",
    "display_order": "0",
    "created_at": "2026-11-12 09:30:00"
  }
}
Field Type Meaning
data.id string The form id, as a string. Use it in the [plugixa_chauffeur_booking_form id="1"] shortcode
data.enable_distance boolean Offers distance bookings
data.enable_hourly boolean Offers hourly bookings
data.enable_flat boolean Offers flat-rate routes PRO
data.enable_return boolean Offers return transfers
data.default_service_type string The service the wizard starts on
data.currency string Empty means the site currency from Settings
data.min_lead_time integer Minutes of notice a booking needs
data.min_passengers integer Smallest party the form accepts
data.settings object require_phone and the wizard’s appearance
data.status string published or draft. A draft form is not shown and cannot be booked
data.display_order string Position in lists

Errors

Status Code When
404 rest_error No booking form 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/booking-forms/1" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"status":"draft"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/booking-forms/1');
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' => 'draft',
    ]),
]);
$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/booking-forms/1', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ status: 'draft' }),
});
const { data } = await response.json();

Quick Links

Share