Contents
On this page

Get Held Booking - Plugixa Car Rental

POST /plugixa-car-rental/v1/public/booking

Read the booking a token opens: its price, its hold and what may be paid now.

Public: no sign-in and no nonce. Needs the Booking form app on. Rate limited to 120 requests an hour per visitor address: see Public routes.

It is a POST so that the token travels in the body, not in the address. It answers for a booking in any status, not only a pending one.

Request

POST https://your-site.example/wp-json/plugixa-car-rental/v1/public/booking

Request body

Content type: application/json

Field Type Required Description
token string Yes The token Hold Car returned.
{
  "token": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"
}

Responses

200 OK. data is the booking as a visitor may see it.

{
  "success": true,
  "data": {
    "reference": "CR-2026-0128",
    "status": "pending",
    "vehicle_model_name": "Peugeot 3008",
    "pickup_location_name": "Paris Gare de Lyon",
    "return_location_name": "Paris Gare de Lyon",
    "pickup_local": "2026-12-01 10:00 CET",
    "return_local": "2026-12-04 10:00 CET",
    "days": 3,
    "hold_expires_at": "2026-11-12T09:45:00Z",
    "customer_name": "",
    "customer_email": "",
    "payment_method": "",
    "currency": "EUR",
    "line_items": [
      {
        "type": "rental",
        "label": "Peugeot 3008, 3 days",
        "quantity": 3.0,
        "unit_price": 65.0,
        "total": 195.0
      },
      {
        "type": "extra",
        "label": "Child seat",
        "quantity": 1.0,
        "unit_price": 24.0,
        "total": 24.0
      }
    ],
    "subtotal": 219.0,
    "discount_total": 0.0,
    "tax_total": 0.0,
    "total": 219.0,
    "deposit": 800.0,
    "amount_paid": 0.0,
    "payment_status": "unpaid",
    "payment_options": [
      {
        "type": "full",
        "amount": 219.0,
        "label": ""
      }
    ]
  }
}
Field Type Meaning
data.reference string Booking reference
data.status string Booking status
data.hold_expires_at string|null When the hold runs out, ISO 8601 in UTC with a Z, or null
data.pickup_local string Pickup on the pickup location’s clock
data.return_local string Return on the return location’s clock
data.days integer Days charged
data.line_items object[] Price lines: type, label, quantity, unit_price, total
data.total number What the customer pays
data.deposit number Held at the desk, not part of total
data.amount_paid number Paid so far
data.payment_status string unpaid, partially_paid, paid or refunded
data.payment_options object[] What may be paid online now: type (full, balance, or part with Pro’s Pay part now app), amount, label. Empty when nothing is owed

Errors

Status Code When
404 plugixa_car_rental_not_found No booking has that token, or it is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-car-rental/v1/public/booking" \
  -H "Content-Type: application/json" \
  -d '{"token":"ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/public/booking');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'token' => 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-car-rental/v1/public/booking', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    token: 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb',
  }),
});
const { data } = await response.json();

Quick Links

Share