Contents
On this page
List Bookings - Plugixa Car Rental
GET /plugixa-car-rental/v1/bookings
List bookings, one page at a time, newest first unless you ask otherwise.
The user needs the plugixa_car_rental_view capability.
Request
GET https://your-site.example/wp-json/plugixa-car-rental/v1/bookings?status=confirmed&pickup_at__between=2026-12-01,2026-12-31&orderby=pickup_at&order=asc
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
status |
string |
One exact status: pending, confirmed, picked_up, returned, completed, cancelled, no_show or expired. Anything else is refused with 400. |
Plus the list parameters every paged list accepts. search matches reference, customer_name, customer_email and customer_phone. orderby accepts id, reference, status, pickup_at, return_at, total, customer_name, created_at and modified_at.
Filters, as described in Filtering lists: status (in, ne, empty, not_empty), pickup_at and return_at (dates, on the site’s calendar), vehicle_model_id, vehicle_unit_id and pickup_location_id (in, ne, empty, not_empty), created_at and modified_at (dates).
Responses
200 OK. data is one page of bookings.
{
"success": true,
"data": [
{
"id": 128,
"reference": "CR-2026-0128",
"status": "confirmed",
"source": "admin",
"vehicle_model_id": 4,
"vehicle_unit_id": 9,
"pickup_location_id": 1,
"return_location_id": 1,
"pickup_at": "2026-12-01 09:00:00",
"return_at": "2026-12-04 09:00:00",
"hold_expires_at": null,
"billable_days": 3,
"customer_id": null,
"customer_name": "Claire Martin",
"customer_email": "claire.martin@example.com",
"customer_phone": "+33 6 12 34 56 78",
"currency": "EUR",
"subtotal": 219.0,
"discount_total": 21.9,
"tax_total": 0.0,
"total": 197.1,
"deposit": 800.0,
"amount_paid": 0.0,
"payment_status": "unpaid",
"payment_method": "",
"notes": "Arrives on the 08:40 train.",
"meta": [],
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 09:30:00",
"deleted_at": null,
"vehicle_model_name": "Peugeot 3008",
"vehicle_unit_plate": "AB-123-CD",
"pickup_location_name": "Paris Gare de Lyon",
"return_location_name": "Paris Gare de Lyon"
}
],
"meta": {
"total": 23,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The booking’s id |
data[].reference |
string |
Reference shown to the customer |
data[].status |
string |
Current status |
data[].pickup_at |
string |
UTC datetime of the pickup |
data[].return_at |
string |
UTC datetime of the return |
data[].total |
number |
What the customer pays |
data[].payment_status |
string |
unpaid, partially_paid, paid or refunded |
data[].vehicle_model_name |
string|null |
Name of the model |
data[].vehicle_unit_plate |
string|null |
Plate of the car |
meta.total |
integer |
Bookings matching, before paging |
meta.pages |
integer |
Number of pages at this per_page |
A list row has the booking’s stored fields and the four names. Get Booking adds the price lines, next, pickup_local and return_local.
Errors
| Status | Code | When |
|---|---|---|
400 |
rest_invalid_param |
status is not one of the statuses above. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/bookings?status=confirmed&pickup_at__between=2026-12-01,2026-12-31&orderby=pickup_at&order=asc" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'status' => 'confirmed',
'pickup_at__between' => '2026-12-01,2026-12-31',
'orderby' => 'pickup_at',
'order' => 'asc',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const query = new URLSearchParams({
status: 'confirmed',
pickup_at__between: '2026-12-01,2026-12-31',
orderby: 'pickup_at',
order: 'asc',
});
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/bookings?${query}`, {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data, meta } = await response.json();
Quick Links
Share