Contents
On this page

Export Bookings - Plugixa Car Parking

GET /plugixa-car-parking/v1/bookings/export

Download the bookings as a CSV file, narrowed by the same search and filters as List Bookings.

The user needs the plugixa_carparking_export capability.

Note. The file holds at most 10,000 bookings and says nothing when there were more: narrow the export with filters (for example by created_at) and download it in parts. The answer is the CSV itself, not the JSON envelope.

Request

GET https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/export?entry_datetime__between=2026-12-01,2026-12-31

Query parameters

Name Type Default Description
search string Matches the booking reference, the customer name, the customer e-mail and the licence plate.
order string desc asc or desc. Rows are always sorted by booking id; orderby is ignored.
view string trash to export trashed bookings only.

Plus the same filters as List Bookings, such as status__in=confirmed,paid or location_id__in=3. page and per_page do not apply.

Responses

200 OK. The body is a CSV file.

Headers: Content-Type: text/csv; charset=utf-8 and Content-Disposition: attachment; filename="bookings-2026-11-12.csv" (the date is the site’s today).

"Reference","Status","Payment status","Location","Space type","Entry","Exit","Quantity","Customer","Email","Phone","Licence plate","Currency","Subtotal","Discount","Total","Paid","Notes","Additional details","Created (UTC)"
"PKG-3F9A1C","Confirmed","Part paid","Airport North","Standard","2026-12-01 08:00:00","2026-12-04 08:00:00","1","Lucas Bernard","lucas@example.com","+33 6 12 34 56 78","AB-123-CD","EUR","45.5","4.55","40.95","10","Arrives on the late flight.","Flight number: AF1234","2026-11-12 09:30:00"
Column Meaning
Reference The booking reference
Status, Payment status Their readable labels, not the stored keys
Location, Space type Names, empty when the record no longer exists
Entry, Exit In the site’s time zone
Subtotal, Discount, Total, Paid Plain numbers with a dot for decimals
Additional details The custom answers, joined with ;
Created (UTC) When the booking was created, in UTC

Every cell is quoted and lines end with CRLF. The header row is in the site’s language. A cell that is not a number and starts with =, +, -, @, a tab or a carriage return is prefixed with ', so a spreadsheet does not run it as a formula. Developers can change the columns with the plugixa_carparking_booking_export_columns filter.

Errors

Status Code When
400 plugixa_carparking_unknown_filter A filter names a field bookings cannot be filtered on.
400 plugixa_carparking_unknown_operator The operator does not work on that field.
400 plugixa_carparking_missing_value A filter is missing its value.
400 plugixa_carparking_invalid_date A date filter’s value is not a date.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/export?entry_datetime__between=2026-12-01,2026-12-31" \
  -u "admin:$WP_APP_PASSWORD" \
  -o bookings.csv
<?php
$query = http_build_query(['entry_datetime__between' => '2026-12-01,2026-12-31']);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/export?' . $query);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
file_put_contents('bookings.csv', curl_exec($ch));
curl_close($ch);
const query = new URLSearchParams({ entry_datetime__between: '2026-12-01,2026-12-31' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/export?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const csv = await response.text();

Quick Links

Share