Decide one verdict over an explicit list of queue items
const url = 'https://beta-api.plune.ai/v1/review-items/decisions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"itemIds":["6f1c2b3a-0000-4000-8000-0000000000b1"],"state":"approved"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/review-items/decisions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "itemIds": [ "6f1c2b3a-0000-4000-8000-0000000000b1" ], "state": "approved" }'Applies one verdict to every item in a list. Each item is applied on its own: an approved proposal creates its test case, a disputed result only changes state, and each application is audited separately. Items that cannot change are left untouched and named in the report with a reason, so repeating the decision over just those is the normal way to finish a batch rather than an error path. Partial application is a SUCCESS — the batch is not a transaction, and one stale item does not undo nineteen sound decisions. A test case is still born only from an approval; the batch is a cheaper way to say the same thing, never a second way in.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”One verdict for an explicit list. The list is never implicit: there is no “decide everything pending”, because a decision nobody enumerated is a decision nobody made.
object
A repeated id is applied once and named in the report.
One verdict for the whole list; there is no per-item verdict. pending is not a verdict — it is where an item starts.
Required together with the category when state is rejected — the same rule a single-item rejection obeys, checked in the same place. The reason belongs to the DECISION, so every rejected item carries the same one.
Examples
Approve a list of proposals
{ "itemIds": [ "6f1c2b3a-0000-4000-8000-0000000000b1" ], "state": "approved"}Reject a list with one reason
{ "itemIds": [ "6f1c2b3a-0000-4000-8000-0000000000b1" ], "state": "rejected", "rejectionCategory": "incorrect", "note": "Очікуваний результат застарів — потік змінився в червневому релізі."}Responses
Section titled “ Responses ”The decision was read and applied. Read the report, not only the status: applied may be smaller than the list that was sent.
object
How many items changed state.
How many test cases were born from those approvals. NOT the same number as applied: a disputed result changes state without creating a case.
object
Stable codes rather than prose, because a caller loops over them to repeat the decision over just these items. not_found answers both an item of another project and an id that was never issued — indistinguishable on purpose, so a list cannot become a way to learn what another project holds. quota_exceeded: approving the item would have made a test case past the case ceiling of the project. The item is untouched (still waiting, or still rejected if it had been), the rest of the list was applied, and the decision can be repeated over these once there is room. conflict: the item kept changing while the decision was being made, or approving it would have made a second test case where the first one, made by an earlier approval, is in the Bin (restore it there). failed: applying the item raised an unexpected error; the item is untouched, the rest of the list was applied, and the decision can be repeated over it.
Ids the list named more than once. Each was applied once, and counted once.
Example
{ "skipped": [ { "reason": "not_found" } ]}Nothing was applied. Either the list is missing or exceeds the ceiling on items per request, or the request carries no single verdict for the whole list, or it rejects without naming a category and an explanation — the last being the same rule a single-item rejection enforces, checked in the same place.
object
Example generated
{ "error": "example"}No / invalid token or session
Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over