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

# Download consolidated attachments

> Downloads a single consolidated file with all available attachments of a lawsuit in a given instance.



## OpenAPI

````yaml openapi/lawsuits.json GET /lawsuits/{lawsuit_cnj}/{instance}/consolidated
openapi: 3.0.0
info:
  title: JUDIT - Lawsuits API
  version: v1.28.8
servers:
  - url: https://lawsuits.production.judit.io
    description: Production server
security: []
paths:
  /lawsuits/{lawsuit_cnj}/{instance}/consolidated:
    get:
      tags:
        - Anexos
      summary: Download consolidado de anexos
      description: >-
        Retorna uma URL para download de um arquivo consolidado com todos os
        anexos disponíveis do processo na instância informada.
      parameters:
        - name: lawsuit_cnj
          in: path
          required: true
          description: Número CNJ do processo.
          schema:
            type: string
        - name: instance
          in: path
          required: true
          description: >-
            Instância do processo (ex.: 1 para primeiro grau, 2 para segundo
            grau).
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LawsuitsLawsuitCnjInstanceConsolidated.Response.Get
        '401':
          description: Unauthorized - Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpUnauthorizedError'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpForbiddenError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpInternalServerError'
      security:
        - apiKeyAuth: []
        - jwtAuth: []
components:
  schemas:
    LawsuitsLawsuitCnjInstanceConsolidated.Response.Get:
      type: object
      properties:
        attachment_url:
          type: string
      required:
        - attachment_url
    HttpUnauthorizedError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpUnauthorizedError
            message:
              type: string
              example: UNAUTHORIZED
            stack:
              type: string
            data:
              type: string
              example: User must be authenticated
    HttpForbiddenError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpForbiddenError
            message:
              type: string
              example: FORBIDDEN
            stack:
              type: string
            data:
              type: string
              example: Authenticated user is not authorized
    HttpInternalServerError:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
              example: HttpInternalServerError
            message:
              type: string
              example: INTERNAL_SERVER_ERROR
            stack:
              type: string
            data:
              type: object
              example:
                message: Database connection failed
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: API key for authentication
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Bearer token for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.