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

# Get Test Result (JSON)

> Retrieve structured JSON test results for storage, analysis, or custom rendering after a record is finished.

Use this endpoint to fetch a completed test record's results in structured JSON format. The shape of the `data` object varies by test type (analyst-specific scoring), but common fields include scales, raw scores, and interpretive summaries.

## Prerequisites

The record must be finished (`is_finished: true`). If the test is not yet completed, this endpoint returns HTTP 409.

## Endpoint

```http theme={"dark"}
GET https://braintest.ir/api/v2/record/{token}/result/json/
```

## Headers

| Header    | Value                                 |
| --------- | ------------------------------------- |
| `API-KEY` | Your API key from the organizer panel |

## Path parameters

<ParamField path="token" type="string" required>
  The UUID token of the finished test record.
</ParamField>

## Response

<ResponseField name="data" type="object">
  Analyst-specific structured result. Common top-level fields include:

  <ResponseField name="scales" type="array">
    Array of scale objects, each containing:

    * `id` (string): Scale identifier
    * `title` (string): Scale name
    * `score` (number): Raw or computed score
    * `percentile` (number): Percentile rank
    * `interpretation` (string): Human-readable interpretation
  </ResponseField>

  <ResponseField name="summary" type="string">
    Overall interpretive summary of the test results.
  </ResponseField>
</ResponseField>

## Example request

```bash theme={"dark"}
curl -X GET "https://braintest.ir/api/v2/record/a1b2c3d4-e5f6-7890-abcd-ef1234567890/result/json/" \
  -H "API-KEY: YOUR_API_KEY"
```

## Example response

```json theme={"dark"}
{
  "data": {
    "scales": [
      {
        "id": "depression",
        "title": "Depression Scale",
        "score": 18,
        "percentile": 72,
        "interpretation": "Moderate depression symptoms"
      },
      {
        "id": "anxiety",
        "title": "Anxiety Scale",
        "score": 12,
        "percentile": 55,
        "interpretation": "Mild anxiety symptoms"
      }
    ],
    "summary": "The participant shows moderate levels of depression with mild anxiety. Clinical follow-up is recommended."
  },
  "successful": true,
  "messages": []
}
```

## Error responses

| Status | Meaning                | What to do                                                                                         |
| ------ | ---------------------- | -------------------------------------------------------------------------------------------------- |
| `409`  | Test not yet completed | Wait for the participant to finish, then poll `GET /record/{token}` until `is_finished` is `true`. |
