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

# Results

> Read a questionnaire's outcome: answers, score, transcript, and recording

The outcome of every call —both follow-up and triage— is read with the read endpoints.

## Questionnaire (protocol run)

```bash theme={null}
curl "https://{your-prod-endpoint}/v1/protocol-runs/{runId}" \
  -H "Authorization: Bearer oc_sk_..."
```

Returns the run with its protocol version, `answers[]`, `calls[]`, notes, a patient summary, and the computed `score`. Relevant run fields:

| Field                                    | Description                                                                                                               |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `questionnaire_status`                   | `pending`, `in_progress`, `completed`, `rejected`, `call_failed`, `wrong_number`, `no_answer`, `unresolved`, `cancelled`. |
| `score`, `score_class`                   | Computed score and risk band (when applicable).                                                                           |
| `sequence_number`                        | Questionnaire number within the enrollment.                                                                               |
| `scheduled_at`, `started_at`, `ended_at` | Run timestamps.                                                                                                           |
| `reviewed_at`, `review_note`             | Clinical review, if any.                                                                                                  |

## Call and transcript

```bash theme={null}
curl "https://{your-prod-endpoint}/v1/calls/{callId}" \
  -H "Authorization: Bearer oc_sk_..."
```

Returns the call with its transcript (`timeline_events`, conversation utterances only). Relevant fields:

| Field                                    | Description                                                                                          |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `status`                                 | `pending`, `dialing`, `in_progress`, `completed`, `failed`, `no_answer`, `cancelled`, `transferred`. |
| `call_direction`                         | `outbound` (follow-up) or `inbound` (triage).                                                        |
| `disconnect_reason`                      | Why the call ended.                                                                                  |
| `has_recording`                          | Whether a recording is available.                                                                    |
| `started_at`, `ended_at`, `scheduled_at` | Timestamps.                                                                                          |

## Recording

If `has_recording` is `true`, get a short-lived signed link:

```bash theme={null}
curl "https://{your-prod-endpoint}/v1/calls/{callId}/recording" \
  -H "Authorization: Bearer oc_sk_..."
```

```json theme={null}
{ "data": { "url": "https://{your-prod-endpoint}/v1/calls/{callId}/recording/stream?expires=…&token=…" } }
```

That link redirects to the audio (`audio/ogg`); OlivIA reads the file from storage server-side, so your system never receives a storage credential. Returns `404` if there is no recording and `503` if storage is unavailable.
