Contents
On this page
Get Quote - Plugixa Chauffeur
POST /plugixa-chauffeur/v1/public/quote
Price a trip: one fare for each published vehicle with enough seats, worked out on the server.
Public: no login and no capability. Nothing is written.
Request
POST https://your-site.example/wp-json/plugixa-chauffeur/v1/public/quote
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
form_id |
integer |
Yes | A published booking form. |
service_type |
string |
No | distance (the default), hourly, or flat with Pro. |
transfer_type |
string |
No | return doubles the distance part; anything else means one_way. |
distance_km |
number |
No | One-way distance, for distance trips. The plugin does not measure it: send it. |
duration_hours |
number |
No | Hours, for hourly trips. |
passengers |
integer |
No | At least 1 (the default). Vehicles with fewer seats are left out. |
pickup_datetime |
string |
Yes when availability is on | YYYY-MM-DD HH:MM, or with a T between date and time, in the site’s time zone. |
route_id |
integer |
No | The chosen flat-rate route PRO, for flat trips. |
Each fare is the vehicle’s base price, plus its distance rate times the distance (twice for a return) or its hourly rate times the hours, raised to its minimum price, then changed by any active pricing rules PRO. A flat trip costs the route’s price for every vehicle; a missing or inactive route prices it at 0. The form’s own minimum notice is not checked here, only when booking. See Pricing.
{
"form_id": 1,
"service_type": "distance",
"transfer_type": "one_way",
"distance_km": 32.5,
"passengers": 2,
"pickup_datetime": "2026-11-20 14:30"
}
Responses
200 OK. data.vehicles holds one fare per vehicle.
{
"success": true,
"message": "",
"data": {
"currency": "EUR",
"vehicles": [
{
"vehicle_id": 3,
"name": "Mercedes E-Class",
"description": "<p>Executive sedan with leather seats and Wi-Fi.</p>",
"image_url": "https://your-site.example/wp-content/uploads/2026/11/e-class-300x200.jpg",
"vehicle_type_name": "Executive sedan",
"max_passengers": 3,
"max_luggage": 3,
"currency": "EUR",
"price_base": 20.0,
"price_distance": 58.5,
"price_time": 0.0,
"price_total": 78.5
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.vehicles[].vehicle_id |
integer |
Send it as vehicle_id to book |
data.vehicles[].image_url |
string |
Medium-size photo URL, empty when the vehicle has none |
data.vehicles[].price_total |
number |
The fare. Can differ from the sum of the three parts after a minimum price, a pricing rule or a flat rate |
data.currency |
string |
The form’s currency, else the site currency, else USD |
Vehicles come in display order, then cheapest base price first. An empty vehicles list means no published vehicle has enough seats.
Errors
| Status | Code | When |
|---|---|---|
404 |
rest_error |
No published form with form_id (“Booking form not found.”). |
422 |
plugixa_chauffeur_unavailable |
Availability is on and the pickup time is missing or malformed, too soon, beyond the horizon, on a blackout date, on a closed day or outside business hours. The message says which. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-chauffeur/v1/public/quote" \
-H "Content-Type: application/json" \
-d '{"form_id":1,"service_type":"distance","transfer_type":"one_way","distance_km":32.5,"passengers":2,"pickup_datetime":"2026-11-20 14:30"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/public/quote');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'form_id' => 1,
'service_type' => 'distance',
'transfer_type' => 'one_way',
'distance_km' => 32.5,
'passengers' => 2,
'pickup_datetime' => '2026-11-20 14:30',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-chauffeur/v1/public/quote', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
form_id: 1,
service_type: 'distance',
transfer_type: 'one_way',
distance_km: 32.5,
passengers: 2,
pickup_datetime: '2026-11-20 14:30',
}),
});
const { data } = await response.json();
Quick Links
Share