curl --request POST \
--url 'https://api.nsr.stateset.com/v1/decisions/batch' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"action": "string",
"authorization_goal": {
"args": null,
"name": null,
"negated": null
},
"confidence_threshold": 1,
"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": 1,
"mode": "string",
"query": "string",
"rules": [],
"session_id": "string"
}
]
}'
{
"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": 1,
"total_cost_micros": 1
}
}
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)…
POST
/
v1
/
decisions
/
batch
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/decisions/batch' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"action": "string",
"authorization_goal": {
"args": null,
"name": null,
"negated": null
},
"confidence_threshold": 1,
"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": 1,
"mode": "string",
"query": "string",
"rules": [],
"session_id": "string"
}
]
}'
{
"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": 1,
"total_cost_micros": 1
}
}
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
DecisionRequest[]
required
Decision requests to evaluate. Each item is metered independently.
Response
BatchDecisionResponse
BatchDecisionItem[]
required
Show BatchDecisionItem
Show BatchDecisionItem
object
Show decision
Show decision
object
number (double)
required
string
required
approved | denied | refused.string
required
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.string
Exact predicate evaluated as the permit target. Absent for legacy requests that relied on action/query inference.
DecisionGrounding
required
GssMachineGroundingSnapshot
required
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.DecisionProof
required
string
required
object
RecursiveChatTraceStep[]
Full proof trace, when
include_trace was set.DecisionUsage
required
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).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.
object
integer
required
BatchSummary
required
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 |
curl --request POST \
--url 'https://api.nsr.stateset.com/v1/decisions/batch' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"action": "string",
"authorization_goal": {
"args": null,
"name": null,
"negated": null
},
"confidence_threshold": 1,
"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": 1,
"mode": "string",
"query": "string",
"rules": [],
"session_id": "string"
}
]
}'
{
"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": 1,
"total_cost_micros": 1
}
}