Contents
On this page
Update Tax Rate - Plugixa Car Parking
PUT /plugixa-car-parking/v1/tax-rates/{id}
Change a tax rate’s fields. PATCH is accepted too and behaves the same.
Needs Plugixa Car Parking Pro. The WordPress user needs the plugixa_carparking_edit capability (change records).
Note. Only the fields you send change: anything left out keeps its stored value. The 100 limit on a percentage is checked against the rate as it will stand, so sending only
type: "percent"is refused when the stored rate is above 100.applies_tois replaced as a whole.
Request
PUT https://your-site.example/wp-json/plugixa-car-parking/v1/tax-rates/2
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The tax rate’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
No | Must not be blank. |
rate |
number |
No | Zero or more. At most 100 when type is percent, at most 999.9999 otherwise. |
type |
string |
No | percent: a share of the booking. fixed: the same amount on every booking. Empty leaves it unchanged. |
is_compound |
boolean |
No | true to charge the rate on the booking plus the taxes charged before it. |
status |
string |
No | active or inactive. Empty leaves it unchanged. |
applies_to |
object|null |
No | {"locations": [3]} to charge the rate only at those locations. null, an empty string or an empty list means every location. |
display_order |
integer |
No | May be negative. |
{
"rate": 21,
"applies_to": {
"locations": [3]
}
}
Responses
200 OK. data is the updated tax rate.
{
"success": true,
"data": {
"id": 2,
"name": "VAT",
"rate": 21.0,
"type": "percent",
"is_compound": false,
"applies_to": {
"locations": [3]
},
"status": "active",
"display_order": 0,
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 09:30:00",
"modified_at": "2026-11-12 10:15:00",
"deleted_at": null
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The tax rate’s id |
data.name |
string |
Shown on the quote and the invoice beside the tax charged |
data.rate |
number |
A percentage when type is percent, an amount when it is fixed |
data.type |
string |
percent or fixed |
data.is_compound |
boolean |
Whether the rate is charged on the taxed price |
data.status |
string |
active or inactive |
data.applies_to |
object|null |
{"locations": [ids]} when the rate is charged only at those locations, null when it is charged everywhere |
data.display_order |
integer |
The order rates are charged in, lowest first |
data.created_at |
string |
UTC datetime |
data.modified_at |
string |
UTC datetime of the last change. Send it back on an update to have the change refused if somebody else saved first |
data.deleted_at |
string|null |
null unless the record is in the trash |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_carparking_not_found |
No tax rate with that id, or it is in the trash. |
409 |
plugixa_carparking_conflict |
You sent modified_at and the stored record has changed since: somebody else saved first. |
422 |
plugixa_carparking_missing_name |
name is sent blank. |
422 |
plugixa_carparking_invalid_choice |
status or type is not one of the accepted values. data.allowed lists them. |
422 |
plugixa_carparking_not_a_number |
rate or display_order is not a number. Use a dot for decimals. |
422 |
plugixa_carparking_number_too_large |
A number is larger than 99999999. |
422 |
plugixa_carparking_negative_number |
rate is negative. |
422 |
plugixa_carparking_invalid_rate |
A percent rate above 100, or any rate above 999.9999. |
422 |
plugixa_carparking_not_a_boolean |
is_compound is not true or false. |
422 |
plugixa_carparking_invalid_scope |
applies_to is not an object whose locations is a list of location ids. |
422 |
plugixa_carparking_too_long |
A text field is longer than its column holds. data.field names it and data.max gives the limit. |
Plus the errors every endpoint can return.
Examples
curl -s -X PUT "https://your-site.example/wp-json/plugixa-car-parking/v1/tax-rates/2" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"rate":21,"applies_to":{"locations":[3]}}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/tax-rates/2');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'rate' => 21,
'applies_to' => [
'locations' => [3],
],
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/tax-rates/2', {
method: 'PUT',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
'Content-Type': 'application/json',
},
body: JSON.stringify({ rate: 21, applies_to: { locations: [3] } }),
});
const { data } = await response.json();
Quick Links
Share