> ## 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.

# Baixar ZIP da Diligência

> Baixa um arquivo ZIP com os documentos disponíveis para a diligência



## OpenAPI

````yaml GET /diligences/{id}/download-zip
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}/download-zip:
    get:
      tags:
        - Diligências
      summary: Download diligence as ZIP
      description: Downloads all diligence certificates and report as a ZIP archive
      operationId: downloadDiligenceZip
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Diligence ID
      responses:
        '200':
          description: ZIP file
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Diligence not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  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
  schemas:
    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
  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.

````