Contents
On this page
Plugixa Chauffeur REST API - Plugixa Chauffeur
The integration surface for Plugixa Chauffeur: bookings you can list, create, update and refund, the fleet (vehicles, vehicle types, locations), booking forms, availability rules and settings, plus drivers, pricing rules, flat-rate routes and reports with Pro. The public booking routes let a headless front end quote and take bookings the way the booking wizard does. Enough to feed a dispatch board or an accounting tool, sync a fleet from another system, or build your own booking page.
This is the API the plugin’s own screens use. The admin app and the booking wizard do everything over these routes, so every rule is enforced at the route rather than in the page. It is not a separately versioned public API: pin the plugin version you build against, and test after updating.
Everything lives under the namespace plugixa-chauffeur/v1.
Base URL
https://your-site.example/wp-json/plugixa-chauffeur/v1
On a site with plain permalinks, pass the route as a parameter instead:
https://your-site.example/?rest_route=/plugixa-chauffeur/v1/bookings
Authentication
The plugin adds no tokens of its own. Managed routes accept whatever WordPress accepts for REST requests, then check the permissions of the user WordPress identified. From a script, use a WordPress Application Password (Users -> Profile -> Application Passwords) for an account that holds the capabilities below:
curl -s "https://your-site.example/wp-json/plugixa-chauffeur/v1/bookings" \
-u "admin:$WP_APP_PASSWORD"
Application Passwords need HTTPS, unless the site runs in a local environment.
| Caller | How it signs in |
|---|---|
| A script or another system | An Application Password, sent as HTTP Basic authentication |
| The admin app | The logged-in cookie plus a REST nonce in X-WP-Nonce, the normal WordPress way |
| The booking wizard | Nothing: the routes under /public are open to visitors. Placing a booking needs the booking nonce printed with the form, see Place Booking |
| Stripe | The Stripe-Signature header, see Stripe Webhook |
Permissions
| Called on the endpoint pages | What the caller needs |
|---|---|
| Manage | The plugixa_chauffeur_manage capability |
| Manage + delete | plugixa_chauffeur_manage and plugixa_chauffeur_delete |
| Administrator | The WordPress manage_options capability (settings only) |
| Public | Nothing |
Activation gives administrators five capabilities: plugixa_chauffeur_manage, plugixa_chauffeur_edit, plugixa_chauffeur_delete, plugixa_chauffeur_publish and plugixa_chauffeur_settings. The API checks two of them, plugixa_chauffeur_manage and plugixa_chauffeur_delete. The other three are granted but no route tests them.
Every DELETE route needs both capabilities. Deleting is a separate grant from managing, so you can give day-to-day booking work to a role that cannot destroy records. A caller with manage but without delete gets 403 on DELETE and can still create and edit.
Both names can be changed with the plugixa_chauffeur_manage_capability and plugixa_chauffeur_delete_capability filters. See Hooks reference.
Bookings carry personal data. Names, e-mails, phone numbers and addresses come back from the booking and report endpoints. Grant the manage capability only to accounts that should see them.
Pro routes need an active licence. Drivers, pricing rules, flat-rate routes and reports are only registered on Plugixa Chauffeur Pro with a valid licence. Anywhere else they answer 404 rest_no_route.
Responses
Every successful response is wrapped the same way, with status 200, creates included:
{
"success": true,
"message": "",
"data": { "id": "3", "name": "Mercedes E-Class" }
}
message is empty, or a short sentence such as "Booking deleted.". One exception: the Stripe Webhook answers { "received": true }, unwrapped.
Types. Rows come back much as the database stores them. Booleans, prices and the counts each page lists are converted, but many ids and some numbers are strings: a booking’s id, every id of a vehicle, vehicle type, location, driver, pricing rule and route, display_order on most resources, and location coordinates. Each endpoint page shows the real types. Datetimes are strings in the form 2026-11-12 09:30:00, in the site’s local time, not UTC.
Send request bodies as JSON with Content-Type: application/json. The write routes read the JSON body only; form-encoded fields are ignored.
Lists and pagination
The list endpoints share these query parameters. The totals are in data, not in headers (X-WP-Total is not sent).
| Parameter | Type | Default | Description |
|---|---|---|---|
limit |
integer |
20 |
Rows per page. per_page is accepted too, and wins. 0 or a negative value returns every row |
offset |
integer |
0 |
Rows to skip |
orderby |
string |
created_at |
One of the columns each endpoint lists. Anything else falls back to that endpoint’s own default. sort_by is accepted too, and wins |
order |
string |
DESC |
ASC or DESC, in capitals: asc is refused with 400. sort_order is accepted too, in any case, and wins |
search |
string |
Substring search over the columns each endpoint lists | |
filter |
object |
The filters as an object, for example filter[status]=pending. Top-level search, status, vehicle_type_id and type work the same |
Page with
offset, notpage. Apageparameter is accepted but has no effect:offsetalways defaults to0. For page 3 of 50, sendlimit=50&offset=100.
A list answers with data.items (the rows), data.total (rows matching the filters), data.limit and data.offset:
{
"success": true,
"message": "",
"data": {
"items": [],
"total": 37,
"limit": 20,
"offset": 0
}
}
Endpoints
| Resource | Endpoints |
|---|---|
| Bookings | List, Create, Get, Update, Delete, Calendar, Refund |
| Booking forms | List, Create, Get, Update, Delete |
| Vehicles | List, Create, Get, Update, Delete, Reorder |
| Vehicle types | List, Create, Get, Update, Delete, Reorder |
| Locations | List, Create, Get, Update, Delete, Reorder |
| Availability | Get, Update |
| Settings | Get, Update |
| Drivers PRO | List, Create, Get, Update, Delete |
| Pricing rules PRO | List, Create, Get, Update, Delete |
| Flat rate routes PRO | List, Create, Get, Update, Delete |
| Reports PRO | Booking report |
| Booking wizard (public) | Form config, Quote, Place booking |
| Payments (public) | Confirm Stripe payment, Stripe webhook |
Taking a booking from your own front end
- Read the form with Get Booking Form Config to learn its services, currency, payment methods and availability rules.
- Price the trip with Get Quote: one fare per vehicle with enough seats.
- Book it with Place Booking. The server checks availability and works out the fare again; any price you send is ignored.
- For a Stripe booking, send the customer to
checkout_url, then confirm the payment with Confirm Stripe Payment when they come back.
Create Booking is the staff route instead: it stores what you send, with no pricing, no availability check and no e-mails.
Errors
Errors use the standard WordPress shape. The plugin’s own errors carry the code rest_error, a readable message and the HTTP status:
{
"code": "rest_error",
"message": "Booking not found.",
"data": { "status": 404, "errors": [] }
}
These can come back from any endpoint. Each endpoint page lists its own errors on top of them.
| Status | Code | When |
|---|---|---|
403 |
rest_forbidden |
The caller lacks the capability, signed in or not: the plugin answers 403 rather than 401 even with no credentials at all. The message says which check failed: “You do not have permission to perform this action.”, “You do not have permission to delete this item.” or “Administrator access required.” |
401 |
incorrect_password, invalid_username |
WordPress rejected the Application Password. |
403 |
rest_cookie_invalid_nonce |
A browser call sent the login cookie with a missing or stale X-WP-Nonce. |
404 |
rest_no_route |
No such route or method. This includes every Pro route on a free site or without an active licence. |
400 |
rest_invalid_param |
A parameter failed validation, for example order=asc in lower case. |
400 |
rest_error |
The request was refused, for example “Name is required.” or “No fields to update.”. |
404 |
rest_error |
The record does not exist. |
422 |
plugixa_chauffeur_unavailable |
The pickup time breaks the availability rules (public quote and booking routes). |
There is no rate limit. The public quote and booking routes are open to anyone, so put your usual bot protection in front of the booking page.
Filtering what comes back
These filters change what the API returns or accepts, in PHP, without touching the routes:
| Filter | Changes |
|---|---|
plugixa_chauffeur_form_config |
The public form configuration, before it is sent |
plugixa_chauffeur_fare |
Each fare, in quotes and wizard bookings. Pricing rules and flat rates use it |
plugixa_chauffeur_booking_data |
A wizard booking’s row, before it is saved |
plugixa_chauffeur_allowed_service_types |
The service types a booking form can start on |
plugixa_chauffeur_settings_defaults |
The settings keys and their defaults |
plugixa_chauffeur_sanitize_settings |
How settings are cleaned before they are saved |
plugixa_chauffeur_validate_settings |
Return an error to refuse a settings change |
plugixa_chauffeur_manage_capability, plugixa_chauffeur_delete_capability |
The capabilities the routes check |
The plugixa_chauffeur_register_rest_routes action fires on rest_api_init with the namespace, after the plugin’s own routes are registered: that is where to add your own alongside them. See Hooks reference for the full set.
Troubleshooting
| Symptom | Usual cause |
|---|---|
403 from a script |
The account lacks plugixa_chauffeur_manage, or the Application Password was not sent. A missing login also answers 403, not 401. |
403 on DELETE only |
The account has manage but not plugixa_chauffeur_delete. |
403 “Security check failed” when booking |
The booking nonce is missing or expired: a cached page can hold one older than a day. See Troubleshooting. |
404 on drivers, pricing rules, routes or reports |
The site runs the free plugin, or the Pro licence is not active. |
400 rest_invalid_param on a list |
order must be ASC or DESC in capitals. |
| Every page of a list is the same | page has no effect. Use offset. |
422 on a quote |
The pickup time breaks the availability rules. The message says which one. |
Stripe payments stay unpaid |
No webhook signing secret is saved, or the webhook URL is not registered in Stripe. See Payments. |
See also
- Every setting the API reads and writes: Settings.
- How fares are worked out: Pricing and Pricing rules PRO.
- Card payments, refunds and the webhook: Payments.
- Change behaviour in PHP instead: Hooks reference.
Quick Links
Share