Contents
On this page
Update Customer Group - Plugixa Car Parking
PUT /plugixa-car-parking/v1/customer-groups/{id}
Change a customer group’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. Members are not changed here: use Add Member and Remove Member.
Request
PUT https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The customer group’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
No | Must not be blank. |
slug |
string |
No | Empty leaves it unchanged. Made unique by appending -2, -3, … |
description |
string |
No | Plain text. Tags are stripped; line breaks are kept. |
{
"description": "Commuters on a yearly or monthly contract."
}
Responses
200 OK. data is the updated customer group.
{
"success": true,
"data": {
"id": 3,
"name": "Season ticket holders",
"slug": "season-ticket-holders",
"description": "Commuters on a yearly or monthly contract.",
"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,
"member_count": 12
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The group’s id |
data.name |
string |
The group’s name |
data.slug |
string |
Unique among all groups, trashed ones included |
data.description |
string|null |
Plain text, or null when none was given |
data.member_count |
integer |
How many users are in the group |
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 customer group 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_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/customer-groups/3" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"description":"Commuters on a yearly or monthly contract."}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3');
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([
'description' => 'Commuters on a yearly or monthly contract.',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3', {
method: 'PUT',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
'Content-Type': 'application/json',
},
body: JSON.stringify({ description: 'Commuters on a yearly or monthly contract.' }),
});
const { data } = await response.json();
Quick Links
Share