> ## 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.

# Record a decision's real-world outcome by the client's correlation key

> instead of our decision_id — the path a real event takes. A chargeback, refund reversal, or human override knows the order/case id it happened to, not the…

instead of our `decision_id` — the path a real event takes. A chargeback,
refund reversal, or human override knows the order/case id it happened to,
not the decision id we returned; this closes the outcome loop from those
events. Targets the most-recent decision carrying the ref. 404 if no
decision with that ref is in the retained window.

**Required scope:** `write`

### Request body

`RecordOutcomeByRefRequest`

**external\_ref** `string` *required*

The client correlation key the decision was made about (order id, case id, claim number) — supplied as `external_ref` on the decision request.

**outcome** `string` *required*

`honored` | `reversed` | `overridden` | `escalated`.

### Response

`RecordOutcomeResponse`

**recorded** `boolean` *required*

### Status codes

| Code | Meaning |
| - | - |
| `200` | Outcome recorded |
| `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/outcome-by-ref' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "external_ref": "string",
  "outcome": "string"
}'
```

```json 200 theme={null}
{
  "recorded": true
}
```


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