Contents
Report Review - Plugixa Stream
POST /plugixa-stream/v1/reviews/{id}/report
Flag a published review. Each account counts once per review; at 3 reports the review is held as pending until the owner looks at it.
Any signed-in user (an Application Password, or the login cookie with an X-WP-Nonce header). Signed out, it answers 401 plugixa_stream_login_required. It always acts on the caller’s own account. Rate-limited with the other review requests: 60 a minute per account.
Request
POST https://your-site.example/wp-json/plugixa-stream/v1/reviews/31/report
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The review’s id |
Responses
200 OK.
{
"success": true,
"data": {
"reported": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.reported |
boolean |
true, also when this account had already reported it |
Errors
| Status | Code | When |
|---|---|---|
401 |
plugixa_stream_login_required |
Signed out. |
404 |
plugixa_stream_not_found |
No published review with that id. |
422 |
plugixa_stream_invalid |
It is the caller’s own review. |
429 |
plugixa_stream_rate_limited |
More than 60 requests of this kind in the current minute. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-stream/v1/reviews/31/report" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/reviews/31/report');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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-stream/v1/reviews/31/report', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share