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

<ParamField body="external_ref" type="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.
</ParamField>

<ParamField body="outcome" type="string" required>
  `honored` | `reversed` | `overridden` | `escalated`.
</ParamField>

### Response

`RecordOutcomeResponse`

<ResponseField name="recorded" type="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 |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/v1/decisions/outcome-by-ref' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "external_ref": "string",
    "outcome": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "recorded": true
  }
  ```
</ResponseExample>
