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

# Get result

> Retrieve a completed result with wellbeing outcomes, notices, and artifact download links.

Returns the partner-safe result envelope: pipeline **status**, one or more **wellbeing outcomes**, and **artifacts** with signed download URLs when available.

## Key response fields

| Field                 | Description                                                                               |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `resultId`            | UUID for this result                                                                      |
| `submissionId`        | UUID of the originating submission                                                        |
| `partnerSubmissionId` | Your submission reference (when stored)                                                   |
| `status`              | Partner pipeline status: `received`, `validating`, `processing`, `completed`, `failed`, … |
| `statusLabel`         | Human-readable status                                                                     |
| `completedAt`         | ISO-8601 completion timestamp                                                             |
| `outcome`             | Primary outcome summary (when present)                                                    |
| `outcomes[]`          | All outcome summaries when multiple areas were requested                                  |
| `outcome.outcomeId`   | Public id, e.g. `wellbeing.cardiovascular`                                                |
| `outcome.score`       | Scalar **0–1** (not 0–100)                                                                |
| `outcome.band.tier`   | `low`, `medium`, `high`, or `unknown`                                                     |
| `outcome.notices[]`   | Partner-safe `{ message }` lines                                                          |
| `artifacts.items[]`   | Report artefacts (`json`, `html`, `pdf`)                                                  |

## Example request

```bash theme={null}
curl -H "Authorization: Bearer <your-api-key>" \
  https://api.idunox.com/v1/results/<resultId>
```

## Example response

```json theme={null}
{
  "resultId": "10000000-0000-4000-8000-000000000001",
  "submissionId": "e0000000-0000-4000-8000-000000000001",
  "partnerSubmissionId": "hy-sub-0001",
  "status": "completed",
  "statusLabel": "Completed",
  "completedAt": "2026-04-12T16:00:00.000Z",
  "outcome": {
    "outcomeId": "wellbeing.cardiovascular",
    "focus": "Cardiovascular Wellbeing",
    "score": 0.72,
    "referencePlacement": "above_reference",
    "referencePlacementLabel": "Above reference threshold",
    "outcomeStatus": "completed",
    "outcomeStatusLabel": "Completed",
    "band": {
      "tier": "high",
      "label": "Upper third · reference cohort"
    },
    "notices": []
  },
  "outcomes": [
    {
      "outcomeId": "wellbeing.cardiovascular",
      "focus": "Cardiovascular Wellbeing",
      "score": 0.72,
      "referencePlacement": "above_reference",
      "referencePlacementLabel": "Above reference threshold",
      "outcomeStatus": "completed",
      "outcomeStatusLabel": "Completed",
      "band": { "tier": "high", "label": "Upper third · reference cohort" },
      "notices": []
    },
    {
      "outcomeId": "wellbeing.renal",
      "focus": "Renal Wellbeing",
      "score": 0.41,
      "referencePlacement": "below_reference",
      "referencePlacementLabel": "Below reference threshold",
      "outcomeStatus": "completed",
      "outcomeStatusLabel": "Completed",
      "band": { "tier": "low", "label": "Lower third · reference cohort" },
      "notices": []
    }
  ],
  "artifacts": {
    "items": [
      {
        "artifactId": "20000000-0000-4000-8000-000000000001",
        "type": "html",
        "typeLabel": "HTML",
        "availability": "available",
        "availabilityLabel": "Available",
        "access": {
          "downloadUrl": "https://storage.googleapis.com/example-bucket/signed-read-example",
          "expiresAt": "2026-04-12T17:00:00.000Z"
        },
        "generatedAt": "2026-04-12T15:30:00.000Z"
      }
    ]
  }
}
```

See [Outcomes model](/platform/assessments-model) for field interpretation.


## OpenAPI

