Contents
On this page

Get Vehicle Model - Plugixa Car Rental

GET /plugixa-car-rental/v1/vehicle-models/{id}

Read one vehicle model.

The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models/4

Path parameters

Name Type Description
id integer The vehicle model’s id

Responses

200 OK. data is the vehicle model.

{
  "success": true,
  "data": {
    "id": 4,
    "category_id": 2,
    "name": "Peugeot 3008",
    "make": "Peugeot",
    "model": "3008",
    "year": 2025,
    "transmission": "automatic",
    "fuel": "diesel",
    "seats": 5,
    "doors": 5,
    "bags": 3,
    "air_conditioning": true,
    "mileage_limit": 300,
    "min_driver_age": 23,
    "deposit": 800.0,
    "image_id": 51,
    "description": "<p>A roomy SUV with a large boot.</p>",
    "sort_order": 10,
    "status": "published",
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 09:30:00",
    "deleted_at": null,
    "category_name": "SUV",
    "image_url": "https://your-site.example/wp-content/uploads/2026/11/peugeot-3008-150x150.webp",
    "units_count": 3
  }
}
Field Type Meaning
data.id integer The model’s id. Bookings, rates and cars point at it
data.name string The name customers see
data.category_id integer|null Its vehicle category, or null
data.category_name string|null That category’s name
data.status string published or unpublished. Only a published model can be booked
data.units_count integer Cars of this model in the fleet, trash excluded
data.image_url string|null The image’s thumbnail, or null
data.year integer|null Model year
data.transmission string automatic or manual
data.fuel string petrol, diesel, hybrid, electric or lpg
data.seats integer Seats
data.doors integer Doors
data.bags integer Bags it takes
data.air_conditioning boolean Whether it has air conditioning
data.mileage_limit integer Distance included per day, 0 for unlimited
data.min_driver_age integer Youngest driver allowed
data.deposit number Deposit held at the desk, not part of the price
data.image_id integer|null Media library image
data.description string|null HTML
data.created_at string UTC datetime the record was created
data.modified_at string UTC datetime of the last change. Send it back on an update to be warned of a conflicting edit
data.deleted_at string|null null unless the record is in the trash

Errors

Status Code When
404 plugixa_car_rental_not_found No vehicle model with that id, or it is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models/4" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models/4');
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 response = await fetch('https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models/4', {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share