Contents
On this page

Delete Booking Form - Plugixa Chauffeur

DELETE /plugixa-chauffeur/v1/booking-forms/{id}

Delete a booking form for good. There is no trash and no undo.

Needs a signed-in user with both plugixa_chauffeur_manage and plugixa_chauffeur_delete: deleting is a separate grant from managing.

Note. Bookings made with the form are kept and still carry its id. A page that still shows the form’s shortcode stops working.

Request

DELETE https://your-site.example/wp-json/plugixa-chauffeur/v1/booking-forms/1

Path parameters

Name Type Description
id integer The booking form’s id

Responses

200 Deleted. data is null.

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

Errors

Status Code When
404 rest_error No booking form with that id.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share