> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Decide over a batch of requests in one call — for enterprises scoring whole

> portfolios (e.g. refund-eligibility across 10k orders). Each item is metered independently (so quota/billing behave exactly as N single calls)…

portfolios (e.g. refund-eligibility across 10k orders). Each item is metered
independently (so quota/billing behave exactly as N single calls); a failing
item is reported in-place without aborting the rest.

**Required scope:** `write`

### Request body

`BatchDecisionRequest`

**items** `DecisionRequest[]` *required*

Decision requests to evaluate. Each item is metered independently.

### Response

`BatchDecisionResponse`

**results** `BatchDecisionItem[]` *required*

**BatchDecisionItem**

**decision** `object`

**decision**

**action** `object`

**confidence** `number (double)` *required*

**decision** `string` *required*

`approved` | `denied` | `refused`.

**decision\_id** `string` *required*

**dropped\_citations** `string[]`

Org rules the engine fired during hydration that were dropped from `proof.cited_rules` as unrelated to this decision. Persistently non-empty values mean a standing rule with permanently satisfied premises fires on every hydrated decision — scope or prune it.

**evaluated\_goal** `string`

Exact predicate evaluated as the permit target. Absent for legacy requests that relied on action/query inference.

**grounding** `DecisionGrounding` *required*

**gss\_machine** `GssMachineGroundingSnapshot` *required*

**plain\_explanation** `string` *required*

Deterministic, proof-derived, business-readable 'why' — distinct from `rationale` (engine narration): 'Approved to issue a refund for order 9412: the return for order 9412 was received and order 9412 passed inspection.' Always present.

**proof** `DecisionProof` *required*

**rationale** `string` *required*

**refusal** `object`

**trace** `RecursiveChatTraceStep[]`

Full proof trace, when `include_trace` was set.

**usage** `DecisionUsage` *required*

**verifiable\_bundle** `object`

A self-contained, INDEPENDENTLY-VERIFIABLE proof bundle for an approved decision: the exact facts and rules plus a `RuleEngine::backward_chain` derivation of the authorization goal, in the `knowledge::ProofBundle` wire format. POST it verbatim to `/v1/proofs/verify` (or check it offline with the dependency-light `proof_check`) to confirm the verdict without trusting this server. Present only when the caller declared an `authorization_goal` AND the rule engine reproduces the proof; absent otherwise (the verdict still stands on its own derivation).

**warnings** `string[]`

Non-fatal advisories about how the verdict was derived (e.g. the outcome rested on predicate-name inference rather than declared rule effects). Omitted when empty.

**x\_nsr** `object`

**error** `object`

**error**

**code** `string` *required*

**message** `string` *required*

**index** `integer` *required*

**summary** `BatchSummary` *required*

**BatchSummary**

**approved** `integer` *required*

**billable\_decisions** `integer` *required*

Items that consumed a billable outcome.

**denied** `integer` *required*

**errored** `integer` *required*

**refused** `integer` *required*

**total** `integer` *required*

**total\_cost\_micros** `integer (int64)` *required*

Aggregate charge for the batch, in microdollars.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Per-item decisions with proofs + batch summary |
| `400` | Empty or oversized batch |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/v1/decisions/batch' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "action": "string",
      "authorization_goal": {
        "args": null,
        "name": null,
        "negated": null
      },
      "confidence_threshold": 7.5,
      "external_ref": "string",
      "facts": [],
      "hydrate_org_context": true,
      "include_trace": true,
      "kb_limits": {
        "max_entities": null,
        "max_properties_per_entity": null,
        "max_rules": null,
        "max_triples": null
      },
      "max_depth": 1,
      "max_iterations": 8,
      "mode": "string",
      "query": "string",
      "rules": [],
      "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ]
}'
```

```json 200 theme={null}
{
  "results": [
    {
      "decision": {
        "action": null,
        "confidence": null,
        "decision": null,
        "decision_id": null,
        "dropped_citations": null,
        "evaluated_goal": null,
        "grounding": null,
        "gss_machine": null,
        "plain_explanation": null,
        "proof": null,
        "rationale": null,
        "refusal": null,
        "trace": null,
        "usage": null,
        "verifiable_bundle": null,
        "warnings": null,
        "x_nsr": null
      },
      "error": {
        "code": null,
        "message": null
      },
      "index": 1
    }
  ],
  "summary": {
    "approved": 1,
    "billable_decisions": 1,
    "denied": 1,
    "errored": 1,
    "refused": 1,
    "total": 102,
    "total_cost_micros": 1
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.