Contents
Remove Fleet Member - Plugixa Car Wash
DELETE /plugixa-carwash/v1/fleet-accounts/{id}/members/{customer}
Unlink a customer from a company account. Their next bookings are their own again; charges already made stay on the account.
Needs Plugixa Car Wash Pro with the Fleet accounts app on, and the plugixa_carwash_edit capability.
Note. Nothing is looked up first: an unknown account or a customer who was not a member still answers
200with the current member list.
Request
DELETE https://your-site.example/wp-json/plugixa-carwash/v1/fleet-accounts/6/members/25
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The company account’s id |
customer |
integer |
The customer’s id |
Responses
200 OK. data is the members left.
{
"success": true,
"data": []
}
| Field | Type | Meaning |
|---|---|---|
data[].customer_id |
integer |
The customer |
data[].role |
string |
driver or manager |
Errors
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-carwash/v1/fleet-accounts/6/members/25" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-carwash/v1/fleet-accounts/6/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 auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-carwash/v1/fleet-accounts/6/members/25', {
method: 'DELETE',
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data } = await response.json();
Quick Links
Share