Contents
On this page

Get Boat - Plugixa Boat Rental

GET /pbr/v1/boats/{id}

Read one boat, with the URLs of its images.

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/boats/5

Path parameters

Name Type Description
id integer The boat’s id

Responses

200 OK. data is the boat.

{
  "success": true,
  "data": {
    "id": 5,
    "language_code": null,
    "translation_group": null,
    "post_id": 88,
    "name": "Sea Ray 230",
    "slug": "sea-ray-230",
    "description": "<p>A fast day boat for up to eight.</p>",
    "boat_type": "motorboat",
    "image_id": 140,
    "gallery": [141, 142],
    "capacity": 8,
    "cabins": 0,
    "berths": 0,
    "year_built": 2021,
    "engine_hp": 250,
    "fuel_type": "petrol",
    "license_rule": "required",
    "base_location_id": 2,
    "booking_mode": "hourly",
    "billing_type": "hour",
    "min_hours": 2.0,
    "max_hours": 8.0,
    "step_minutes": 60,
    "buffer_before": 0,
    "buffer_after": 30,
    "icon": null,
    "color": "#1e88e5",
    "width": 2.5,
    "length": 7.0,
    "dimension_unit": "m",
    "features": { "bimini": "1", "sound_system": "Bluetooth" },
    "display_order": 0,
    "status": "active",
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-09-01 08:00:00",
    "modified_at": "2026-11-02 14:10:00",
    "deleted_at": null,
    "image_preview": "https://your-site.example/wp-content/uploads/2026/09/sea-ray-230-300x200.jpg",
    "gallery_preview": [
      { "id": 141, "url": "https://your-site.example/wp-content/uploads/2026/09/sea-ray-deck-300x200.jpg" },
      { "id": 142, "url": "https://your-site.example/wp-content/uploads/2026/09/sea-ray-helm-300x200.jpg" }
    ]
  }
}
Field Type Meaning
data.name string The boat’s name
data.description string|null HTML
data.capacity integer The most guests the boat carries: a booking with more is refused
data.booking_mode string hourly, full_day or slots
data.min_hours, data.max_hours, data.step_minutes number The window rules a booking of an hourly boat must meet
data.buffer_before, data.buffer_after integer Minutes kept free around each booking
data.status string active or inactive
data.modified_at string UTC datetime of the last change

The other fields are described on List Boats.

Errors

Status Code When
404 plugixa_boatrental_not_found No boat with that id, or the boat is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/pbr/v1/boats/5" \
  -H "Authorization: Bearer $PBR_API_KEY"
<?php
$ch = curl_init('https://your-site.example/wp-json/pbr/v1/boats/5');
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/boats/5', {
  headers: { 'Authorization': `Bearer ${process.env.PBR_API_KEY}` },
});
const { data } = await response.json();

Quick Links

Share