Contents
Get Booking - Plugixa Car Rental
GET /plugixa-car-rental/v1/bookings/{id}
Read one booking, with its price lines, its local pickup and return times and the statuses it may move to.
The user needs the plugixa_car_rental_view capability.
A booking in the trash is still returned here, with deleted_at set.
Request
GET https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The booking’s id |
Responses
200 OK. data is the booking.
{
"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,
"line_items": [
{
"id": 301,
"booking_id": 128,
"position": 0,
"type": "rental",
"reference_id": 5,
"label": "Peugeot 3008, 3 days",
"quantity": 3.0,
"unit_price": 65.0,
"total": 195.0,
"meta": null,
"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
},
{
"id": 302,
"booking_id": 128,
"position": 1,
"type": "extra",
"reference_id": 3,
"label": "Child seat",
"quantity": 1.0,
"unit_price": 24.0,
"total": 24.0,
"meta": null,
"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
},
{
"id": 303,
"booking_id": 128,
"position": 2,
"type": "coupon",
"reference_id": 7,
"label": "Coupon WINTER10",
"quantity": 1.0,
"unit_price": -21.9,
"total": -21.9,
"meta": null,
"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
}
],
"next": [
"picked_up",
"cancelled",
"no_show"
],
"pickup_local": "2026-12-01 10:00 CET",
"return_local": "2026-12-04 10:00 CET",
"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"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The booking’s id |
data.reference |
string |
Reference shown to the customer: the prefix, the year and the id |
data.status |
string |
See booking statuses |
data.next |
string[] |
Statuses it may move to next |
data.source |
string |
admin (staff or this API) or public (the booking form) |
data.vehicle_model_id |
integer |
The model booked |
data.vehicle_unit_id |
integer|null |
The car given to it |
data.pickup_at |
string |
UTC datetime of the pickup |
data.return_at |
string |
UTC datetime of the return |
data.pickup_local |
string|null |
The pickup on the pickup location’s clock, with its zone abbreviation |
data.return_local |
string|null |
The return on the return location’s clock |
data.hold_expires_at |
string|null |
UTC datetime a public hold runs out. null for staff bookings and once confirmed |
data.billable_days |
integer |
Days charged |
data.customer_id |
integer|null |
Always null in this version |
data.subtotal |
number |
Sum of the positive lines |
data.discount_total |
number |
Discounts, as a positive number |
data.tax_total |
number |
Tax |
data.total |
number |
What the customer pays |
data.deposit |
number |
Held at the desk, not part of total |
data.amount_paid |
number |
Payments minus refunds |
data.payment_status |
string |
unpaid, partially_paid, paid or refunded |
data.payment_method |
string |
The payment method chosen at checkout, or empty |
data.meta |
object|array |
Extra details: fields (answers to your custom fields), consent_at, page_url, cancellation once a customer cancels, manage_nonce once a manage link was made. An empty list [] when there is none |
data.line_items |
object[] |
The price lines, in order. See the note below |
data.vehicle_model_name |
string|null |
Name of the model |
data.vehicle_unit_plate |
string|null |
Plate of the car |
data.pickup_location_name |
string|null |
Name of the pickup location |
data.return_location_name |
string|null |
Name of the return location |
Each line in line_items is stored as its own record: id, booking_id, position, type, reference_id, label, quantity, unit_price and total, plus meta, a JSON string of anything else the line carried, or null. Its created_by and modified_by come back as strings, not integers.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_car_rental_not_found |
No booking with that id. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128');
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 response = await fetch('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128', {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data } = await response.json();
Quick Links
Share