Contents
On this page

Price a Stay - Plugixa Car Parking

POST /plugixa-car-parking/v1/quote

Work out the full price of a selection, line by line: parking, booking fee, extras, coupon and taxes, the way the booking will be charged.

Anyone may call it, signed in or not. No nonce is needed. It counts against the quote rate limit, and also against quote_coupon when a coupon code is sent.

Note. A quote does not check availability or opening hours. It prices what it is asked to price. Use Check Availability to know whether the selection can be booked.

Request

POST https://your-site.example/wp-json/plugixa-car-parking/v1/quote

Request body

Content type: application/json

Field Type Required Description
location_id integer Yes An active location on the booking form.
space_type_id integer Yes A space type stocked at the location, active, on the form and priced there.
entry string Yes Entry date and time, car park local time, YYYY-MM-DD HH:MM.
exit string Yes Exit date and time. Must be after entry.
quantity integer No Number of spaces. Defaults to 1.
coupon string No A coupon code. Applied only when it is valid for this selection, coupons are switched on in the settings, and the form’s space step shows the coupon field.
extras array No PRO Extras to add, each { "id": 3, "quantity": 1 }.
form_id integer No The booking form the request is held to. Defaults to the default form.

The billing unit is always the location’s own. A billing_type in the body is dropped. The entry must respect the site’s minimum notice and furthest bookable date.

Note. A coupon that is not valid is ignored without an error: the quote simply comes back with no discount. Check a code first with Validate Coupon when you need to know why.

{
  "location_id": 2,
  "space_type_id": 1,
  "entry": "2026-11-20 08:00",
  "exit": "2026-11-23 18:00",
  "quantity": 1,
  "coupon": "WELCOME10"
}

Responses

200 OK. data is the quote.

{
  "success": true,
  "message": "",
  "data": {
    "location_id": 2,
    "space_type_id": 1,
    "billing_type": "day",
    "units": 4.0,
    "quantity": 1,
    "currency": "EUR",
    "line_items": [
      {
        "type": "parking",
        "reference_id": 1,
        "label": "1 space × 4 days",
        "quantity": 4.0,
        "unit_price": 12.0,
        "total": 48.0
      },
      {
        "type": "discount",
        "reference_id": 5,
        "label": "Coupon WELCOME10",
        "quantity": 1,
        "unit_price": -4.8,
        "total": -4.8
      }
    ],
    "subtotal": 48.0,
    "discount_total": 4.8,
    "coupon_id": 5,
    "coupon_code": "WELCOME10",
    "tax_total": 0.0,
    "deposit_amount": 0.0,
    "total": 43.2
  }
}
Field Type Meaning
data.billing_type string The location’s billing unit: minute, hour, day, week or month
data.units number How many units the stay counts as. Part units are rounded up; months are calendar months
data.currency string The location’s currency, else the site’s
data.line_items[].type string fee (booking fee), parking, extra PRO, discount or tax PRO
data.line_items[].reference_id integer The space type, extra, coupon or tax rate the line comes from
data.line_items[].original_unit_price number Only when a pricing rule PRO changed the price: the listed price
data.line_items[].adjustments array Only then too: each change as { "label", "amount" }
data.extras_total number PRO The sum of the extras lines, when the Extras module is installed
data.subtotal number Fee, parking and extras, before the discount
data.discount_total number The coupon’s discount
data.coupon_id, data.coupon_code integer|null, string|null The coupon applied, or null
data.tax_total number Everything added after the discount, which is the taxes PRO
data.deposit_amount number What is due now when the location takes a deposit PRO, else 0
data.total number What the booking costs, never below 0

Errors

Status Code When
422 invalid_dates entry or exit is missing or not a date.
422 invalid_range exit is not after entry.
422 too_soon entry is in the past or inside the minimum notice.
422 too_far entry is further ahead than bookings are taken.
410 form_unavailable form_id is not an active booking form.
422 location_unavailable The location does not exist, is not active, or is not on the form.
422 type_unavailable The space type is not stocked here, not active, or not on the form.
422 no_price The space type has no price for the location’s billing unit.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-car-parking/v1/quote" \
  -H "Content-Type: application/json" \
  -d '{"location_id":2,"space_type_id":1,"entry":"2026-11-20 08:00","exit":"2026-11-23 18:00","quantity":1,"coupon":"WELCOME10"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/quote');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'location_id'   => 2,
        'space_type_id' => 1,
        'entry'         => '2026-11-20 08:00',
        'exit'          => '2026-11-23 18:00',
        'quantity'      => 1,
        'coupon'        => 'WELCOME10',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/quote', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    location_id: 2,
    space_type_id: 1,
    entry: '2026-11-20 08:00',
    exit: '2026-11-23 18:00',
    quantity: 1,
    coupon: 'WELCOME10',
  }),
});
const { data } = await response.json();

Quick Links

Share