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

# List invoice PDF attachments

> List invoice PDF attachments through the public API.

Attachments are returned in upload order, including files added through the invoice editor. Each attachment includes its id, URL, original filename, content type, and size in bytes.

Their pages appear after the invoice and before the QR payment slip in the generated PDF.


## OpenAPI

````yaml GET /v1/invoices/{invoiceId}/pdf-attachments
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/invoices/{invoiceId}/pdf-attachments:
    parameters:
      - name: invoiceId
        in: path
        required: true
        schema:
          type: string
    get:
      summary: List invoice PDF attachments
      description: >-
        Returns attachments in the order their pages appear in the generated
        invoice PDF. Requires invoice read access.
      operationId: list-invoice-pdf-attachments-v1
      responses:
        '200':
          description: The invoice's PDF attachments.
          content:
            application/json:
              schema:
                type: object
                required:
                  - attachments
                properties:
                  attachments:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvoicePdfAttachment'
        '401':
          $ref: '#/components/responses/Unauthorised'
        '403':
          $ref: '#/components/responses/InvoiceAttachmentForbidden'
        '404':
          $ref: '#/components/responses/CustomerInvoiceNotFound'
components:
  schemas:
    InvoicePdfAttachment:
      type: object
      required:
        - id
        - url
        - name
        - type
        - size
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
        name:
          type: string
        type:
          type: string
          enum:
            - application/pdf
        size:
          type: integer
          description: File size in bytes.
          maximum: 10485760
  responses:
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
    InvoiceAttachmentForbidden:
      description: >-
        Invoice-module access is missing, or attachments are read-only. Issued
        invoices and estimates become read-only when annulled, paid, outside an
        editable fiscal year, or in a settled VAT period. Draft attachments
        remain editable.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                enum:
                  - rest-api/insufficient-scope
                  - customer-invoices/attachments-read-only
    CustomerInvoiceNotFound:
      description: >-
        No invoice or estimate with the given id could be found in this
        organisation. Also returned when the id refers to the other kind of
        document, e.g. an estimate id on an invoice endpoint.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                description: Specific error code.
          examples:
            Not found:
              value:
                code: customer-invoices/not-found
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````

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