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

# Detalhamento técnico

> Retorna o resultado normalizado e os checks de cada fonte do bureau individualmente.
Útil para debugging e integração avançada.

**Requer escopo `detail:read`** — solicite ao suporte kycert para habilitação.
Nunca retorna o payload bruto das fontes — apenas dados normalizados.




## OpenAPI

````yaml GET /api/v1/bureau/runs/{run_id}/detail
openapi: 3.0.3
info:
  title: kycert API
  version: '2026-06-03'
  description: >
    API KYC/AML para corretoras de câmbio autorizadas pelo Banco Central do
    Brasil.

    Permite rodar verificações de bureau em CPF ou CNPJ e receber o resultado
    via webhook.


    **Fluxo principal:**

    ```

    POST /runs → 202 (run_id) → [bureau processa 5–30s] → webhook entregue →
    agir

    ```
  contact:
    name: kycert
    url: https://kycert.com.br
  license:
    name: Proprietário
    url: https://kycert.com.br
servers:
  - url: https://admin.kycert.com.br
    description: Produção (sk_live_...)
  - url: https://admin.kycert.com.br
    description: Sandbox (sk_test_...)
security:
  - ApiKeyHeader: []
  - BearerToken: []
tags:
  - name: Runs
    description: Execução de bureau para CPF ou CNPJ
  - name: Customers
    description: Gestão de clientes do tenant
paths:
  /api/v1/bureau/runs/{run_id}/detail:
    get:
      tags:
        - Runs
      summary: Obter detalhe técnico por fonte
      description: >
        Retorna o resultado normalizado e os checks de cada fonte do bureau
        individualmente.

        Útil para debugging e integração avançada.


        **Requer escopo `detail:read`** — solicite ao suporte kycert para
        habilitação.

        Nunca retorna o payload bruto das fontes — apenas dados normalizados.
      operationId: getRunDetail
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: x-kycert-api-version
          in: header
          required: false
          schema:
            type: string
            example: '2026-06-03'
      responses:
        '200':
          description: Detalhe técnico por fonte
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
            X-Kycert-Api-Version:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
            X-RateLimit-Reset:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunDetail'
              example:
                run_id: 550e8400-e29b-41d4-a716-446655440000
                sources:
                  - source_id: receita_federal_cpf
                    status: VALID
                    cached: false
                    duration_ms: 820
                    checks:
                      - check_id: cpf_situacao_receita
                        check_label: Situação CPF na Receita Federal
                        status: VALID
                        result_code: cpf_regular
                        result_label: CPF regular — situação ativa na Receita Federal
                    error_code: null
                    error_message: null
                livemode: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    RunDetail:
      type: object
      properties:
        run_id:
          type: string
          format: uuid
        sources:
          type: array
          items:
            $ref: '#/components/schemas/SourceDetail'
        livemode:
          type: boolean
    SourceDetail:
      type: object
      properties:
        source_id:
          type: string
        status:
          type: string
          enum:
            - VALID
            - INVALID
            - NO_DATA
            - ERROR
        cached:
          type: boolean
          description: true se resultado veio de cache compartilhado
        duration_ms:
          type: integer
          nullable: true
        checks:
          type: array
          items:
            $ref: '#/components/schemas/CheckResult'
        error_code:
          type: string
          nullable: true
        error_message:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - authorization_error
                - billing_error
                - server_error
            code:
              type: string
              description: Código específico do erro
            message:
              type: string
              description: Descrição legível do erro
            param:
              type: string
              nullable: true
              description: Campo que causou o erro (quando aplicável)
    CheckResult:
      type: object
      properties:
        check_id:
          type: string
          description: Identificador do check
        check_label:
          type: string
          description: Descrição legível do check
        status:
          type: string
          enum:
            - VALID
            - INVALID
            - NO_DATA
            - ERROR
          description: |
            - VALID — verificado, sem problema
            - INVALID — verificado, com problema
            - NO_DATA — fonte não encontrou dados
            - ERROR — falha técnica nesta fonte
        result_code:
          type: string
          description: Código de resultado específico do check
        result_label:
          type: string
          description: Descrição do resultado em português
        source_id:
          type: string
          description: Fonte de dados que gerou este check
  responses:
    Unauthorized:
      description: API key ausente ou inválida
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_api_key:
              value:
                error:
                  type: authentication_error
                  code: missing_api_key
                  message: API key ausente.
                  param: null
            invalid_api_key:
              value:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: API key inválida ou inativa.
                  param: null
    Forbidden:
      description: Escopo insuficiente para esta operação
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authorization_error
              code: insufficient_scope
              message: Esta chave não tem permissão para criar runs.
              param: null
    NotFound:
      description: Run não encontrado ou não pertence ao tenant
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: invalid_request_error
              code: run_not_found
              message: Run não encontrado.
              param: null
    InternalError:
      description: Falha interna — tente novamente com backoff exponencial
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: server_error
              code: internal_error
              message: Erro interno. Tente novamente.
              param: null
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API key no header x-api-key (recomendado)
    BearerToken:
      type: http
      scheme: bearer
      description: API key como Bearer token no header Authorization

````