Contents
On this page

List Vehicle Models - Plugixa Car Rental

GET /plugixa-car-rental/v1/vehicle-models

List vehicle models, one page at a time.

The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models?status__in=published&fuel__in=diesel,hybrid

Query parameters

This list takes the list parameters every paged list accepts. search matches name, make and model. orderby accepts id, name, make, year, seats, sort_order, status, created_at, modified_at.

Filters, as described in Filtering lists: status (in, ne, empty, not_empty), category_id (in, ne, empty, not_empty), transmission (in, ne, empty, not_empty), fuel (in, ne, empty, not_empty), created_at and modified_at (dates).

Responses

200 OK. data is one page of vehicle models.

{
  "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
    }
  ],
  "meta": {
    "total": 4,
    "pages": 1
  }
}
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
meta.total integer Vehicle Models matching the search and filters, before paging
meta.pages integer Number of pages at this per_page

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models?status__in=published&fuel__in=diesel,hybrid" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'status__in' => 'published',
    'fuel__in'   => 'diesel,hybrid',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models?' . $query);
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 query = new URLSearchParams({ status__in: 'published', fuel__in: 'diesel,hybrid' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/vehicle-models?${query}`, {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data, meta } = await response.json();

Quick Links

Share