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

# Fetch Invoice attachments



## OpenAPI

````yaml GET /invoice/attachments
openapi: 3.1.0
info:
  title: OpenAPI Valyx API
  description: To demonstrate features in the Valyx
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.valyx.com
security:
  - bearerAuth:
      - demo-api
tags:
  - name: billing
    description: External Billing APIs
  - name: external
    description: External APIs for customers
  - name: invoice
    description: Invoice APIs
  - name: creditNote
    description: Credit Note APIs
paths:
  /invoice/attachments:
    get:
      tags:
        - invoice
      summary: Get invoice attachments
      operationId: get_invoice_attachment_route
      parameters:
        - name: X-Valyx-Attachment-Upload-Signature
          in: header
          required: true
          schema:
            type: string
          description: Auth key for attachment upload
        - name: X-Valyx-Signature
          in: header
          schema:
            type: string
          description: Auth key for attachment upload
        - name: uploadedBefore
          in: query
          schema:
            type: string
          description: uploaded before should be this date
        - name: uploadedAfter
          in: query
          schema:
            type: string
          description: uploaded before should be this date
        - name: purpose
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - INVOICE_FOR_BUYER
                - INVOICE_SUPPORTING
                - PURCHASE_ORDER
                - SALES_ORDER
                - DELIVERY_DOCUMENT
                - PAYMENT_PROOF
                - DISPUTE
                - DISPUTE_RESOLUTION
                - ENQUIRY
                - ENQUIRY_RESOLUTION
                - TAX_DOCUMENT
                - COMMERCIAL_AGREEMENT
                - COMMERCIAL_AGREEMENT_SUPPORTING
                - LEGAL
                - GENERAL
                - CREDITNOTE_FOR_BUYER
                - CREDITNOTE_SUPPORTING
                - TICKET
                - USAGE_ESTIMATE
                - MAIL_ATTACHMENT
          style: form
          explode: false
          description: |
            Purpose of the attachment. Allowed values:
              - INVOICE_FOR_BUYER, INVOICE_SUPPORTING, PURCHASE_ORDER etc.
        - name: invoiceDateStart
          in: query
          schema:
            type: string
        - name: invoiceDateEnd
          in: query
          schema:
            type: string
        - name: invoiceNumber
          in: query
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
        - name: pageNumber
          in: query
          required: true
          schema:
            type: integer
        - name: pageSize
          in: query
          required: true
          schema:
            type: integer
        - name: X-Fields
          in: header
          description: An optional fields mask
          schema:
            type: string
            format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceAttachmentResponseModel'
components:
  schemas:
    InvoiceAttachmentResponseModel:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/UploadInvoiceAttachmentResponseDataModel'
    UploadInvoiceAttachmentResponseDataModel:
      type: object
      properties:
        invoiceId:
          type: string
        invoiceNumber:
          type: string
        customerName:
          type: string
        buyerId:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentForInvoice'
    AttachmentForInvoice:
      type: object
      properties:
        filename:
          type: string
        purpose:
          type: string
        createdAt:
          type: string

````