````yaml GET /v1/results/{resultId}
openapi: 3.1.0
info:
  title: IduScore Partner & Platform API
  description: >-
    Partner-facing JSON API for de-identified clinical submissions (canonical
    Type A, not FHIR at ingestion).


    **Authentication:** Send `X-Api-Key: <key>` **or** `Authorization: Bearer
    <key>` on every `/v1/*` request (except preflight `OPTIONS`).


    **Writes (`POST`):** Client MUST send non-empty `x-correlation-id` and
    `Idempotency-Key`. The server does not synthesize these from the request id.


    **Tenant scope:** Credentials resolve to a tenant; all IDs are tenant-scoped
    (cross-tenant access returns `404` where applicable).


    **Request id:** Responses may echo `x-request-id` when the client sent it;
    otherwise the server generates one (see error envelope `requestId`).


    **Partner responses:** Read APIs return **IduScore wellbeing** language only
    — stable `wellbeing.*` outcome ids,

    plain-English labels, and optional `notices[].message` lines (no internal
    warning codes or model identifiers).

    Use **`GET /openapi.yaml`** for request/response examples aligned with this
    contract.



    ---

    **Merged spec (this file):** includes **Platform** and **Diagnostics** paths
    from the service implementation in addition to the **Type A** `/v1` product
    routes. The slimmer `type-a-partner-v1.*` files are the same contract for
    submissions, jobs, and results.
  version: 0.1.0
  license:
    name: Proprietary
servers:
  - url: https://api.idunox.com
    description: Production partner API (documented base URL for examples and playground)
security: []
tags:
  - name: Submissions
    description: Ingestion and submission reads
  - name: Jobs
    description: Processing job status
  - name: Results
    description: Inference / scoring results
  - name: Webhooks
    description: >
      Outbound HTTPS callbacks the platform may POST to a URL you register (not
      paths on the IduScore Partner API;

      `/_reference/...` entries document payload and headers for your
      implementer only).
  - name: Platform
    description: >-
      Liveness, readiness, and OpenAPI document discovery. **No API key**
      required.
  - name: Diagnostics
    description: >-
      Validates the same **partner API key** and (for `POST`) write headers as
      other `/v1` routes. Returns `204` when valid.
paths:
  /v1/results/{resultId}:
    get:
      tags:
        - Results
      summary: Get result detail (wellbeing outcome summaries and artifacts)
      operationId: getResultDetail
      parameters:
        - $ref: '#/components/parameters/PathResultId'
        - $ref: '#/components/parameters/HeaderRequestIdOptional'
      responses:
        '200':
          description: Result scoped to tenant; partner scoping follows submission metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerResultDetailResponse'
              examples:
                completedWithWellbeingOutcome:
                  summary: >-
                    Processing submission with completed wellbeing outcome and
                    PDF artifact
                  description: >-
                    Outcome uses public `wellbeing.*` ids; notices are
                    partner-safe summaries only.
                  value:
                    resultId: 10000000-0000-4000-8000-000000000001
                    submissionId: e0000000-0000-4000-8000-000000000001
                    partnerSubmissionId: partner-sub-owned
                    status: processing
                    statusLabel: Processing
                    completedAt: '2026-04-12T16:00:00.000Z'
                    outcome:
                      outcomeId: wellbeing.cardiovascular
                      focus: Cardiovascular Wellbeing
                      score: 0.12
                      referencePlacement: below_reference
                      referencePlacementLabel: Below reference threshold
                      outcomeStatus: completed
                      outcomeStatusLabel: Completed
                      band:
                        tier: low
                        label: Lower third · reference cohort
                      notices:
                        - message: Some optional inputs were not provided.
                    artifacts:
                      items:
                        - artifactId: 20000000-0000-4000-8000-000000000001
                          type: pdf
                          typeLabel: PDF
                          availability: available
                          availabilityLabel: Available
                          access:
                            downloadUrl: >-
                              https://storage.googleapis.com/example-bucket/signed-read-example
                            expiresAt: '2026-04-12T17:00:00.000Z'
                          generatedAt: '2026-04-12T15:30:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - partnerApiKey: []
        - partnerBearer: []
