Contents
On this page
Get Availability - Plugixa Chauffeur
GET /plugixa-chauffeur/v1/availability
Read the site-wide rules that decide which pickup times can be booked.
Needs a signed-in user with the plugixa_chauffeur_manage capability (administrators have it after activation).
Request
GET https://your-site.example/wp-json/plugixa-chauffeur/v1/availability
Responses
200 OK. data is the rules.
{
"success": true,
"message": "",
"data": {
"enabled": true,
"lead_time_minutes": 120,
"horizon_days": 180,
"business_hours": {
"1": {
"open": true,
"start": "06:00",
"end": "23:00"
},
"2": {
"open": true,
"start": "06:00",
"end": "23:00"
},
"3": {
"open": true,
"start": "06:00",
"end": "23:00"
},
"4": {
"open": true,
"start": "06:00",
"end": "23:00"
},
"5": {
"open": true,
"start": "06:00",
"end": "23:00"
},
"6": {
"open": true,
"start": "08:00",
"end": "20:00"
},
"7": {
"open": false,
"start": "09:00",
"end": "18:00"
}
},
"blackout_dates": [
{
"start": "2026-12-24",
"end": "2026-12-26",
"label": "Christmas"
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.enabled |
boolean |
Whether the rules are enforced. When false, any pickup time is accepted |
data.lead_time_minutes |
integer |
Minutes of notice a booking needs. 0 only forbids the past |
data.horizon_days |
integer |
How many days ahead a booking can be made. 0 means no limit |
data.business_hours |
object |
Keys 1 (Monday) to 7 (Sunday), each { open, start, end } with times as HH:MM, end excluded |
data.blackout_dates |
array |
Closed date ranges { start, end, label }, dates as YYYY-MM-DD, both ends included |
Keys never saved come back with their defaults: off, 60 minutes of notice, no horizon, open Monday to Friday 09:00 to 18:00.
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-chauffeur/v1/availability" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/availability');
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 response = await fetch('https://your-site.example/wp-json/plugixa-chauffeur/v1/availability', {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data } = await response.json();
Quick Links
Share