Contents
Get Booking - Plugixa Car Parking
GET /plugixa-car-parking/v1/bookings/{id}
Read one booking, with its price lines and the answers to its booking form’s custom fields.
The user needs the plugixa_carparking_view capability.
Note. A booking in the trash answers
404here, althoughGET /bookings?view=trashlists it. Restore it first to read it in full.
Request
GET https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The booking’s id |
Responses
200 OK. data is the booking.
{
"success": true,
"data": {
"id": 57,
"booking_ref": "PKG-3F9A1C",
"language_code": null,
"location_id": 3,
"space_type_id": 2,
"space_id": null,
"booking_form_id": 1,
"user_id": 14,
"status": "confirmed",
"billing_type": "day",
"entry_datetime": "2026-12-01 08:00:00",
"exit_datetime": "2026-12-04 08:00:00",
"quantity": 1,
"hold_expires_at": null,
"license_plate": "AB-123-CD",
"vehicle": null,
"customer_name": "Lucas Bernard",
"customer_email": "lucas@example.com",
"customer_phone": "+33 6 12 34 56 78",
"billing": null,
"currency": "EUR",
"subtotal": 45.5,
"discount_total": 4.55,
"tax_total": 0,
"deposit_amount": 0,
"total": 40.95,
"amount_paid": 10,
"coupon_id": 6,
"payment_method": "offline",
"payment_status": "deposit_paid",
"notes": "Arrives on the late flight.",
"meta": { "flight_number": "AF1234", "_labels": { "flight_number": "Flight number" } },
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"updated_at": null,
"modified_at": "2026-11-12 10:05:00",
"deleted_at": null,
"items": [
{
"id": 90,
"booking_id": 57,
"type": "fee",
"reference_id": null,
"label": "Booking fee",
"quantity": 1,
"unit_price": 8,
"total": 8,
"tax_rate_id": null,
"meta": null
},
{
"id": 91,
"booking_id": 57,
"type": "parking",
"reference_id": 2,
"label": "1 space × 3 days",
"quantity": 3,
"unit_price": 12.5,
"total": 37.5,
"tax_rate_id": null,
"meta": null
},
{
"id": 92,
"booking_id": 57,
"type": "discount",
"reference_id": 6,
"label": "Coupon WINTER10",
"quantity": 1,
"unit_price": -4.55,
"total": -4.55,
"tax_rate_id": null,
"meta": null
}
],
"custom_fields": [
{ "key": "flight_number", "label": "Flight number", "value": "AF1234" }
],
"location_name": "Airport North",
"space_type_name": "Standard"
}
}
| Field | Type | Meaning |
|---|---|---|
data.items |
array |
The price lines, in the order they were added |
data.items[].type |
string |
fee, parking, extra PRO, discount or tax PRO |
data.items[].reference_id |
integer|null |
The space type of a parking line, the coupon of a discount line, the extra of an extra line |
data.items[].quantity |
number |
Units charged: for a parking line, the billing units times the spaces |
data.items[].unit_price |
number |
Price of one unit. Negative on a discount line |
data.items[].total |
number |
The line’s amount |
data.items[].original_unit_price |
number |
Only on a line a pricing rule changed PRO: the listed price |
data.items[].adjustments |
array |
Only on such a line: each change as { "label", "amount" } |
data.custom_fields |
array |
The non-empty custom answers as { "key", "label", "value" }, labelled from the booking form |
data.coupon_id |
integer|null |
The coupon redeemed |
See List Bookings for the other fields.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_carparking_not_found |
No booking with that id, or the booking is in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57');
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 response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57', {
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share