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

# Retrieve a Transaction Validation

> Use this endpoint to retrieve a transaction validation record by its unique identifier. Useful for auditing and debugging validation decisions.



## OpenAPI

````yaml /en/openapi/v3-current/tracer.yaml get /v1/validations/{id}
openapi: 3.1.0
info:
  title: Tracer API
  description: >-
    Complete API reference for Tracer services including transaction validation,
    rules management, spending limits, and audit events for SOX/GLBA compliance.
  version: 1.0.0
servers:
  - url: https://tracer.lerian.io
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Health API
    description: >-
      Health check endpoints for liveness and readiness probes. These endpoints
      do not require authentication.
  - name: Validations API
    description: >-
      Transaction validation endpoints. Performance target is under 80ms (p99).
      Validations are idempotent by `requestId` — a duplicate request returns
      the cached result with HTTP 200, while a new request returns HTTP 201. No
      idempotency header is required.
  - name: Rules API
    description: >-
      Validation rule management endpoints. Rules use CEL (Common Expression
      Language) expressions.
  - name: Limits API
    description: >-
      Spending limit management endpoints. Limits control transaction amounts by
      scope and period.
  - name: Audit Events API
    description: >-
      Audit trail endpoints for SOX/GLBA compliance. All validation decisions
      and configuration changes are recorded.
paths:
  /v1/validations/{id}:
    get:
      tags:
        - Validations API
      summary: Retrieve a Transaction Validation
      description: >-
        Use this endpoint to retrieve a transaction validation record by its
        unique identifier. Useful for auditing and debugging validation
        decisions.
      operationId: getValidation
      parameters:
        - $ref: '#/components/parameters/ValidationId'
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionValidation'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0007:
                  $ref: '#/components/examples/Error0007'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorUnauthenticated:
                  $ref: '#/components/examples/ErrorUnauthenticated'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0251:
                  $ref: '#/components/examples/Error0251'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0004:
                  $ref: '#/components/examples/Error0004'
