Contents
On this page

List Extras - Plugixa Car Rental

GET /plugixa-car-rental/v1/extras

List extras, one page at a time.

Needs the Extras app on. The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/extras?status__in=published

Query parameters

This list takes the list parameters every paged list accepts. search matches name and description. orderby accepts id, name, price, sort_order, status, created_at, modified_at.

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

Responses

200 OK. data is one page of extras.

{
  "success": true,
  "data": [
    {
      "id": 3,
      "name": "Child seat",
      "description": "For children from 9 to 18 kg.",
      "price": 8.0,
      "price_type": "per_day",
      "max_total": 40.0,
      "max_quantity": 2,
      "sort_order": 0,
      "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
    }
  ],
  "meta": {
    "total": 4,
    "pages": 1
  }
}
Field Type Meaning
data[].id integer The extra’s id. Send it in a booking’s extras
data[].name string The name customers see
data[].price number Price per day or per rental
data[].price_type string per_day or per_rental
data[].max_total number Most a per-day extra costs for one rental, 0 for no cap
data[].max_quantity integer Most a booking may take, 1 to 20
data[].status string published or unpublished. Only a published extra is offered
meta.total integer Extras 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/extras?status__in=published" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'status__in' => 'published',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/extras?' . $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' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-rental/v1/extras?${query}`, {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data, meta } = await response.json();

Quick Links

Share