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

# Reproduce a Claim valuation

> Returns the synthetic Claim state and financial amounts known at an explicit cutoff. Both business time and knowledge time must fall on or before `valuation_at`. Requires `claims:read`.



## OpenAPI

````yaml /openapi/heyrafiki.openapi.yaml get /claims/{claim_id}/valuation
openapi: 3.1.0
info:
  title: Heyrafiki API
  version: 1.0.0
  description: Build Care, Cover and Payment workflows on Heyrafiki.
  contact:
    name: Heyrafiki
    url: https://heyrafiki.space
    email: developers@heyrafiki.space
  license:
    name: All rights reserved
    identifier: LicenseRef-Heyrafiki-Proprietary
servers:
  - url: https://api.heyrafiki.space/v1
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /claims/{claim_id}/valuation:
    get:
      summary: Reproduce a Claim valuation
      description: >-
        Returns the synthetic Claim state and financial amounts known at an
        explicit cutoff. Both business time and knowledge time must fall on or
        before `valuation_at`. Requires `claims:read`.
      operationId: getClaimValuation
      parameters:
        - $ref: '#/components/parameters/ClaimId'
        - name: valuation_at
          in: query
          required: true
          description: >-
            Inclusive ISO 8601 cutoff for business time and system knowledge
            time.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: A reproducible Claim valuation
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimValuation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    ClaimId:
      name: claim_id
      in: path
      required: true
      description: A public Claim identifier.
      schema:
        type: string
        maxLength: 100
        pattern: ^clm_[A-Za-z0-9_-]+$
  headers:
    RateLimitLimit:
      description: Maximum requests allowed in the current minute.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests remaining in the current minute.
      schema:
        type: integer
    RateLimitReset:
      description: Unix timestamp when the current limit resets.
      schema:
        type: integer
  schemas:
    ClaimValuation:
      type: object
      additionalProperties: false
      required:
        - id
        - object
        - claim_id
        - valuation_at
        - currency
        - status
        - amount
        - policy
        - events
      properties:
        id:
          type: string
          description: Stable composite of the Claim identifier and valuation cutoff.
        object:
          type: string
          const: claim_valuation
        claim_id:
          type: string
          pattern: ^clm_[A-Za-z0-9_-]+$
        valuation_at:
          type: string
          format: date-time
        currency:
          type: string
          pattern: ^[A-Z]{3}$
        status:
          type: string
          enum:
            - draft
            - submitted
            - queried
            - approved
            - partially_approved
            - denied
            - settled
            - reversed
            - cancelled
        amount:
          type: object
          additionalProperties: false
          required:
            - billed
            - payer_liability
            - patient_responsibility
            - adjustment
            - remitted
            - settled
            - outstanding
          properties:
            billed:
              type: integer
              minimum: 0
            payer_liability:
              type:
                - integer
                - 'null'
              minimum: 0
            patient_responsibility:
              type:
                - integer
                - 'null'
              minimum: 0
            adjustment:
              type:
                - integer
                - 'null'
              minimum: 0
            remitted:
              type: integer
              minimum: 0
              description: Payer advice known at the cutoff.
            settled:
              type: integer
              minimum: 0
              description: Independently observed money movement known at the cutoff.
            outstanding:
              type:
                - integer
                - 'null'
              minimum: 0
              description: Payer liability less independently observed settlement.
        policy:
          oneOf:
            - type: object
              additionalProperties: false
              required:
                - reference
                - version
              properties:
                reference:
                  type: string
                version:
                  type: string
            - type: 'null'
        events:
          type: array
          items:
            $ref: '#/components/schemas/ClaimValuationEvent'
    ClaimValuationEvent:
      type: object
      additionalProperties: false
      required:
        - sequence
        - type
        - effective_at
        - recorded_at
        - previous_status
        - next_status
        - reason_code
        - evidence_references
      properties:
        sequence:
          type: integer
          minimum: 1
        type:
          type: string
          enum:
            - created
            - validated
            - submitted
            - queried
            - evidence_added
            - resubmitted
            - approved
            - partially_approved
            - denied
            - remittance_recorded
            - settled
            - reconciled
            - reversed
            - cancelled
        effective_at:
          type: string
          format: date-time
          description: Business time when the underlying fact took effect.
        recorded_at:
          type: string
          format: date-time
          description: Knowledge time when Heyrafiki persisted the fact.
        previous_status:
          type:
            - string
            - 'null'
          enum:
            - draft
            - submitted
            - queried
            - approved
            - partially_approved
            - denied
            - settled
            - reversed
            - cancelled
            - null
        next_status:
          type:
            - string
            - 'null'
          enum:
            - draft
            - submitted
            - queried
            - approved
            - partially_approved
            - denied
            - settled
            - reversed
            - cancelled
            - null
        reason_code:
          type:
            - string
            - 'null'
        evidence_references:
          type: array
          items:
            type: string
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
            - docs
          properties:
            code:
              type: string
            message:
              type: string
            docs:
              type: string
              format: uri
  responses:
    BadRequest:
      description: The request failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: The API key is missing or invalid.
      headers:
        WWW-Authenticate:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: The API key does not permit this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The requested resource does not exist or is not visible to this project.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    TooManyRequests:
      description: The project exceeded its request limit.
      headers:
        Retry-After:
          description: Seconds until another request should be attempted.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServiceUnavailable:
      description: The service is temporarily unavailable.
      headers:
        Retry-After:
          schema:
            type: integer
            example: 5
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A sandbox or production secret key.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: An alternative for clients that cannot set Authorization.

````