Contents
Delete Exception - Plugixa Car Parking
DELETE /plugixa-car-parking/v1/locations/{id}/exceptions/{exception_id}
Remove an exception from a location. It is deleted for good: exceptions have no trash.
The user needs the plugixa_carparking_edit capability.
Request
DELETE https://your-site.example/wp-json/plugixa-car-parking/v1/locations/4/exceptions/8
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The location’s id |
exception_id |
integer |
The exception’s id |
Responses
200 OK. The exception is gone.
{
"success": true,
"data": {
"deleted": true
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_carparking_not_found |
No exception with that id at this location. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-car-parking/v1/locations/4/exceptions/8" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/locations/4/exceptions/8');
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/locations/4/exceptions/8', {
method: 'DELETE',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share