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

# Listar Certidões da Diligência

> Retorna a lista de certidões associadas à diligência e o status individual de cada item



## OpenAPI

````yaml GET /diligences/{id}/certificates
openapi: 3.0.3
info:
  title: DiHub API
  description: API para acessar as funcionalidades da plataforma DiHub
  version: 1.0.0
  contact:
    name: Suporte DiHub
    email: claudiolima@dihub.com.br
servers:
  - url: https://api.dihub.com.br
    description: Produção
  - url: https://homolog.api.dihubapp.com
    description: Homologação
security: []
tags:
  - name: Créditos
    description: Gestão de saldo de créditos
  - name: Diligências
    description: Emissão de diligências e gestão de certidões
paths:
  /diligences/{id}/certificates:
    get:
      tags:
        - Diligências
      summary: List diligence certificates
      description: >-
        Returns the list of certificates for a diligence, grouped by
        court/issuer
      operationId: getDiligenceCertificates
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Diligence ID
      responses:
        '200':
          description: Certificates list retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiligenceCertificatesResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Diligence not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Diligence not found
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DiligenceCertificatesResponse:
      type: object
      properties:
        id:
          type: string
          description: Diligence ID
        subject:
          type: object
          properties:
            name:
              type: string
            document:
              type: string
              description: Obfuscated document number
        state:
          type: string
        district:
          type: string
        diligenceStatus:
          type: string
        certificates:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                certificateName:
                  type: string
                emissionResultStatus:
                  type: string
                  enum:
                    - Em andamento
                    - Concluída
                    - Falha
                certificateStatus:
                  type: string
                  nullable: true
                  enum:
                    - Pendência potencial
                    - Positiva
                    - Negativa
                  description: >-
                    Status da certidão. Ausente enquanto a emissão não foi
                    concluída.
        requester:
          type: object
          properties:
            name:
              type: string
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Mensagem de erro
          example: Validation Error
        details:
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      type: string
                  message:
                    type: string
            - type: object
  responses:
    UnauthorizedError:
      description: Credenciais de autenticação ausentes ou inválidas
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Unauthorized
    InternalServerError:
      description: Erro interno do servidor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Internal Server Error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Token
      description: Chave de API para autenticação. Envie o token no header X-Api-Token.

````