Contents
On this page
Check Availability - Plugixa Car Parking
GET /plugixa-car-parking/v1/availability
See what can be booked at one location between an entry and an exit time: how many spaces of each type are free, with a price for one space.
Anyone may call it, signed in or not: it is the first step of the booking form. No nonce is needed. It counts against the availability rate limit. POST with the same parameters in a JSON body works too.
Request
GET https://your-site.example/wp-json/plugixa-car-parking/v1/availability?location_id=2&entry=2026-11-20%2008:00&exit=2026-11-23%2018:00
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
location_id |
integer |
Required. The location. It must be active, and offered on the booking form. | |
entry |
string |
Required. Entry date and time in the car park’s local time: 2026-11-20 08:00, 2026-11-20T08:00 or with seconds. |
|
exit |
string |
Required. Exit date and time, same format. Must be after entry. |
|
space_type_id |
integer |
Only this space type. It must be stocked at the location, active, offered on the form and priced there. | |
form_id |
integer |
the default form | The booking form the request is held to. booking_form_id is accepted as well. |
Send local times without a time-zone offset: a value with an offset is converted to UTC and then read as local time.
The window must also respect the site’s booking rules: the entry cannot be sooner than the minimum notice or later than the furthest date bookable ahead, and both entry and exit must fall inside the location’s opening hours, taking its date exceptions into account.
Responses
200 OK. data.availability has one row per space type that can be booked.
{
"success": true,
"message": "",
"data": {
"location_id": 2,
"entry": "2026-11-20 08:00:00",
"exit": "2026-11-23 18:00:00",
"availability": [
{
"space_type_id": 1,
"mode": "capacity",
"total": 40,
"available": 31,
"space_type_name": "Standard car",
"icon": "car",
"color": "#2563eb",
"price_preview": 48.0,
"currency": "EUR",
"units": 4.0,
"billing_type": "day"
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.entry, data.exit |
string |
The window as it was read, YYYY-MM-DD HH:MM:SS local time |
data.availability[].space_type_id |
integer |
The space type |
data.availability[].mode |
string |
capacity (spaces are counted) or assigned (numbered spaces PRO) |
data.availability[].total |
integer |
Spaces of this type at the location |
data.availability[].available |
integer |
Spaces still free for the whole window |
data.availability[].free_spaces |
array |
assigned mode only: the free numbered spaces, each { "id", "label" } |
data.availability[].space_type_name |
string|null |
The type’s name |
data.availability[].icon, color |
string|null |
How the type is drawn on the booking form |
data.availability[].price_preview |
number |
Total price for one space over the window, before any coupon |
data.availability[].currency |
string |
The location’s currency, else the site’s |
data.availability[].units |
number |
How many billing units the window counts as |
data.availability[].billing_type |
string |
The location’s billing unit: minute, hour, day, week or month |
data.extras |
array |
PRO The extras the location offers, when the Extras module is installed |
A space type is listed only when the location stocks it, it is active, the form offers it and it has a price for the location’s billing unit. The spaces held by bookings in the statuses the site counts as holding a space (by default pending, confirmed, paid and completed) are not available.
Errors
| Status | Code | When |
|---|---|---|
422 |
rest_error |
location_id, entry or exit is missing or unreadable. |
410 |
form_unavailable |
form_id is not an active booking form. |
422 |
location_unavailable |
The location does not exist, is not active, or is not on the form. |
422 |
type_unavailable |
space_type_id is not stocked here, not active, or not on the form. |
422 |
no_price |
space_type_id has no price for the location’s billing unit. |
422 |
invalid_range |
exit is not after entry. |
422 |
too_soon |
entry is in the past or inside the minimum notice. |
422 |
too_far |
entry is further ahead than bookings are taken. |
422 |
location_closed |
The car park is closed on the entry or exit date. |
422 |
outside_hours |
The entry or exit time is outside opening hours. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/availability?location_id=2&entry=2026-11-20%2008:00&exit=2026-11-23%2018:00"
<?php
$query = http_build_query([
'location_id' => 2,
'entry' => '2026-11-20 08:00',
'exit' => '2026-11-23 18:00',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/availability?' . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const query = new URLSearchParams({
location_id: '2',
entry: '2026-11-20 08:00',
exit: '2026-11-23 18:00',
});
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-parking/v1/availability?${query}`);
const { data } = await response.json();
Quick Links
Share