Contents
On this page

Sign Inspection - Plugixa Car Rental

POST /plugixa-car-rental/v1/bookings/{id}/inspections/{kind}/sign

Record the customer’s signature on a saved inspection and make the signed PDF: the rental agreement at pickup, the return record at return.

Needs Plugixa Car Rental Pro with the Inspections app on. The user needs the plugixa_car_rental_edit capability.

Signing locks the inspection, stores the signature and the PDF privately, and moves the booking on: a pickup signature moves it to picked_up, a return signature to returned, when that move is allowed. The car’s odometer is raised to the reading, never lowered. plugixa_car_rental_inspection_signed fires.

Request

POST https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/sign

Path parameters

Name Type Description
id integer The booking’s id
kind string pickup or return

Request body

Content type: application/json

Field Type Required Description
signer_name string Yes Name of the person signing, up to 190 characters.
agree boolean Yes Must be true: the customer agrees to the terms.
signature string Yes The signature as a PNG data URL (data:image/png;base64,...), at most 400 KB, 20 by 10 to 2400 by 2400 pixels.

The odometer and the fuel level must have been saved first.

{
  "signer_name": "Claire Martin",
  "agree": true,
  "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAAA"
}

Responses

201 Created. data is the signed inspection.

{
  "success": true,
  "data": {
    "photo_urls": {
      "61": "https://your-site.example/wp-content/uploads/2026/12/bumper-150x150.webp"
    },
    "id": 4,
    "kind": "pickup",
    "odometer": 18250,
    "fuel": 8,
    "damage": [
      {
        "zone": "rear_bumper",
        "kind": "scratch",
        "note": "Light scratch, left corner.",
        "photo_ids": [
          61
        ],
        "new": false
      }
    ],
    "photo_ids": [],
    "notes": "",
    "status": "signed",
    "signer_name": "Claire Martin",
    "signed_at": "2026-12-01 09:12:00",
    "contract_hash": "9f2c4e7a1b3d5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8"
  }
}
Field Type Meaning
data.status string signed
data.signer_name string Who signed
data.signed_at string UTC datetime it was signed
data.contract_hash string SHA-256 of the PDF, checked each time it is downloaded

Errors

Status Code When
404 plugixa_car_rental_not_found No booking with that id, or it is in the trash.
409 plugixa_car_rental_inspection The booking is not in a status where this inspection is made, the inspection has not been saved, or it is already signed.
422 plugixa_car_rental_invalid The odometer or fuel level is missing, signer_name is blank or too long, agree is not true, or signature is not a PNG data URL within the limits. data.field names it.
500 plugixa_car_rental_inspection The PDF engine is missing, or the files could not be written to the uploads folder.
503 plugixa_car_rental_inspection The same inspection was being signed at that moment. Try again.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/sign" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"signer_name":"Claire Martin","agree":true,"signature":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAAA"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/inspections/pickup/sign');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        'signer_name' => 'Claire Martin',
        'agree'       => true,
        'signature'   => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAAA',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
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/sign', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    signer_name: 'Claire Martin',
    agree: true,
    signature: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAAA',
  }),
});
const { data } = await response.json();

Quick Links

Share