Contents
Get Booking - Plugixa Boat Rental
GET /pbr/v1/bookings/{id}
Read one booking, with the line items it was priced as and the answers to the booking form’s own fields.
An API key PRO with Read only or Read and write access, or a signed-in user with the plugixa_boatrental_view capability.
Request
GET https://your-site.example/wp-json/pbr/v1/bookings/412
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The booking’s id |
Responses
200 OK. data is the booking.
{
"success": true,
"data": {
"id": 412,
"booking_ref": "BOAT-7F3A91",
"language_code": null,
"location_id": 2,
"boat_id": 5,
"unit_id": 9,
"booking_form_id": 1,
"user_id": 37,
"status": "confirmed",
"billing_type": "hour",
"start_datetime": "2026-11-20 10:00:00",
"end_datetime": "2026-11-20 14:00:00",
"start_utc": "2026-11-20 10:00:00",
"end_utc": "2026-11-20 14:00:00",
"buffer_before": 0,
"buffer_after": 30,
"block_start_utc": "2026-11-20 10:00:00",
"block_end_utc": "2026-11-20 14:30:00",
"quantity": 1,
"guests": 4,
"source": "web",
"hold_expires_at": null,
"customer_name": "Ana Silva",
"customer_email": "ana@example.com",
"customer_phone": "+351 912 345 678",
"billing": null,
"currency": "EUR",
"subtotal": 380.0,
"discount_total": 0.0,
"tax_total": 0.0,
"deposit_amount": 0.0,
"total": 380.0,
"amount_paid": 100.0,
"payment_method": "offline",
"payment_status": "deposit_paid",
"notes": "Celebrating a birthday.",
"meta": {
"skipper_experience": "Day skipper",
"_labels": { "skipper_experience": "Sailing experience" }
},
"created_by": 37,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"updated_at": null,
"modified_at": "2026-11-12 09:45:00",
"deleted_at": null,
"items": [
{
"id": 977,
"booking_id": 412,
"type": "rental",
"reference_id": 5,
"label": "1 boat × 4 hours",
"quantity": 4.0,
"unit_price": 95.0,
"total": 380.0,
"tax_rate_id": null,
"meta": null
}
],
"custom_fields": [
{ "key": "skipper_experience", "label": "Sailing experience", "value": "Day skipper" }
],
"location_name": "Lisbon Marina",
"boat_name": "Sea Ray 230"
}
}
| Field | Type | Meaning |
|---|---|---|
data.items |
array |
The lines the booking was priced as, written once when it was made |
data.items[].type |
string |
rental, fee, or a line a Pro app adds (extras, a discount, tax) |
data.items[].reference_id |
integer|null |
What the line is for: the boat, for a rental line |
data.items[].quantity |
number |
How many of the unit, for example hours |
data.items[].unit_price, data.items[].total |
number |
Price of one, and of the line |
data.custom_fields |
array |
Each answer in meta as key, label (as the form asked it) and value. Empty answers are left out |
data.meta |
object|null |
The raw answers, with the labels kept under _labels |
data.location_name, data.boat_name |
string|null |
The names behind location_id and boat_id |
The other fields are described on List Bookings.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_boatrental_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/pbr/v1/bookings/412" \
-H "Authorization: Bearer $PBR_API_KEY"
<?php
$ch = curl_init('https://your-site.example/wp-json/pbr/v1/bookings/412');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('PBR_API_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pbr/v1/bookings/412', {
headers: { 'Authorization': `Bearer ${process.env.PBR_API_KEY}` },
});
const { data } = await response.json();
Quick Links
Share