Contents
On this page
Plugixa Car Parking REST API - Plugixa Car Parking
The integration surface for Plugixa Car Parking: bookings, payments, locations, spaces, space types, coupons and booking forms you can list, create, edit and delete, the Pro catalogues (extras, tax rates, pricing rules, customer groups), and the public routes the booking form and the account page use. Enough to sync bookings into another system, feed a gate or a BI tool, or build your own booking front end.
Everything the admin app, the booking form and the account page do, they do over this API, under the namespace plugixa-car-parking/v1. Every rule is enforced at the route, not in the page.
This is the API the plugin’s own screens use. It is not a separately versioned public API, and the plugin makes no promise that routes, parameters or response shapes stay the same between versions. Pin the plugin version you build against, and test after updating.
Base URL
https://your-site.example/wp-json/plugixa-car-parking/v1
On a site with plain permalinks, pass the route as a parameter instead:
https://your-site.example/?rest_route=/plugixa-car-parking/v1/bookings
Authentication
There are two kinds of route.
Admin routes are for staff. The plugin adds no authentication of its own and has no API keys: it relies on whatever WordPress provides, then checks the capabilities of the user WordPress identified. From a script, use a WordPress Application Password (created under Users -> Profile -> Application Passwords) for an account that holds the capabilities below:
curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/bookings" \
-u "admin:$WP_APP_PASSWORD"
| Caller | How it signs in |
|---|---|
| A script or another system | An Application Password, or any other method WordPress accepts for REST requests |
| The admin app | The logged-in cookie plus a REST nonce in X-WP-Nonce, the normal WordPress way |
| The booking form and the account page | Nothing: they call the public routes |
Public routes are open to visitors, because the booking form and the account page run for people who are not signed in. They are protected differently: see Public routes.
Capabilities
| Capability | What it allows |
|---|---|
plugixa_carparking_view |
Read records: every list and every single record |
plugixa_carparking_create |
Create records, and record a payment |
plugixa_carparking_edit |
Change records, refund a payment, run a mass update |
plugixa_carparking_delete |
Move records to the trash, restore them, delete them permanently, run a mass delete |
plugixa_carparking_export |
Download the bookings CSV |
plugixa_carparking_manage_settings |
Read and save the plugin’s settings (not part of this reference) |
plugixa_carparking_manage |
Open the admin app. Never granted directly: anyone who holds one of the six above has it. |
Activation grants all of them to the Administrator role and to nobody else. A user with the WordPress manage_options capability is always treated as holding every one. The plugin has no screen for assigning them to other roles; they are ordinary WordPress capabilities, so any role editor plugin can grant them. A dedicated integration user with only plugixa_carparking_view, for example, can read everything and change nothing.
The verdict of every check passes through the plugixa_carparking_user_can filter, so a site can narrow it per record. See Hooks.
Responses
A successful admin response wraps its payload:
{
"success": true,
"data": { "id": 12, "name": "Airport P1" },
"meta": { "total": 42, "pages": 1 }
}
meta is only present on lists. Send request bodies as JSON with Content-Type: application/json. Ids and counts are integers. created_at, modified_at and deleted_at are UTC strings in the form 2026-11-12 09:30:00. A booking’s entry_datetime and exit_datetime are in the site’s local time, in the same form. Dates you send are YYYY-MM-DD, optionally followed by HH:MM or HH:MM:SS after a space or a T; a bare date means midnight. Send local times without a time-zone offset.
Public routes answer with a message as well, a sentence meant for the customer:
{
"success": true,
"message": "Your booking has been created.",
"data": {}
}
Edit conflicts
Every record carries modified_at. When an update sends back the modified_at it read, the plugin compares it with the stored one and answers 409 plugixa_carparking_conflict if they differ: somebody else saved the record in between. The error’s data carries expected and current.
The check is opt-in: an update that sends no modified_at is not checked. Two saves inside the same second cannot be told apart. A script that reads, changes and writes back a record should send modified_at so it never overwrites a change made by staff in the meantime.
Lists and pagination
Every list endpoint accepts the same parameters, and puts the totals in meta, not in headers (X-WP-Total is not sent).
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer |
1 |
Page to return, from 1 |
per_page |
integer |
50 |
Rows per page, 1 to 200 |
search |
string |
Substring search over the columns each endpoint lists | |
orderby |
string |
id |
One of the sortable columns each endpoint lists. Anything else falls back to id |
order |
string |
desc |
asc or desc |
view |
string |
trash lists trashed records only |
Filtering lists
Besides search, a list can be narrowed field by field with query parameters of the form <field>__<operator>=<value>:
GET /plugixa-car-parking/v1/bookings?status__in=confirmed,paid&entry_datetime__between=2026-11-01,2026-11-30
| Operator | Meaning |
|---|---|
eq, ne |
Equal, not equal |
gt, gte, lt, lte |
Greater or less than, for numbers and dates |
between |
Two values, comma-separated, both included |
in |
Any of several values, comma-separated |
contains |
Text contains the value |
empty, not_empty |
The field has no value, or has one. The value sent is ignored |
Which fields and operators a list accepts depends on the resource, and each list page names its fields. Every list can be filtered on created_at and modified_at. Asking for a field the list does not have, or an operator that does not work on it, is refused with a 400 rather than ignored, so a typo never quietly returns a wider list.
Trash
DELETE on a record moves it to the trash; it stops appearing in lists and single reads, and comes back with view=trash on its list.
A location, a space type or a space that upcoming bookings still use cannot be trashed: the answer is 409 with a code ending in _in_use (for example plugixa_carparking_location_in_use) and a sentence saying how many bookings are in the way. Upcoming means bookings that have not ended and whose status holds a space: pending, confirmed, paid and completed by default. Two more routes exist for every resource that has a Delete endpoint:
| Method | Route | What it does |
|---|---|---|
POST |
/<resource>/{id}/restore |
Bring the record back from the trash. Answers {"restored": true} in data |
DELETE |
/<resource>/{id}/purge |
Delete it permanently. Answers {"purged": true} in data |
Both need plugixa_carparking_delete. Purge does not require the record to be in the trash first. <resource> is the path of the resource’s list, for example bookings or location-spaces. An id that does not exist, or a restore of a record that is not in the trash, answers 404 plugixa_carparking_not_found.
Endpoints
Admin routes, for a signed-in user with the capabilities above:
| Resource | Endpoints |
|---|---|
| Bookings | List, Create, Get, Update, Delete, Quote, Export CSV |
| Payments | List, Record, Get, Refund |
| Monthly plans PRO | Get, End |
| Locations | List, Create, Get, Update, Delete, Opening hours, Update opening hours, Exceptions, Create exception, Update exception, Delete exception |
| Spaces | List, Create, Get, Update, Delete, Add numbered |
| Space types | List, Create, Get, Update, Delete, Prices, Update prices |
| Coupons | List, Create, Get, Update, Delete |
| Booking forms | List, Create, Get, Update, Delete |
| Extras PRO | List, Create, Get, Update, Delete |
| Tax rates PRO | List, Create, Get, Update, Delete |
| Pricing rules PRO | List, Create, Get, Update, Delete |
| Customer groups PRO | List, Create, Get, Update, Delete, Members, Add member, Remove member |
| Mass actions | Apply |
Public routes, for the booking form, the account page or your own front end:
| Resource | Endpoints |
|---|---|
| Booking flow | Availability, Price a stay, Book a space, Validate coupon, Start payment |
| Customer account | Bookings, Cancel, Reschedule PRO |
The Pro routes exist only when Plugixa Car Parking Pro is active. On a free site they answer with WordPress’s ordinary 404 for an unknown route.
Public routes
The public routes run without a WordPress login. A public route cannot ask who is calling, so it checks three things, cheapest first.
- Honeypot. Create Booking refuses a request whose hidden
pcp_hpfield is filled in, with400plugixa_carparking_rejected. - Rate limit. Counted per visitor address and per bucket, see below.
- CAPTCHA. Nothing is bundled. A site adds one with the
plugixa_carparking_public_request_captchafilter; a refusal answers403plugixa_carparking_captcha_failed.
The routes that change something or act on a booking (Book a Space, Validate Coupon, Start Payment, cancel and reschedule) also need the public nonce the plugin’s booking and account pages print. Send it as security in the body or in the X-Plugixa-Carparking-Nonce header. Without a valid one the answer is 403: “Your session expired. Please refresh and try again.” The nonce shows that the request came from one of the site’s own pages; it identifies nobody. For a visitor who is not signed in it stays valid for 60 days, so a page left open does not go stale. A signed-in visitor’s browser must also send the usual X-WP-Nonce, or WordPress treats the call as coming from a guest.
A refusal from a public route usually has the code rest_error, with data.status and a message written for the customer. Refusals from the booking engine keep their own short codes, such as invalid_range, too_soon, no_availability or busy: each endpoint page lists them.
Rate limits
| Bucket | Requests | Window |
|---|---|---|
availability |
120 | 10 minutes |
quote |
240 | 10 minutes |
quote_coupon |
30 | 10 minutes |
booking |
10 | 1 hour |
payment_start |
20 | 1 hour |
account_lookup |
10 | 15 minutes |
account_list |
60 | 10 minutes |
account_change |
10 | 1 hour |
coupon_validate |
10 | 10 minutes |
invoice |
30 | 10 minutes |
Over the limit the answer is 429 plugixa_carparking_rate_limited with a Retry-After header in seconds. The admin routes have no rate limit.
The counter is kept per address, and the address is read from REMOTE_ADDR only. On a site behind a proxy or a CDN every visitor shares the proxy’s address and therefore one counter: use the plugixa_carparking_client_ip filter to name the header your proxy sets. The limits themselves are changed with plugixa_carparking_rate_limits.
Routes for payment providers
Two more public routes are not for you to call: /payment/return, where a payment provider sends the customer’s browser back, and /payment/webhook/{gateway}, where a provider reports a payment. They also answer at the old namespace plugixacarparking/v1, because those addresses are pasted into provider dashboards; version 1.2.0 still writes the return address on the old namespace. The Pro PDF invoice link (/invoice) answers on both namespaces too, because it is linked from emails customers already hold. Every other address on the old namespace answers 404.
Errors
Errors use the standard WordPress shape:
{
"code": "plugixa_carparking_forbidden",
"message": "You are not allowed to do that.",
"data": { "status": 403 }
}
These can come back from any endpoint. Each endpoint page lists its own errors on top of them.
| Status | Code | When |
|---|---|---|
401 |
plugixa_carparking_forbidden |
An admin route was called without a signed-in user: no credentials, or a cookie without its nonce. |
401 |
incorrect_password |
WordPress refused the Application Password before the plugin saw the request. |
403 |
plugixa_carparking_forbidden |
The user is signed in but lacks the capability. |
404 |
plugixa_carparking_not_found |
No record with that id, or it is in the trash. |
409 |
plugixa_carparking_conflict |
The modified_at you sent is not the stored one. See Edit conflicts. |
400 |
plugixa_carparking_unknown_filter |
A list filter names a field the list does not have. |
400 |
plugixa_carparking_unknown_operator |
A list filter uses an operator that does not work on that field. |
400 |
plugixa_carparking_missing_value |
A list filter has fewer values than its operator needs. |
400 |
plugixa_carparking_invalid_date |
A list filter on a date field has a value that is not a date. |
422 |
plugixa_carparking_invalid_choice, plugixa_carparking_not_a_number, plugixa_carparking_number_too_large, plugixa_carparking_negative_number, plugixa_carparking_too_long |
A body field failed validation. data.field names the field; data.allowed lists the accepted values of a choice, and data.max the longest text allowed. Numbers are capped at 99999999. |
429 |
plugixa_carparking_rate_limited |
A public route’s rate limit was reached. |
404 |
rest_no_route |
No such route or method, or a Pro route on a site without Pro. |
Filtering what comes back
| Hook | Changes |
|---|---|
plugixa_carparking_filter_output |
Every successful admin payload, with the resource’s type, before it is sent. The place to hide fields from some users |
plugixa_carparking_user_can |
The verdict of every capability check |
plugixa_carparking_rate_limits |
The public rate limits |
plugixa_carparking_client_ip |
The address a public request is counted against |
plugixa_carparking_public_request_captcha |
Adds a CAPTCHA check to the public routes |
Register your own routes on the plugixa_carparking_register_rest_routes action, which passes the namespace (and the plugin’s service container as a second argument):
add_action( 'plugixa_carparking_register_rest_routes', function ( $namespace ) {
register_rest_route(
$namespace,
'/gate-status',
array(
'methods' => 'GET',
'callback' => fn() => rest_ensure_response( array( 'open' => true ) ),
'permission_callback' => fn() => current_user_can( 'plugixa_carparking_view' ),
)
);
} );
See Hooks for the full set.
Troubleshooting
| Symptom | Usual cause |
|---|---|
401 from a script |
The Application Password is wrong or missing, or the host strips the Authorization header before PHP sees it. |
401 or 403 from the browser |
The REST nonce is missing or stale. Reload the admin. |
403 with a valid login |
The user lacks the capability. Grant it with a role editor, or use an administrator account. |
404 on a Pro route |
Plugixa Car Parking Pro is not installed or active. |
429 on a public route behind a proxy |
Every visitor shares the proxy’s address. Set plugixa_carparking_client_ip. |
403 “Your session expired” from a public write |
The public nonce is missing or comes from another site. Read it from one of the plugin’s pages. |
409 on an update |
Somebody saved the record after you read it. Read it again and reapply your change. |
See also
- Change behaviour in PHP instead: Hooks.
- How bookings are priced: Pricing.
- The screens behind these records: Bookings, Locations, Booking forms.
Quick Links
Share