Contents
On this page

Remove Member - Plugixa Car Parking

DELETE /plugixa-car-parking/v1/customer-groups/{id}/members/{user_id}

Take one user out of a customer group. The user account itself is not touched.

Needs Plugixa Car Parking Pro. The WordPress user needs the plugixa_carparking_edit capability (change records).

Note. Removing a user who is not a member is not an error: the answer is 200 with the members unchanged.

Request

DELETE https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3/members/25

Path parameters

Name Type Description
id integer The group’s id
user_id integer The WordPress user id to remove

Responses

200 OK. data is the members who remain.

{
  "success": true,
  "data": [
    {
      "id": 31,
      "name": "Emma Laurent",
      "email": "emma@example.com"
    }
  ]
}
Field Type Meaning
data[].id integer The WordPress user id
data[].name string The user’s display name, or # and the id if the user no longer exists
data[].email string The user’s e-mail, empty if the user no longer exists

Errors

Status Code When
404 plugixa_carparking_not_found No customer group with that id, or it is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3/members/25" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/customer-groups/3/members/25');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$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/members/25', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share