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

# Download issued invoice PDF

> Downloads the PDF of the issued invoice associated with the batch invoice.



## OpenAPI

````yaml /openapi.json get /api/v1/batch_invoices/{id}/pdf
openapi: 3.1.0
info:
  title: YoFacturo API v1
  version: 1.0.0
  summary: API for authentication and invoice batch ingestion and status
  description: |
    API v1 operational endpoints.

    Authentication flow:
    1. Exchange organization api_key for a session token.
    2. Use Authorization: Bearer <session_token> for protected endpoints.
servers:
  - url: https://app.yofacturo.es
security: []
tags:
  - name: Auth
  - name: Invoice Batches
  - name: Batch Invoices
paths:
  /api/v1/batch_invoices/{id}/pdf:
    get:
      tags:
        - Batch Invoices
      summary: Download issued invoice PDF
      description: >-
        Downloads the PDF of the issued invoice associated with the batch
        invoice.
      operationId: downloadBatchInvoicePdf
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: PDF binary for the associated issued invoice
          headers:
            Content-Disposition:
              description: Attachment filename for the downloaded PDF.
              schema:
                type: string
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          description: Missing, invalid, or expired bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Batch invoice not found in current organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Batch invoice PDF is not ready (pending or failed processing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limit exceeded for repeated successful PDF downloads within 5
            seconds
          headers:
            Retry-After:
              description: Seconds until the next PDF download request is allowed
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token

````