Contents
On this page

Pricing Calendar - Plugixa Car Rental

GET /plugixa-car-rental/v1/pricing-calendar

Show what one day of a rental costs on each day of a month, after pricing rules, for one model, location and rental length.

Needs Plugixa Car Rental Pro with the Pricing rules app on. The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/pricing-calendar?vehicle_model_id=4&location_id=1&days=3&month=2026-12

Query parameters

Name Type Default Description
vehicle_model_id integer The vehicle model.
location_id integer The pickup location. Omitted or 0: only rates for every location are used, and the site’s time zone.
days integer 1 Rental length, 1 to 365. It picks the rate plan and the rules that depend on length.
month string Required. YYYY-MM.

Each date is priced as if the booking were made today, so rules that depend on how far ahead a booking is made use the days from today to that date.

Responses

200 OK. data holds the base rate and one entry per day of the month (shortened here).

{
  "success": true,
  "data": {
    "base": 65.0,
    "currency": "EUR",
    "days": [
      {
        "date": "2026-12-01",
        "rate": 65.0,
        "rules": [],
        "past": false
      },
      {
        "date": "2026-12-02",
        "rate": 65.0,
        "rules": [],
        "past": false
      },
      {
        "date": "2026-12-05",
        "rate": 74.75,
        "rules": [
          "Weekend in Paris"
        ],
        "past": false
      }
    ]
  }
}
Field Type Meaning
data.base number The rate plan’s daily rate for that length
data.currency string The site’s currency
data.days[].date string YYYY-MM-DD
data.days[].rate number The day’s rate after rules
data.days[].rules string[] Names of the rules that changed it
data.days[].past boolean Whether the date is before today

Errors

Status Code When
422 plugixa_car_rental_invalid month is missing or not YYYY-MM.
404 plugixa_car_rental_not_priced No published rate covers that length for the model there, or the model does not exist.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/pricing-calendar?vehicle_model_id=4&location_id=1&days=3&month=2026-12" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'vehicle_model_id' => 4,
    'location_id'      => 1,
    'days'             => 3,
    'month'            => '2026-12',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/pricing-calendar?' . $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({ vehicle_model_id: '4', location_id: '1', days: '3', month: '2026-12' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/pricing-calendar?${query}`, {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share