Contents
On this page
List Bookings - Plugixa Boat Rental
GET /pbr/v1/bookings
List bookings, one page at a time, with search, sorting and filters.
An API key PRO with Read only or Read and write access, or a signed-in user with the plugixa_boatrental_view capability.
Note. A signed-in user with the Roles app on sees only the marinas their role reaches.
Request
GET https://your-site.example/wp-json/pbr/v1/bookings?status__in=confirmed,paid&orderby=start_datetime&order=asc
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
status__in |
string |
Comma-separated statuses. The site’s own list; by default pending, confirmed, paid, completed, cancelled, refunded, no_show, expired. |
|
payment_status__in |
string |
unpaid, deposit_paid, paid, and any status a Pro app adds. |
|
location_id__in |
string |
Comma-separated marina ids. | |
boat_id__in |
string |
Comma-separated boat ids. | |
start_datetime__between |
string |
Departure between two days or datetimes, on the marina’s clock. Also __gte, __lte, __eq and the rest of the date operators. |
|
end_datetime__between |
string |
The same for the return. | |
total__between |
string |
Total between two amounts. Also __gte, __lte and the rest of the number operators. |
|
created_at__between |
string |
Created between two days, given on the site’s clock and compared in UTC. modified_at__... works the same way. |
Plus the list parameters every paged list accepts, and the filter operators. search matches the booking reference, the customer’s name and the customer’s email. orderby accepts id, booking_ref, status, payment_status, start_datetime, end_datetime, customer_name, total, created_at and modified_at.
Responses
200 OK. data is one page of bookings.
{
"success": true,
"data": [
{
"id": 412,
"booking_ref": "BOAT-7F3A91",
"language_code": null,
"location_id": 2,
"boat_id": 5,
"unit_id": 9,
"booking_form_id": null,
"user_id": null,
"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": "admin",
"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": null,
"meta": null,
"created_by": 0,
"modified_by": 0,
"created_at": "2026-11-12 09:30:00",
"updated_at": null,
"modified_at": "2026-11-12 09:45:00",
"deleted_at": null,
"location_name": "Lisbon Marina",
"boat_name": "Sea Ray 230"
}
],
"meta": { "total": 37, "pages": 1 }
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The booking’s id |
data[].booking_ref |
string |
The reference the customer sees |
data[].location_id |
integer |
The marina |
data[].location_name |
string|null |
The marina’s name, null when it no longer exists |
data[].boat_id |
integer |
The boat |
data[].boat_name |
string|null |
The boat’s name |
data[].unit_id |
integer|null |
The unit the booking holds, null for none in particular |
data[].user_id |
integer|null |
The customer’s WordPress account, null for none |
data[].status |
string |
The booking’s status |
data[].start_datetime |
string |
Departure, on the marina’s clock |
data[].end_datetime |
string |
Return, on the marina’s clock |
data[].start_utc, data[].end_utc |
string |
The same moments in UTC |
data[].block_start_utc, data[].block_end_utc |
string |
The time the boat is unavailable, buffers included, in UTC |
data[].source |
string |
Where the booking came from, for example web or admin |
data[].hold_expires_at |
string|null |
When a pending booking stops holding its boat, on the site’s clock |
data[].total |
number |
What the booking costs |
data[].amount_paid |
number |
What has been paid, from the payments ledger |
data[].payment_status |
string |
unpaid, deposit_paid or paid, from the payments ledger |
data[].billing, data[].meta |
object|null |
Billing details, and the answers to the booking form’s own fields |
data[].created_at |
string |
UTC datetime |
meta.total |
integer |
Bookings matching, before paging |
meta.pages |
integer |
Pages at this per_page |
A list row has no line items and no custom_fields: read one booking with Get Booking for those.
Errors
| Status | Code | When |
|---|---|---|
400 |
plugixa_boatrental_unknown_filter |
A filter names a field bookings cannot be filtered on. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/pbr/v1/bookings?status__in=confirmed,paid&orderby=start_datetime&order=asc" \
-H "Authorization: Bearer $PBR_API_KEY"
<?php
$query = http_build_query([
'status__in' => 'confirmed,paid',
'orderby' => 'start_datetime',
'order' => 'asc',
]);
$ch = curl_init('https://your-site.example/wp-json/pbr/v1/bookings?' . $query);
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 params = new URLSearchParams({ status__in: 'confirmed,paid', orderby: 'start_datetime', order: 'asc' });
const response = await fetch(`https://your-site.example/wp-json/pbr/v1/bookings?${params}`, {
headers: { 'Authorization': `Bearer ${process.env.PBR_API_KEY}` },
});
const { data, meta } = await response.json();
Quick Links
Share