Contents
On this page

List a Boat's Days - Plugixa Boat Rental

GET /pbr/v1/boats/{id}/days

One month of a boat’s days, each with a state saying whether the boat can be booked that day. It is what the Availability calendar on a boat’s page reads. New in 7.0.0.

Public: no key or login is needed. An API key PRO of either access level may call it too.

Note. A day’s state comes from the same checks as a booking: the marina’s opening hours and closures, the boat’s booking mode and buffers, and the bookings already made. It says nothing about any booking or customer. It is rate limited per visitor address, sharing the 120 requests every 10 minutes of Search Availability.

Request

GET https://your-site.example/wp-json/pbr/v1/boats/27/days?month=2026-12

Parameters

Name In Type Default Description
id path integer Required. The boat.
month query string Required. The month, YYYY-MM. From this month, on the marina’s clock, up to 18 months ahead.
location_id query integer The boat’s home marina The marina to check the days at.

Responses

200 OK. data.days is every day of the month.

{
  "success": true,
  "message": "",
  "data": {
    "boat_id": 27,
    "location_id": 13,
    "month": "2026-12",
    "today": "2026-11-25",
    "first": "2026-11",
    "last": "2028-05",
    "days": [
      { "date": "2026-12-11", "state": "free" },
      { "date": "2026-12-12", "state": "some" },
      { "date": "2026-12-13", "state": "full" }
    ]
  }
}
Field Type Meaning
data.today string Today on the marina’s clock.
data.first, data.last string The first and last months that can be asked for.
data.days array Every day of the month, first to last. The example shows three.
data.days[].date string The day, YYYY-MM-DD.
data.days[].state string past, closed (the marina is shut), full (nothing left), some (partly booked) or free.
data.days[].reason string Only on some closed days: the sentence the booking form would show for a day something other than the boat shuts.

Errors

Status Code When
400 rest_error month is not written as YYYY-MM.
404 rest_error The boat does not exist or is not active: “That boat is not available.”
422 rest_error The month is before this one or more than 18 months ahead: “That month cannot be shown.”
429 plugixa_boatrental_rate_limited Too many requests from this address. Retry-After says when to try again.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/pbr/v1/boats/27/days?month=2026-12"
<?php
$ch = curl_init('https://your-site.example/wp-json/pbr/v1/boats/27/days?month=2026-12');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pbr/v1/boats/27/days?month=2026-12');
const { data } = await response.json();
const bookable = data.days.filter((day) => day.state === 'free' || day.state === 'some');

Quick Links

Share