Contents
On this page

Delete Several Feedback Votes - Plugixa FAQ

DELETE /plugixa-faq/v1/feedback/bulk

Delete several votes in one request, adjusting each FAQ’s counters.

Administrators only: the user needs the plugixa_faq_settings capability or WordPress’s manage_options. Needs Plugixa FAQ Pro: the free build does not register this route, so it answers 404 there.

Request

DELETE https://your-site.example/wp-json/plugixa-faq/v1/feedback/bulk

Request body

Content type: application/json

Field Type Required Description
ids integer[] Yes The votes to delete. Unknown ids are skipped.
{
  "ids": [
    311,
    312
  ]
}

Responses

200 OK.

{
  "success": true,
  "message": "2 feedback items deleted",
  "data": {
    "deleted": 2
  }
}
Field Type Meaning
data.deleted integer Votes actually deleted
message string A human-readable confirmation, translated to the site language

Errors

Status Code When
400 rest_error “No items selected” (ids missing, empty or not a list) or “Invalid item IDs” (no positive id in it).

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-faq/v1/feedback/bulk" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"ids":[311,312]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-faq/v1/feedback/bulk');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'ids' => [311, 312],
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-faq/v1/feedback/bulk', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ ids: [311, 312] }),
});
const { data } = await response.json();

Quick Links

Share