Contents
On this page

Update Flat Rate Route - Plugixa Chauffeur

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

Change the fields you send and keep the others.

Needs Plugixa Chauffeur Pro with an active licence. Needs a signed-in user with the plugixa_chauffeur_manage capability (administrators have it after activation).

Request

PUT https://your-site.example/wp-json/plugixa-chauffeur/v1/routes/2

Path parameters

Name Type Description
id integer The route’s id

Request body

Content type: application/json

Field Type Required Description
name string No Must not be blank.
pickup_label string No Plain text.
dropoff_label string No Plain text.
price number No The fixed fare.
status string No inactive; anything else is saved as active.
display_order integer No Default 0.

A merge: fields you leave out keep their value. A new price applies to new bookings only.

{
  "price": 80
}

Responses

200 OK. data is the updated route.

{
  "success": true,
  "message": "",
  "data": {
    "id": "2",
    "name": "CDG to Paris centre",
    "pickup_label": "Paris Charles de Gaulle Airport",
    "dropoff_label": "Paris city centre",
    "price": 80.0,
    "status": "active",
    "display_order": "0",
    "created_at": "2026-11-12 09:30:00"
  }
}
Field Type Meaning
data.id string The route id, as a string. The wizard sends it as route_id
data.pickup_label string|null Saved as the booking’s pickup address
data.dropoff_label string|null Saved as the booking’s drop-off address
data.price number The fixed fare, whatever the vehicle
data.status string active or inactive. Only active routes are offered
data.display_order string Position in lists

Errors

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

Quick Links

Share