Contents
Delete Serial Number - Plugixa POS for WooCommerce
DELETE /plugixa-pos/v1/serials/{id}
Remove a number that was never sold.
Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.
Request
DELETE https://your-site.example/wp-json/plugixa-pos/v1/serials/9
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The serial number’s id |
Responses
200 OK.
{
"success": true,
"data": {
"deleted": true
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_pos_not_found |
No serial number with that id. |
409 |
plugixa_pos_serial_history |
The number was sold at some point. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-pos/v1/serials/9" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/serials/9');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . 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-pos/v1/serials/9', {
method: 'DELETE',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share