components:
  parameters:
    ValidationId:
      name: id
      in: path
      description: >-
        The unique identifier of the transaction validation that you want to
        retrieve.
      required: true
      example: 019c96a0-10d2-7193-8841-0d7347efd09a
      schema:
        type: string
        format: uuid
    ContentType:
      name: Content-Type
      in: header
      description: The type of media of the resource. Must be `application/json`.
      required: true
      example: application/json
      schema:
        type: string
    XApiKey:
      name: X-API-Key
      in: header
      description: >-
        The API Key for authentication. **This header is required for all
        endpoints except health checks**.
      required: true
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: A unique identifier used to trace and track each request.
      required: false
      example: 019c96a0-10ce-75fc-a273-dc799079a99c
      schema:
        type: string
        format: uuid
  schemas:
    TransactionValidation:
      type: object
      description: Full transaction validation record.
      properties:
        validationId:
          type: string
          format: uuid
          description: Server-generated unique identifier for this validation record.
        requestId:
          type: string
          format: uuid
          description: Client-provided request identifier for correlation.
        transactionType:
          type: string
          enum:
            - CARD
            - WIRE
            - PIX
            - CRYPTO
          description: Type of transaction (payment method).
        subType:
          type: string
          description: Transaction subtype for additional context.
        amount:
          type: string
          description: Transaction amount as a decimal string (e.g., "1500.00").
        currency:
          type: string
          description: ISO 4217 currency code.
        transactionTimestamp:
          type: string
          format: date-time
          description: When the transaction occurred.
        decision:
          type: string
          enum:
            - ALLOW
            - DENY
            - REVIEW
          description: Validation decision.
        reason:
          type: string
          description: Human-readable reason for the decision.
        account:
          $ref: '#/components/schemas/AccountContext'
        segment:
          $ref: '#/components/schemas/SegmentContext'
        portfolio:
          $ref: '#/components/schemas/PortfolioContext'
        merchant:
          $ref: '#/components/schemas/MerchantContext'
        metadata:
          type: object
          additionalProperties: true
          description: Custom key-value pairs provided in the request.
        matchedRuleIds:
          type: array
          items:
            type: string
            format: uuid
          description: IDs of rules that matched and triggered the decision.
        evaluatedRuleIds:
          type: array
          items:
            type: string
            format: uuid
          description: IDs of all rules that were evaluated.
        limitUsageDetails:
          type: array
          items:
            $ref: '#/components/schemas/LimitUsageDetail'
          description: Details about each limit checked during validation.
        processingTimeMs:
          type: number
          format: double
          description: Processing time in milliseconds.
        totalRulesLoaded:
          type: integer
          description: Total number of rules loaded for evaluation.
        truncated:
          type: boolean
          description: Whether the response was truncated due to size limits.
        createdAt:
          type: string
          format: date-time
          description: When the validation record was created.
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
        fields:
          type: object
          additionalProperties: true
          description: Additional information about the fields that caused the error.
    AccountContext:
      type: object
      description: Account context for validation.
      required:
        - accountId
      properties:
        accountId:
          type: string
          format: uuid
          description: Account identifier (required).
        type:
          type: string
          description: Account type.
          enum:
            - checking
            - savings
            - credit
        status:
          type: string
          description: Account status.
          enum:
            - active
            - suspended
            - closed
        metadata:
          type: object
          additionalProperties: true
          description: Additional account attributes for rule evaluation.
    SegmentContext:
      type: object
      description: Segment context (optional). If provided, segmentId is required.
      properties:
        segmentId:
          type: string
          format: uuid
          description: Segment identifier (required if segment object provided).
        name:
          type: string
          description: Segment name for rule expressions.
        metadata:
          type: object
          additionalProperties: true
          description: Additional segment attributes for rule evaluation.
    PortfolioContext:
      type: object
      description: Portfolio context (optional). If provided, portfolioId is required.
      properties:
        portfolioId:
          type: string
          format: uuid
          description: Portfolio identifier (required if portfolio object provided).
        name:
          type: string
          description: Portfolio name for rule expressions.
        metadata:
          type: object
          additionalProperties: true
          description: Additional portfolio attributes for rule evaluation.
    MerchantContext:
      type: object
      description: >-
        Merchant context (optional, recommended for card transactions). If
        provided, merchantId is required.
      properties:
        merchantId:
          type: string
          format: uuid
          description: Merchant identifier (required if merchant object provided).
        name:
          type: string
          description: Merchant name.
        category:
          type: string
          description: Merchant Category Code (MCC). Must be a 4-digit code per ISO 18245.
          pattern: ^[0-9]{4}$
        country:
          type: string
          description: >-
            Merchant country. Must be ISO 3166-1 alpha-2 code (2 uppercase
            letters).
          pattern: ^[A-Z]{2}$
        metadata:
          type: object
          additionalProperties: true
          description: Additional merchant attributes for rule evaluation.
    LimitUsageDetail:
      type: object
      description: Details about a limit check during validation.
      properties:
        limitId:
          type: string
          format: uuid
          description: The limit that was checked.
        limitAmount:
          type: string
          description: Total limit amount as a decimal string (e.g., "50000.00").
        currentUsage:
          type: string
          description: >-
            Projected usage after applying transaction, as a decimal string.
            When exceeded, shows what usage would have been if allowed.
        exceeded:
          type: boolean
          description: >-
            Whether the limit was exceeded. When true, the counter was not
            incremented.
        period:
          type: string
          description: Limit period type.
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
            - CUSTOM
            - PER_TRANSACTION
        scope:
          type: string
          description: >-
            Human-readable scope (e.g., "account:uuid", "segment:uuid", or
            "global").
        attemptedAmount:
          type: string
          description: Transaction amount being validated, as a decimal string.
        skipped:
          type: boolean
          description: >-
            Whether this limit was skipped during evaluation (not enforced).
            When true, the counter was not incremented and `exceeded` is always
            false. Omitted when false.
        skipReason:
          type: string
          enum:
            - outside_time_window
            - outside_custom_period
          description: Reason the limit was skipped. Only present when `skipped` is true.
  examples:
    Error0007:
      summary: Invalid Path Parameter
      value:
        code: TRC-0007
        title: Invalid Path Parameter
        message: >-
          The provided ID is not a valid UUID format. Please verify the ID and
          try again.
    ErrorUnauthenticated:
      summary: Unauthorized
      value:
        code: Unauthenticated
        title: Unauthorized
        message: >-
          API Key missing or invalid. Provide a valid API Key in the X-API-Key
          header.
    Error0251:
      summary: Transaction Validation Not Found
      value:
        code: TRC-0251
        title: Transaction Validation Not Found
        message: >-
          The requested transaction validation does not exist. Please verify the
          validation ID and try again.
    Error0004:
      summary: Internal Server Error
      value:
        code: TRC-0004
        title: Internal Server Error
        message: >-
          An unexpected error occurred. Please try again later or contact
          support if the issue persists.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API Key authentication. Used by single-tenant deployments
        (`MULTI_TENANT_ENABLED=false`). Sent on every `/v1/*` request.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer authentication. Used by multi-tenant deployments
        (`MULTI_TENANT_ENABLED=true`). The JWT is issued by Access Manager and
        must carry the `tenantId` claim — Tracer resolves the tenant from the
        token, not from any header or body field.

````