Contents
On this page
Rentals Report - Plugixa Car Rental
GET /plugixa-car-rental/v1/reports/rentals
Bookings, rental days, revenue, cancellations, money collected and fleet utilisation for a date range, by day, model and pickup location.
Needs Plugixa Car Rental Pro with the Reports app on. The user needs the plugixa_car_rental_view capability.
Request
GET https://your-site.example/wp-json/plugixa-car-rental/v1/reports/rentals?from=2026-11-01&to=2026-11-30
Query parameters
| Name | Type | Default | Description |
|---|---|---|---|
from |
string |
29 days before to |
First day, YYYY-MM-DD, on the site’s calendar. The default makes a 30-day range. |
to |
string |
today | Last day, YYYY-MM-DD, included. At most 366 days after from. |
currency |
string |
the site’s | Three-letter code. Revenue counts only bookings in this currency. |
A booking counts on its pickup day when it is confirmed, picked_up, returned or completed; cancelled and no_show count as cancelled. Money collected counts completed payments minus refunds recorded in the range, whatever the pickup date.
Responses
200 OK. data is the report (series shortened here).
{
"success": true,
"data": {
"from": "2026-11-01",
"to": "2026-11-30",
"days": 30,
"currency": "EUR",
"currencies": [
"EUR"
],
"totals": {
"bookings": 42,
"rental_days": 151,
"revenue": 10284.5,
"average_value": 244.87,
"average_days": 3.6,
"cancelled": 5,
"cancel_rate": 0.1064,
"collected": 9120.0,
"units": 12,
"utilisation": 0.4194
},
"series": [
{
"date": "2026-11-01",
"bookings": 2,
"revenue": 410.0
},
{
"date": "2026-11-02",
"bookings": 1,
"revenue": 195.0
}
],
"models": [
{
"id": 4,
"bookings": 18,
"rental_days": 66,
"revenue": 4852.0,
"label": "Peugeot 3008",
"units": 3,
"utilisation": 0.7333
}
],
"locations": [
{
"id": 1,
"bookings": 29,
"rental_days": 104,
"revenue": 7210.5,
"label": "Paris Gare de Lyon"
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.days |
integer |
Days in the range |
data.currencies |
string[] |
Currencies seen in the range, to offer as a choice |
data.totals.bookings |
integer |
Bookings counted |
data.totals.revenue |
number |
Sum of their totals, in currency |
data.totals.average_value |
number |
Revenue per booking in currency |
data.totals.cancel_rate |
number |
Cancelled and no-show bookings as a share of all, 0 to 1 |
data.totals.collected |
number |
Payments minus refunds in currency |
data.totals.units |
integer |
Published cars in the fleet |
data.totals.utilisation |
number |
Share of the fleet’s time rented in the range, 0 to 1 |
data.series[] |
object[] |
One entry per day: date, bookings, revenue |
data.models[] |
object[] |
Per model, highest revenue first, including models with cars but no bookings: id, label, bookings, rental_days, revenue, units, utilisation |
data.locations[] |
object[] |
Per pickup location: id, label, bookings, rental_days, revenue |
A model or location deleted for good is labelled “Deleted (#id)”.
Errors
| Status | Code | When |
|---|---|---|
400 |
plugixa_car_rental_bad_date |
from or to is not YYYY-MM-DD. |
400 |
plugixa_car_rental_bad_range |
from is after to, or the range is longer than 366 days. |
400 |
plugixa_car_rental_bad_currency |
currency is not three letters. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/reports/rentals?from=2026-11-01&to=2026-11-30" \
-u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
'from' => '2026-11-01',
'to' => '2026-11-30',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/reports/rentals?' . $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({ from: '2026-11-01', to: '2026-11-30' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/reports/rentals?${query}`, {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data } = await response.json();
Quick Links
Share