Contents
On this page
Download Signed Inspection - Plugixa Car Rental
GET /plugixa-car-rental/v1/bookings/{id}/inspections/{kind}/contract
Download the signed PDF of an inspection: the rental agreement for pickup, the return record for return.
Needs Plugixa Car Rental Pro with the Inspections app on. The user needs the plugixa_car_rental_view capability.
Request
GET https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/contract
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The booking’s id |
kind |
string |
pickup or return |
Responses
200 OK. The body is the PDF itself, not JSON.
Headers: Content-Type: application/pdf, Content-Disposition: inline; filename="rental-agreement-CR-2026-0128.pdf" (return-record-... for a return), and Cache-Control: private, no-store.
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_car_rental_not_found |
The inspection is not signed, the booking does not exist, or the stored file no longer matches what was signed. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/contract" \
-u "admin:$WP_APP_PASSWORD" \
-o rental-agreement-CR-2026-0128.pdf
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/contract');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
file_put_contents('rental-agreement-CR-2026-0128.pdf', curl_exec($ch));
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/contract', {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const pdf = await response.blob();
Quick Links
Share