Contents
On this page

Free Times for Staff - Plugixa Car Wash

GET /plugixa-carwash/v1/bookings/slots

List the start times on one day, with how many suitable bays or teams are free at each, for the wash you describe. The staff app uses it to book on a customer’s behalf.

Needs the plugixa_carwash_create capability.

Request

GET https://your-site.example/wp-json/plugixa-carwash/v1/bookings/slots?location_id=3&vehicle_type_id=2&package_id=4&date=2026-11-14

Query parameters

Name Type Default Description
location_id integer Required. A published location.
vehicle_type_id integer Required as soon as one vehicle type is published.
package_id integer A published package.
service_ids string Comma-separated published service ids. Send a package, services, or both.
date string Required. Y-m-d, in the location’s time zone.
except integer A booking id to leave out, so that a booking being moved does not block its own time.

Unlike a staff booking itself, the times listed follow the location’s opening hours, time grid, minimum notice, booking window and closed days. A day outside them answers an empty slots.

Responses

200 OK. data is the day’s times.

{
  "success": true,
  "data": {
    "date": "2026-11-14",
    "duration": 60,
    "slots": [
      {
        "time": "08:00",
        "start": "2026-11-14 14:00:00",
        "available": true,
        "free": 2
      },
      {
        "time": "08:30",
        "start": "2026-11-14 14:30:00",
        "available": true,
        "free": 1
      },
      {
        "time": "09:00",
        "start": "2026-11-14 15:00:00",
        "available": false,
        "free": 0
      }
    ]
  }
}
Field Type Meaning
data.date string The date asked for
data.duration integer Minutes the wash takes, worked out from the package, services and vehicle type
data.slots[].time string Local start time, H:i
data.slots[].start string The same moment as a UTC datetime
data.slots[].available boolean Whether at least one suitable bay or team is free for the whole wash and buffer
data.slots[].free integer How many are free

Errors

Status Code When
422 plugixa_carwash_not_offered No such published location, vehicle type, package or service.
422 plugixa_carwash_nothing_chosen Neither a package nor a service.
422 plugixa_carwash_not_for_vehicle The package or a service is switched off for this vehicle type.
422 plugixa_carwash_invalid_date date is missing or not Y-m-d.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-carwash/v1/bookings/slots?location_id=3&vehicle_type_id=2&package_id=4&date=2026-11-14" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'location_id'     => 3,
    'vehicle_type_id' => 2,
    'package_id'      => 4,
    'date'            => '2026-11-14',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-carwash/v1/bookings/slots?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const query = new URLSearchParams({
  location_id: '3',
  vehicle_type_id: '2',
  package_id: '4',
  date: '2026-11-14',
});
const response = await fetch(`https://your-site.example/wp-json/plugixa-carwash/v1/bookings/slots?${query}`, {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share