Contents
On this page

Delete Driver - Plugixa Chauffeur

DELETE /plugixa-chauffeur/v1/drivers/{id}

Delete a driver for good. There is no trash and no undo.

Needs Plugixa Chauffeur Pro with an active licence. Needs a signed-in user with both plugixa_chauffeur_manage and plugixa_chauffeur_delete: deleting is a separate grant from managing.

Note. The driver is removed from every booking first: those bookings keep everything else and get driver_id null.

Request

DELETE https://your-site.example/wp-json/plugixa-chauffeur/v1/drivers/2

Path parameters

Name Type Description
id integer The driver’s id

Responses

200 Deleted. data is null.

{
  "success": true,
  "message": "Driver deleted.",
  "data": null
}

Errors

Status Code When
404 rest_error No driver with that id.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-chauffeur/v1/drivers/2" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/drivers/2');
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-chauffeur/v1/drivers/2', {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share