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

# Receipts by Control

> Scans the signed receipt chain for the checks that prove this control (pack `proven_by`), within `range`. `enforced` covers PASS/BLOCKED/REDACTED — all are evidence the control ran in-path; `failed` marks a technical/upstream failure on a proving check; `indeterminate` marks an unrecognized proving-check result (never assumed enforced). `summary` is an accurate aggregate over the whole window; `receipts` is a capped sample page — use `nextCursor` to page.



## OpenAPI

````yaml GET /v1/compliance/coverage/{framework}/controls/{controlId}/receipts
openapi: 3.0.0
info:
  title: Wardin API
  description: AI governance & observability platform — external REST API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/compliance/coverage/{framework}/controls/{controlId}/receipts:
    get:
      tags:
        - compliance
      summary: Receipts where a control was applied, this period
      description: >-
        Scans the signed receipt chain for the checks that prove this control
        (pack `proven_by`), within `range`. `enforced` covers
        PASS/BLOCKED/REDACTED — all are evidence the control ran in-path;
        `failed` marks a technical/upstream failure on a proving check;
        `indeterminate` marks an unrecognized proving-check result (never
        assumed enforced). `summary` is an accurate aggregate over the whole
        window; `receipts` is a capped sample page — use `nextCursor` to page.
      operationId: ComplianceController_queryByControl
      parameters:
        - name: framework
          required: true
          in: path
          schema:
            type: string
            example: eu_ai_act
        - name: controlId
          required: true
          in: path
          schema:
            type: string
            example: eu_ai_act:art_12
        - name: limit
          required: false
          in: query
          schema:
            example: 100
            type: string
        - name: cursor
          required: false
          in: query
          description: seq from a previous page’s nextCursor, to page forward.
          schema:
            type: string
        - name: range
          required: false
          in: query
          description: Compact window, `Nd` or `Nh` (e.g. 7d, 24h).
          schema:
            example: 7d
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ControlReceiptsDto'
        '400':
          description: Malformed `range` (must match `Nd` or `Nh`)
        '404':
          description: Unknown framework or control
      security:
        - bearer: []
components:
  schemas:
    ControlReceiptsDto:
      type: object
      properties:
        framework:
          type: string
          example: eu_ai_act
        controlId:
          type: string
          example: eu_ai_act:art_12
        controlTitle:
          type: string
          example: Record-keeping — automatic logging of events
        coverage:
          type: string
          example: enforced
          enum:
            - enforced
            - partial
            - external
        packVersion:
          type: string
          example: v1
        packHash:
          type: string
          example: b7e1c2f4a8d6e0f3c1a9b5d7e2f4a6c8d0b2e4f6a8c0d2e4f6a8c0d2e4f6a8c0
          description: sha256 of the pack’s raw YAML bytes.
        disclaimer:
          type: string
          description: >-
            Legal-posture disclaimer — surface verbatim. Not legal advice; scope
            is gateway-routed traffic.
        range:
          type: string
          example: 7d
        days:
          type: number
          example: 7
        provenBy:
          example:
            - GUARDRAIL
          description: Receipt checks that prove this control.
          type: array
          items:
            type: string
        limit:
          type: number
          example: 100
          description: The effective (clamped) page size used for `receipts`, 1..500.
        truncated:
          type: boolean
          example: true
          description: >-
            True when `receipts` did not reach the end of the window — more rows
            exist. Page with `nextCursor`.
        nextCursor:
          type: object
          nullable: true
          example: 4821
          description: >-
            seq of the last row in this page — pass as `cursor` to fetch the
            next page. null when there are no more rows.
        summary:
          description: >-
            Accurate counts over the whole window — not just the returned sample
            below.
          allOf:
            - $ref: '#/components/schemas/ControlReceiptSummaryDto'
        receipts:
          description: >-
            A sample (page) of up to `limit` rows, ordered by seq DESC — not the
            full window. Use `nextCursor` to page through the rest.
          type: array
          items:
            $ref: '#/components/schemas/ControlReceiptRowDto'
      required:
        - framework
        - controlId
        - controlTitle
        - coverage
        - packVersion
        - packHash
        - disclaimer
        - range
        - days
        - provenBy
        - limit
        - truncated
        - summary
        - receipts
    ControlReceiptSummaryDto:
      type: object
      properties:
        total:
          type: number
          example: 42
          description: >-
            Accurate count over the ENTIRE window — a separate aggregate query,
            not a count of the (possibly capped) returned rows. total = enforced
            + failed + indeterminate.
        enforced:
          type: number
          example: 40
          description: >-
            Every proving check resulted in PASS, BLOCKED, or REDACTED — the
            control ran in-path and functioned (allow or act are both governance
            evidence). Derived as total - failed - indeterminate.
        failed:
          type: number
          example: 2
          description: >-
            At least one proving check recorded a technical/upstream failure
            (FAIL:<code>:<reason>).
        indeterminate:
          type: number
          example: 0
          description: >-
            No FAIL, but at least one proving check recorded a result outside
            {PASS, BLOCKED, REDACTED, FAIL:*} — an unrecognized result — or a
            receipt had no proving checks at all. Never assumed enforced.
      required:
        - total
        - enforced
        - failed
        - indeterminate
    ControlReceiptRowDto:
      type: object
      properties:
        receiptId:
          type: string
          example: 018f1234-5678-7abc-def0-123456789abc
        seq:
          type: number
          example: 4821
        ts:
          type: string
          example: '2026-07-09 12:34:56.789'
        actor:
          type: string
          example: key-1
        provider:
          type: string
          example: anthropic
        model:
          type: string
          example: claude-3-5-haiku-20241022
        outcome:
          type: string
          example: enforced
          enum:
            - enforced
            - failed
            - indeterminate
          description: >-
            A receipt matches if AT LEAST ONE of the control’s proving checks
            was applied; per-row `provingChecks` shows which ran. enforced =
            every proving check resulted in PASS, BLOCKED, or REDACTED (ran
            in-path and functioned; allow or act are both governance evidence).
            failed = a proving check recorded a technical/upstream failure
            (FAIL:<code>:<reason>). indeterminate = a proving check recorded an
            unrecognized result, or none of this control’s proving checks were
            present on the row — never assumed enforced.
        provingChecks:
          description: The subset of this receipt’s checks that prove the control.
          type: array
          items:
            $ref: '#/components/schemas/ReceiptCheckDto'
        packVersion:
          type: string
          example: v1
          nullable: true
          description: >-
            COMPLY-1: the compliance pack-set version in force when this receipt
            was emitted. NOT part of the signed canonical receipt — an unsigned,
            queryable side channel. Empty string when unstamped (receipts
            written before this column existed, or with the env var unset).
      required:
        - receiptId
        - seq
        - ts
        - actor
        - provider
        - model
        - outcome
        - provingChecks
        - packVersion
    ReceiptCheckDto:
      type: object
      properties:
        name:
          type: string
          example: policy
        result:
          type: string
          example: allow
      required:
        - name
        - result
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````