Contents
On this page
List Locations - Plugixa Car Rental
GET /plugixa-car-rental/v1/locations
List locations, one page at a time.
The user needs the plugixa_car_rental_view capability.
Request
GET https://your-site.example/wp-json/plugixa-car-rental/v1/locations?allows_pickup__eq=1
Query parameters
This list takes the list parameters every paged list accepts. search matches name, code, city and address. orderby accepts id, code, name, city, country, sort_order, status, created_at, modified_at.
Filters, as described in Filtering lists: status (in, ne, empty, not_empty), city (contains, eq, ne, empty, not_empty), allows_pickup (eq with 1 or 0), allows_return (eq with 1 or 0), created_at and modified_at (dates).
Responses
200 OK. data is one page of locations.
{
"success": true,
"data": [
{
"id": 1,
"code": "PAR-GDL",
"name": "Paris Gare de Lyon",
"address": "20 Boulevard Diderot",
"city": "Paris",
"country": "France",
"latitude": 48.8443,
"longitude": 2.3743,
"phone": "+33 1 23 45 67 89",
"email": "gare-de-lyon@your-site.example",
"timezone": "Europe/Paris",
"opening_hours": {
"mon": [
{
"open": "08:00",
"close": "19:00"
}
],
"tue": [
{
"open": "08:00",
"close": "19:00"
}
],
"wed": [
{
"open": "08:00",
"close": "19:00"
}
],
"thu": [
{
"open": "08:00",
"close": "19:00"
}
],
"fri": [
{
"open": "08:00",
"close": "19:00"
}
],
"sat": [
{
"open": "09:00",
"close": "12:30"
},
{
"open": "14:00",
"close": "18:00"
}
],
"sun": []
},
"allows_pickup": true,
"allows_return": true,
"after_hours_fee": 35.0,
"image_id": null,
"sort_order": 0,
"status": "published",
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 09:30:00",
"deleted_at": null
}
],
"meta": {
"total": 4,
"pages": 1
}
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The location’s id |
data[].code |
string |
Your short code, upper case, or empty |
data[].name |
string |
The name customers see |
data[].city |
string |
City |
data[].status |
string |
published or unpublished. Only a published location can be booked |
data[].allows_pickup |
boolean |
Whether cars can be picked up here |
data[].allows_return |
boolean |
Whether cars can be returned here |
meta.total |
integer |
Locations matching the search and filters, before paging |
meta.pages |
integer |
Number of pages at this per_page |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/locations?allows_pickup__eq=1" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'allows_pickup__eq' => '1',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/locations?' . $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({ allows_pickup__eq: '1' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/locations?${query}`, {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data, meta } = await response.json();
Quick Links
Share