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

# Get decrypted session data

> Application auth only. Decrypts OCR fields and returns the structured `document` block. Its optional `date_of_birth` and `expiry_date` are accepted ISO calendar values derived by IDV, never locale-parsed by the caller. Every access (success AND denial) is recorded in an internal audit sink before the body is returned; the request fails closed if the audit write fails. Never available to the session token.




## OpenAPI

````yaml /api-reference/idv-svc.json get /sessions/{sessionId}/data
openapi: 3.1.0
info:
  title: Minerva IDV API
  version: 1.0.0-draft
  description: >-
    Customer API for identity verification. Create verification sessions for
    profiles, deliver invites, track capture progress, and read review outcomes.
    For the end-to-end flow, see the [IDV Integration
    Guide](/api-reference/idv-integration-guide). Reviewer-safe responses never
    expose storage keys, checksums, wrapped keys, encryption context, raw OCR,
    or raw model output. Decrypted personal data is available only on `GET
    /sessions/{sessionId}/data`, to an authenticated in-scope principal, with
    fail-closed auditing.
servers:
  - url: https://api.gominerva.com/idv/v1
    description: The production API server for Minerva identity verification
security: []
tags:
  - name: sessions
    description: >-
      Verification sessions and invite delivery (application or dashboard
      authentication).
  - name: capture
    description: End-user capture flow (session or invite credentials).
  - name: review
    description: Review decisions and audited structured-data access.
  - name: workflows
    description: Workflow configuration for verification sessions.
  - name: themes
    description: Branding themes and managed logo assets.
paths:
  /sessions/{sessionId}/data:
    get:
      tags:
        - review
      summary: Get decrypted session data
      description: >
        Application auth only. Decrypts OCR fields and returns the structured
        `document` block. Its optional `date_of_birth` and `expiry_date` are
        accepted ISO calendar values derived by IDV, never locale-parsed by the
        caller. Every access (success AND denial) is recorded in an internal
        audit sink before the body is returned; the request fails closed if the
        audit write fails. Never available to the session token.
      parameters:
        - $ref: '#/components/parameters/SessionId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionDataResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - applicationApiKey: []
