Contents
On this page

List Extras - Plugixa Car Parking

GET /plugixa-car-parking/v1/booking-extras

List extras, one page at a time. Extras are the paid add-ons a customer can pick on the booking form.

Needs Plugixa Car Parking Pro. The WordPress user needs the plugixa_carparking_view capability (view records).

Request

GET https://your-site.example/wp-json/plugixa-car-parking/v1/booking-extras?status__in=active&orderby=display_order&order=asc

Query parameters

The list parameters every paged list accepts. search matches the name and the description. orderby accepts id, name, price, status, display_order, created_at and modified_at; anything else sorts by id. view=trash lists trashed extras only.

Filterable fields: status and price_type (in, ne, empty, not_empty), price (number comparisons), and created_at and modified_at (date comparisons). For example status__in=active or price__lte=10. See Filtering lists for the syntax.

Responses

200 OK. data is one page of extras.

{
  "success": true,
  "data": [
    {
      "id": 4,
      "name": "EV charging",
      "description": "<p>Charge your car while it is parked.</p>",
      "icon": null,
      "price": 12.5,
      "price_type": "per_day",
      "max_quantity": 1,
      "applies_to": {
        "locations": [2, 5]
      },
      "status": "active",
      "display_order": 0,
      "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": 3,
    "pages": 1
  }
}
Field Type Meaning
data[].id integer The extra’s id
data[].name string Shown to the customer on the booking form
data[].price number The price, before price_type multiplies it
data[].price_type string per_booking, per_day, per_hour or per_unit
data[].max_quantity integer Most a customer can take on one booking. 0 means no limit
data[].status string active or inactive
meta.total integer Extras matching the search and filters, before paging
meta.pages integer Number of pages at this per_page

Errors

Status Code When
400 plugixa_carparking_unknown_filter A filter names a field this list cannot filter on.
400 plugixa_carparking_unknown_operator A filter uses an operator that does not work on that field.
400 plugixa_carparking_missing_value A filter has no value.
400 plugixa_carparking_invalid_date A date filter has a value that is not a date.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/booking-extras?status__in=active&orderby=display_order&order=asc" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query(['status__in' => 'active', 'orderby' => 'display_order', 'order' => 'asc']);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/booking-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 query = new URLSearchParams({ status__in: 'active', orderby: 'display_order', order: 'asc' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-parking/v1/booking-extras?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data, meta } = await response.json();

Quick Links

Share