Contents
On this page

Get Location - Plugixa Boat Rental

GET /pbr/v1/locations/{id}

Read one marina (location).

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/locations/2

Path parameters

Name Type Description
id integer The marina’s id

Responses

200 OK. data is the location.

{
  "success": true,
  "data": {
    "id": 2,
    "language_code": null,
    "translation_group": null,
    "name": "Lisbon Marina",
    "slug": "lisbon-marina",
    "description": "<p>Pontoon C, next to the fuel dock.</p>",
    "status": "active",
    "inventory_mode": "unit",
    "default_billing_type": "hour",
    "currency": "EUR",
    "timezone": "Europe/Lisbon",
    "address_line1": "Doca de Alcântara",
    "address_line2": null,
    "city": "Lisbon",
    "state": null,
    "postcode": "1350-352",
    "country": "PT",
    "latitude": 38.7032,
    "longitude": -9.1636,
    "phone": "+351 210 000 000",
    "email": "lisbon@example.com",
    "meeting_point": "Pontoon C",
    "dock_instructions": "Ask for the skipper at the blue kiosk.",
    "image_id": 150,
    "gallery": null,
    "settings": null,
    "display_order": 0,
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-09-01 08:00:00",
    "updated_at": null,
    "modified_at": "2026-10-15 11:20:00",
    "deleted_at": null,
    "boat_count": 4,
    "forms": [
      { "id": 1, "name": "Main booking form", "status": "active", "all_locations": true }
    ],
    "image_url": "https://your-site.example/wp-content/uploads/2026/09/lisbon-marina-300x200.jpg"
  }
}
Field Type Meaning
data.timezone string|null The marina’s clock, which booking departures and returns are on
data.currency string|null The marina’s currency, else the site’s
data.boat_count integer How many different boats have units here
data.forms array The live booking forms that book here
data.image_url string|null The image’s medium-size URL

The other fields are described on List Locations. Opening hours and closures are not part of this answer and are not reachable with a key.

Errors

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

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share