components:
  parameters:
    SessionId:
      name: sessionId
      in: path
      required: true
      schema:
        type: string
  schemas:
    SessionDataResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/SessionData'
    SessionData:
      type: object
      description: Decrypted structured data. Application auth only; access is audited.
      required:
        - id
        - status
        - document
        - ocr_fields
        - answers
      properties:
        id:
          type: string
        status:
          $ref: '#/components/schemas/SessionStatus'
        document:
          $ref: '#/components/schemas/SessionDataDocumentInfo'
        declared_document:
          type: object
          description: Consumer-declared/CV-detected document type (non-PII).
          required:
            - id_type
            - source
            - declared_at
          properties:
            id_type:
              $ref: '#/components/schemas/DeclarableIdType'
            source:
              type: string
              enum:
                - user_selected
                - cv_detected
            declared_at:
              type: string
              format: date-time
        ocr_fields:
          type: array
          items:
            $ref: '#/components/schemas/OcrField'
        answers:
          type: array
          description: Decrypted questionnaire answers. ONLY surface for answer plaintext.
          items:
            type: object
            required:
              - step_id
              - question_id
              - value
              - answered_at
            properties:
              step_id:
                type: string
              question_id:
                type: string
              value:
                description: string, boolean, or array of strings as submitted.
                oneOf:
                  - type: string
                  - type: boolean
                  - type: array
                    items:
                      type: string
              answered_at:
                type: string
                format: date-time
        profile_mismatch_details:
          type: array
          description: >
            Decrypted profile-vs-captured field mismatches. Management planes
            only, revealed together with OCR (values are PII).
          items:
            type: object
            required:
              - field
              - profile_value
              - captured_value
              - note
            properties:
              field:
                type: string
                description: Minerva profile JSON field name.
              profile_value:
                type: string
                description: Decrypted profile value (PII).
              captured_value:
                type: string
                description: Decrypted captured value (PII).
              note:
                type: string
                enum:
                  - minor
                  - major
                description: Mismatch severity for the diff table.
        assessment:
          $ref: '#/components/schemas/AssessmentSummary'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: idv_session_not_found
            message:
              type: string
    SessionStatus:
      type: string
      description: >
        FLOW axis only since the status split: assessment outcomes live on
        `review_status` (the gate's recommendation stays on the assessment
        block) and `assessed` replaces the legacy conflated
        approved/rejected/requires_review terminal statuses. Terminal flow
        states are assessed, failed, canceled, deleted.
      enum:
        - collecting_artifacts
        - ready_for_assessment
        - queued
        - assessing
        - assessed
        - failed
        - canceled
        - deleted
    SessionDataDocumentInfo:
      allOf:
        - $ref: '#/components/schemas/DocumentInfo'
        - type: object
          description: >
            IDV-normalized document metadata for the audited management data
            endpoint. Date members are optional and omitted when OCR is absent,
            invalid, ambiguous, or from a legacy assessment that did not retain
            an exact canonical value. They are Gregorian calendar dates, not
            timestamps, and must never receive timezone conversion.
          properties:
            date_of_birth:
              type: string
              format: date
              description: Accepted assessed date of birth in exact YYYY-MM-DD form.
            expiry_date:
              type: string
              format: date
              description: >
                Accepted document expiry in exact YYYY-MM-DD form. The document
                is valid through this calendar date and becomes expired at the
                start of the next UTC calendar day unless a future accepted
                jurisdiction contract defines a stronger boundary.
    DeclarableIdType:
      description: >
        Id types a consumer can declare or configure in accepted_id_types.
        Built-ins are listed explicitly; workflow-local custom ids must be
        defined in the id_capture step's custom_id_types. `unknown` is an
        inference outcome, not declarable. `passport` is the one-sided built-in
        type - declaring it drops id_back when sides=auto.
      anyOf:
        - type: string
          enum:
            - driver_license
            - government_id
            - health_card
            - passport
            - national_id
            - permanent_resident_card
            - residence_permit
            - other
        - type: string
          pattern: ^[a-z0-9_-]{1,64}$
          not:
            enum:
              - driver_license
              - government_id
              - health_card
              - passport
              - national_id
              - permanent_resident_card
              - residence_permit
              - other
              - unknown
    OcrField:
      type: object
      required:
        - name
        - value
        - confidence
      properties:
        name:
          type: string
        value:
          type: string
          description: Decrypted plaintext (application plane
          audited only).: null
        confidence:
          type: number
          minimum: 0
          maximum: 1
    AssessmentSummary:
      type: object
      description: Reviewer-safe assessment (no raw OCR values, no raw model output).
      properties:
        status:
          $ref: '#/components/schemas/SessionStatus'
        model_id:
          type: string
        inference_profile_id:
          type: string
        prompt_version:
          type: string
        face_match:
          $ref: '#/components/schemas/FaceMatch'
        face_match_performed:
          type: boolean
        liveness:
          $ref: '#/components/schemas/Liveness'
        document_authenticity:
          $ref: '#/components/schemas/DocumentAuthenticity'
        document:
          $ref: '#/components/schemas/DocumentInfo'
        fraud_flags:
          type: array
          items:
            $ref: '#/components/schemas/FraudFlag'
        reviewer_summary:
          type: string
        assessed_at:
          type: string
          format: date-time
        holder_apparent_age_range:
          type: string
          description: >
            Coarse apparent-age band of the live person estimated from the
            liveness frontal capture (under_18/18_24/25_34/35_44/45_54/55_64/
            65_74/75_over/unclear). Empty for pre-v8 assessments.
        barcode_check:
          type: string
          description: >
            Outcome of the deterministic id_back PDF417/AAMVA cross-check:
            not_applicable, not_detected, decoded_clean, or decoded_mismatch.
            Empty for pre-v8 assessments and worker-failure receipts. Decoded
            barcode contents are never exposed.
    DocumentInfo:
      type: object
      description: Structured jurisdiction metadata (reviewer-safe, non-PII).
      required:
        - id_type
        - issuing_country
        - issuing_subdivision
      properties:
        id_type:
          $ref: '#/components/schemas/IdType'
        issuing_country:
          type: string
          description: ISO 3166-1 alpha-2, or empty if unknown.
          example: US
        issuing_subdivision:
          type: string
          description: >-
            ISO 3166-2 (e.g. US-CA), only when applicable; empty for
            passports/national IDs.
          example: US-CA
        id_type_confidence:
          type: number
          minimum: 0
          maximum: 1
        jurisdiction_confidence:
          type: number
          minimum: 0
          maximum: 1
    FaceMatch:
      type: string
      enum:
        - match
        - mismatch
        - inconclusive
        - not_applicable
    Liveness:
      type: string
      enum:
        - live
        - spoof_suspected
        - inconclusive
        - requires_review
        - not_applicable
    DocumentAuthenticity:
      type: string
      enum:
        - authentic
        - tampered
        - fake
        - inconclusive
        - requires_review
    FraudFlag:
      type: object
      required:
        - code
        - category
        - severity
        - confidence
        - explanation
        - rationale
        - gating
        - evidence_codes
        - normalization_reason_codes
      properties:
        code:
          type: string
          description: >
            Bounded taxonomy code. For model-assessed profile/document mismatch:
            the individual-profile field codes profile_name_mismatch (high),
            profile_dob_mismatch (high), profile_geo_mismatch_major (medium) and
            profile_geo_mismatch_minor (low, advisory only, never gates); the
            residual profile_info_mismatch_minor (medium) /
            profile_info_mismatch_major (high) for other identity fields (sex,
            nationality); and, for KYB (organization profiles),
            org_profile_mismatch_minor (medium) / org_profile_mismatch_major
            (high) sourced from the captured business document (category
            "document"). Each carries a FIXED severity.
        category:
          type: string
          enum:
            - image_quality
            - presentation_attack
            - document_tamper
            - identity_mismatch
            - ocr_uncertainty
            - workflow
            - model_uncertainty
            - idv
            - document
            - questionnaire
        severity:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        confidence:
          type: number
          minimum: 0
          maximum: 1
        explanation:
          type: string
          description: Redacted/derived; not raw model wording.
        rationale:
          type: string
          maxLength: 300
          description: >
            Reviewer-facing explanation of the finding (field + nature, e.g.
            glare region, font anomaly, mismatch character) that never quotes
            full raw document values. REQUIRED on every emitted flag; a
            deterministic per-code fallback fills it when the model omits or
            emits an invalid value.
        gating:
          type: boolean
          description: >
            Whether this flag held the session for review under the session's
            flag_settings. Disabled-code flags are recorded with gating=false
            and do not hold the session.
        evidence_codes:
          type: array
          maxItems: 8
          uniqueItems: true
          items:
            type: string
            enum:
              - laminate_lift_or_reseal
              - cut_clipped_or_punched_edge
              - tape_or_rejoined_document
              - crack_through_security_feature
              - portrait_or_photo_overlay
              - text_or_data_overlay
              - font_or_print_inconsistency
              - security_feature_inconsistency
              - front_back_data_conflict
              - electronic_display_cue
              - biometric_replay_cue
              - synthetic_image_cue
              - face_comparison_conflict
              - liveness_spoof_cue
              - ocr_data_conflict
              - profile_document_comparison
              - profile_questionnaire_comparison
              - workflow_policy_conflict
              - capture_quality_prevents_verification
              - other_affirmative_signal
          description: >
            Allowlisted, PII-free machine codes describing the affirmative
            evidence behind this flag. Empty on historical and deterministic
            flags that have no model evidence provenance.
        normalization_reason_codes:
          type: array
          maxItems: 24
          uniqueItems: true
          items:
            type: string
            enum:
              - assessment_status_invalid
              - face_match_invalid
              - liveness_invalid
              - document_authenticity_invalid
              - face_match_applicability_conflict
              - liveness_applicability_conflict
              - document_authenticity_applicability_conflict
              - document_metadata_invalid
              - reviewer_summary_missing
              - ocr_field_name_missing
              - ocr_confidence_invalid
              - ocr_canonical_fields_repaired
              - fraud_flag_required_field_missing
              - fraud_flag_code_invalid
              - fraud_evidence_scope_invalid
              - fraud_evidence_scope_missing
              - fraud_attachment_evidence_invalid
              - fraud_attachment_evidence_missing
              - fraud_evidence_codes_missing
              - fraud_evidence_code_invalid
              - fraud_severity_invalid
              - fraud_category_invalid
              - fraud_confidence_invalid
              - presentation_output_normalized
              - document_authenticity_evidence_conflict
              - quality_issue_output_normalized
              - holder_appearance_output_normalized
          description: >
            Allowlisted, PII-free deterministic repair reasons. Populated only
            for model_output_schema_violation; empty on all other flags.
    IdType:
      type: string
      enum:
        - driver_license
        - government_id
        - health_card
        - passport
        - national_id
        - permanent_resident_card
        - residence_permit
        - other
        - unknown
  responses:
    Unauthorized:
      description: >-
        Missing or invalid credentials (uniform for token plane, no existence
        oracle)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Session/workflow not found or out of scope (indistinguishable by design)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    applicationApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        `Authorization: Api-Key <application_api_key>` (legacy `X-Api-Key` also
        accepted).

````