components:
  parameters:
    PathResultId:
      name: resultId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    HeaderRequestIdOptional:
      name: x-request-id
      in: header
      required: false
      schema:
        type: string
      description: Optional; echoed when possible. Server generates when absent.
  schemas:
    PartnerResultDetailResponse:
      description: >
        Partner GET `/v1/results/:id`. Minimal fields: ids, submission status,
        completion time, public outcome

        summary(ies), and artifact download handles. Multi-outcome runs include
        **`outcomes`** (array, same order

        as stored inference bundle); **`outcome`** remains the primary (first)
        row for backward compatibility.

        Omits internal job ids, subject linkage, model metadata, and citation
        placeholders.
      type: object
      additionalProperties: false
      required:
        - resultId
        - submissionId
        - partnerSubmissionId
        - status
        - statusLabel
        - completedAt
        - outcome
        - artifacts
      properties:
        resultId:
          type: string
          format: uuid
        submissionId:
          type: string
          format: uuid
        partnerSubmissionId:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/PartnerSubmissionPublicStatus'
        statusLabel:
          type: string
          minLength: 1
        completedAt:
          type: string
          format: date-time
          description: >-
            Wall time when the result row was last updated (completion /
            refresh).
        outcome:
          description: The primary (first) outcome; `null` when not yet available.
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PartnerOutcomeSummaryPublicV1'
        outcomes:
          type: array
          items:
            $ref: '#/components/schemas/PartnerOutcomeSummaryPublicV1'
          description: >
            Included when more than one wellbeing outcome was scored. Order
            matches the persisted multi-outcome

            bundle. Omitted for single-outcome results (use `outcome` only).
        artifacts:
          type: object
          additionalProperties: false
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/PartnerResultArtifactItem'
      example:
        resultId: 10000000-0000-4000-8000-000000000001
        submissionId: e0000000-0000-4000-8000-000000000001
        partnerSubmissionId: partner-sub-owned
        status: processing
        statusLabel: Processing
        completedAt: '2026-04-12T16:00:00.000Z'
        outcome:
          outcomeId: wellbeing.cardiovascular
          focus: Cardiovascular Wellbeing
          score: 0.12
          referencePlacement: below_reference
          referencePlacementLabel: Below reference threshold
          outcomeStatus: completed
          outcomeStatusLabel: Completed
          band:
            tier: low
            label: Lower third · reference cohort
          notices:
            - message: Some optional inputs were not provided.
        artifacts:
          items:
            - artifactId: 20000000-0000-4000-8000-000000000001
              type: pdf
              typeLabel: PDF
              availability: available
              availabilityLabel: Available
              access:
                downloadUrl: >-
                  https://storage.googleapis.com/example-bucket/signed-read-example
                expiresAt: '2026-04-12T17:00:00.000Z'
              generatedAt: '2026-04-12T15:30:00.000Z'
    PartnerSubmissionPublicStatus:
      type: string
      description: Stable public slug for submission pipeline state (partner JSON).
      enum:
        - received
        - validating
        - validated
        - processing
        - completed
        - failed
        - rejected
    PartnerOutcomeSummaryPublicV1:
      description: >
        Minimal public outcome for GET `/v1/results/:id` — display labels and a
        single scalar score only.

        No model/provider/feature vocabulary, thresholds, probabilities as
        separate fields, or machine warning codes.
      type: object
      additionalProperties: false
      required:
        - outcomeId
        - focus
        - score
        - referencePlacement
        - referencePlacementLabel
        - outcomeStatus
        - outcomeStatusLabel
      properties:
        outcomeId:
          $ref: '#/components/schemas/PartnerOutcomePublicId'
        focus:
          type: string
          minLength: 1
          description: Public wellbeing focus title (e.g. Cardiovascular Wellbeing).
        score:
          type: number
          minimum: 0
          maximum: 1
        referencePlacement:
          type: string
          enum:
            - below_reference
            - above_reference
            - indeterminate
        referencePlacementLabel:
          type: string
          minLength: 1
        outcomeStatus:
          type: string
          enum:
            - completed
            - failed
            - partial
        outcomeStatusLabel:
          type: string
          minLength: 1
          description: Human-readable inference state (pairs with `outcomeStatus`).
        band:
          type: object
          additionalProperties: false
          required:
            - tier
            - label
          properties:
            tier:
              type: string
              enum:
                - low
                - medium
                - high
                - unknown
            label:
              type: string
              minLength: 1
        notices:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - message
            properties:
              message:
                type: string
                minLength: 1
    PartnerResultArtifactItem:
      description: >
        Partner-safe artifact reference for GET result. Excludes storage
        buckets, object keys, gs:// URIs,

        checksums, byte sizes, and internal storage status values. Use
        `access.downloadUrl` when `availability`

        is `available` and the server could produce a time-limited signed URL.
      type: object
      additionalProperties: false
      required:
        - artifactId
        - type
        - typeLabel
        - availability
        - availabilityLabel
        - access
        - generatedAt
      properties:
        artifactId:
          type: string
          format: uuid
          description: Opaque artifact id for support correlation (not a storage path).
        type:
          type: string
          enum:
            - json
            - html
            - pdf
            - unknown
          description: Coarse artifact kind for display and routing.
        typeLabel:
          type: string
          minLength: 1
          description: Human-readable label for `type` (e.g. PDF).
        availability:
          type: string
          enum:
            - available
            - pending
            - unavailable
          description: Whether the artifact can be fetched (partner-safe lifecycle).
        availabilityLabel:
          type: string
          minLength: 1
          description: Human-readable label for `availability`.
        access:
          type: object
          additionalProperties: false
          required:
            - downloadUrl
            - expiresAt
          properties:
            downloadUrl:
              type:
                - string
                - 'null'
              format: uri
              description: HTTPS signed read URL when available; otherwise null.
            expiresAt:
              type:
                - string
                - 'null'
              format: date-time
              description: When the signed URL expires, if applicable.
        generatedAt:
          type: string
          format: date-time
          description: When the artifact record was created (approximate generation time).
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              description: Machine-readable error code (e.g. VALIDATION_ERROR, NOT_FOUND).
            message:
              type: string
            requestId:
              type: string
            correlationId:
              type: string
              description: >-
                Present when the request established a correlation id (writes
                always send `x-correlation-id`).
            details:
              description: Optional structured validation or domain hints (shape varies).
      description: Matches `errorEnvelopeSchema` in src/lib/error-envelope.ts
    PartnerOutcomePublicId:
      type: string
      description: Stable public IduScore outcome id (not internal persistence stem ids).
      enum:
        - wellbeing.cardiovascular
        - wellbeing.renal
        - wellbeing.cognitive
        - wellbeing.respiratory
        - wellbeing.general
  responses:
    BadRequest:
      description: Validation or missing required headers / bad UUID parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: VALIDATION_ERROR
              message: Invalid submission payload
              requestId: 550e8400-e29b-41d4-a716-446655440000
              correlationId: corr-example-1
              details: {}
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: INVALID_API_KEY
              message: Invalid or expired API key
              requestId: 550e8400-e29b-41d4-a716-446655440000
    Forbidden:
      description: >-
        Tenant inactive, `partnerId` mismatch, or submission restricted to
        another credential via `metadata.partnerId`
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Resource not found or not visible in tenant scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: NOT_FOUND
              message: Submission not found
              requestId: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: Unhandled failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: INTERNAL_ERROR
              message: Internal server error
              requestId: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    partnerApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Plaintext API key issued for the tenant (stored hashed server-side).
    partnerBearer:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: Same secret as X-Api-Key, sent as a Bearer token.

````