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

# Get dunning documents

> Get dunning documents

<sup>Required permissions: `dunning-document:read`</sup>



## OpenAPI

````yaml get /dunning/documents
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /dunning/documents:
    parameters: []
    get:
      tags:
        - DunningDocument
      summary: Get dunning documents
      description: |-
        Get dunning documents

        <sup>Required permissions: `dunning-document:read`</sup>
      operationId: getDunningDocuments
      parameters:
        - name: page
          in: query
          description: The collection page number
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: integer
            default: 1
          style: form
          explode: false
          allowReserved: false
        - name: limit
          in: query
          description: The number of items per page
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: integer
            default: 30
            minimum: 0
            maximum: 100
          style: form
          explode: false
          allowReserved: false
        - name: invoice
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
          style: form
          explode: false
          allowReserved: false
        - name: invoice[]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          allowReserved: false
        - name: customer
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
          style: form
          explode: false
          allowReserved: false
        - name: customer[]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          allowReserved: false
        - name: status
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
          style: form
          explode: false
          allowReserved: false
        - name: status[]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          allowReserved: false
        - name: type
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
          style: form
          explode: false
          allowReserved: false
        - name: type[]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          allowReserved: false
        - name: order[documentDate]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
            enum:
              - asc
              - desc
          style: form
          explode: false
          allowReserved: false
        - name: order[dueDate]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
            enum:
              - asc
              - desc
          style: form
          explode: false
          allowReserved: false
        - name: order[level]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
            enum:
              - asc
              - desc
          style: form
          explode: false
          allowReserved: false
        - name: order[type]
          in: query
          description: ''
          required: false
          deprecated: false
          allowEmptyValue: true
          schema:
            type: string
            enum:
              - asc
              - desc
          style: form
          explode: false
          allowReserved: false
      responses:
        '200':
          description: DunningDocument collection
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DunningDocument-DunningDocumentList'
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          totalItems:
                            type: integer
                          itemsPerPage:
                            type: integer
                          currentPage:
                            type: integer
                          lastPage:
                            type: integer
                          pageTotalItems:
                            type: integer
            text/html:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DunningDocument-DunningDocumentList'
      deprecated: false
      security:
        - JWT:
            - dunning-document:read
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X GET \
             /dunning/documents \
             --header "Authorization: Bearer <token>"
components:
  schemas:
    DunningDocument-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The id of the dunning document
          example: ad8f6b9c-4b9c-4c9c-9c4b-9c4b9c4b9c4b
          type: string
        customer:
          $ref: '#/components/schemas/Customer-DunningDocumentList'
          readOnly: true
          description: The customer of the dunning document
        documentDate:
          readOnly: true
          description: The document date of the dunning document
          type: string
          format: date-time
        dueDate:
          readOnly: true
          description: The due date until when the invoice should be paid
          type: string
          format: date-time
        media:
          readOnly: true
          anyOf:
            - $ref: '#/components/schemas/Media-DunningDocumentList'
            - type: 'null'
        invoice:
          $ref: '#/components/schemas/Invoice-DunningDocumentList'
          description: The invoice for which this dunning document was created
        level:
          readOnly: true
          description: The level of the current dunning document
          type: integer
        type:
          readOnly: true
          description: The type of the current dunning document
          type: string
          enum:
            - reminder
            - dunning
        status:
          readOnly: true
          description: |-
            The status of the current dunning document

            Possible values:
             * `open`: The dunning document is open and can be paid.
             * `cancelled`: The dunning document was cancelled and can not be paid anymore.
             * `paid`: The dunning document was paid and can not be paid anymore. The dunning process for this invoice is stopped.
        reason:
          readOnly: true
          description: >-
            The reason for the cancellation. This is used for internal purposes
            only.
          type:
            - string
            - 'null'
        dunningFeeCents:
          readOnly: true
          description: >-
            The dunning fee in cents for this dunning document. This is only
            relevant for dunning documents of type "dunning".
          type:
            - integer
            - 'null'
        createdAt:
          readOnly: true
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          type: string
          format: date-time
        invoiceNumber:
          readOnly: true
          type: string
        dunningFee:
          readOnly: true
          anyOf:
            - $ref: '#/components/schemas/Money-DunningDocumentList'
            - type: 'null'
        number:
          readOnly: true
          type: string
    Customer-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 00000000-0000-0000-0000-000000000000
          type: string
        customerNumber:
          minLength: 2
          maxLength: 255
          example: CUSTOMER-000
          nullable: false
        timeZone:
          readOnly: true
          default: Europe/Berlin
          example: Europe/Berlin
          type: string
        firstName:
          minLength: 2
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: John
          nullable: true
        lastName:
          minLength: 2
          maxLength: 255
          description: Can be empty if the customer is a company.
          example: Doe
          nullable: true
        currencyCode:
          description: >-
            Can be empty. In this case the default currency of the tenant is
            used.
          externalDocs:
            url: https://schema.org/priceCurrency
          example: EUR
          type: string
        companyName:
          minLength: 2
          maxLength: 255
          example: Acme Inc.
          type:
            - string
            - 'null'
        datevId:
          minLength: 2
          maxLength: 255
          description: The ID of the customer in DATEV
          example: '123456789'
          type:
            - string
            - 'null'
        status:
          default: STATUS_ACTIVE
          example: STATUS_ACTIVE
          enum:
            - STATUS_ACTIVE
            - STATUS_ARCHIVED
            - STATUS_SUSPENDED
    Media-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          $ref: '#/components/schemas/MediaId-DunningDocumentList'
          readOnly: true
          example: 01F9Z3ZJXZQZJZJZJZJZJZJZJZ
        mimeType:
          description: The mime type of the media
          example: image/jpeg
          type:
            - string
            - 'null'
        fileExtension:
          description: The file extension of the media
          example: jpg
          type: string
        fileName:
          description: The original file name of the media
          example: invoice.jpg
          type: string
    Invoice-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the invoice.
          example: 00000000-0000-0000-0000-000000000000
          type: string
          format: uuid
        customer:
          $ref: '#/components/schemas/Customer-DunningDocumentList'
          description: The customer of the invoice.
        paymentMethod:
          description: >-
            The payment method which should be used to fullfill the payment of
            the invoice.
          anyOf:
            - $ref: '#/components/schemas/PaymentMethod-DunningDocumentList'
            - type: 'null'
        type:
          description: The type of the invoice.
          example: TYPE_INVOICE
          enum:
            - TYPE_INVOICE
            - TYPE_CREDIT
            - TYPE_REFUND
            - TYPE_REMINDER
            - TYPE_CANCEL
            - TYPE_DUNNING
        currencyCode:
          description: >-
            The currency code of the invoice. If multiple currency codes will be
            used in the positions, they will be converted to that base currency.
          example: EUR
          type: string
        number:
          readOnly: true
          description: >-
            The document id of the invoice. This will be generated, when the
            invoice will be finalized.
          example: RE-0000000001
          type: string
        status:
          readOnly: true
          type: string
          enum:
            - STATUS_DRAFT
            - STATUS_PAID
            - STATUS_CANCELLED
            - STATUS_CLOSED
            - STATUS_REFUNDED
            - STATUS_REMINDED
            - STATUS_UNPAID
            - STATUS_NEW
            - STATUS_FINALIZING
        finalizationDate:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        dueDate:
          type:
            - string
            - 'null'
          format: date-time
        dunningLevel:
          readOnly: true
          type: integer
        dunningStatus:
          readOnly: true
          default: none
          example: none
          type: string
          enum:
            - reminder
            - dunning
            - none
        payDate:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        invoiceAddress:
          readOnly: true
          description: The invoice address of the invoice.
          nullable: true
        internalNote:
          description: The notice of the invoice.
          deprecated: true
          example: This invoice is with a special discount.
          type:
            - string
            - 'null'
        netAmount:
          $ref: '#/components/schemas/MoneyEmbedded-DunningDocumentList'
          readOnly: true
          description: The net amount of the invoice.
        grossAmount:
          $ref: '#/components/schemas/MoneyEmbedded-DunningDocumentList'
          readOnly: true
        taxAmount:
          $ref: '#/components/schemas/MoneyEmbedded-DunningDocumentList'
          readOnly: true
        customFields:
          additionalProperties:
            type: string
          type:
            - object
            - 'null'
          example:
            field1: value1
            field2: value2
          description: >-
            Custom fields for the entity. The keys are the field names and the
            values are the field values. They need to be configured under
            \"/custom-fields\" in the API documentation. The input is validated
            against the configuration. For more details see [Custom Fields
            Guide](/guide/tenant/custom-fields)
        unpaidAmount:
          $ref: '#/components/schemas/Money-DunningDocumentList'
          readOnly: true
    Money-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
    MediaId-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
    PaymentMethod-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
          description: Unique identifier of the payment method
          example: c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b
        gatewayName:
          type: string
          enum:
            - wallet
            - sepa_debit
            - stripe
            - fake_provider
            - paypal
            - bank_transfer
            - go_cardless
            - testing
          description: The payment gateway used to process the payment method
        type:
          type:
            - string
            - 'null'
          enum:
            - sepa_debit
            - card
            - paypal
            - bank_transfer
            - wallet
            - fake_provider
            - null
          description: The type of the payment method
        default:
          type: boolean
          description: Whether this is the default payment method for the customer
          example: true
        status:
          default: active
          example: active
          type: string
          enum:
            - active
            - action_required
            - expired
            - revoked
            - gateway_unconfigured
          description: The current status of the payment method
        enabled:
          type: boolean
          description: Whether the payment method is enabled for use
          example: true
        name:
          type:
            - string
            - 'null'
          description: Display name of the payment method
          example: Visa (4242)
        creationDate:
          readOnly: true
          type: string
          format: date-time
          description: The date when the payment method was created
          example: '2024-01-15T10:30:00+00:00'
        expirationDate:
          type:
            - string
            - 'null'
          format: date-time
          description: The expiration date of the payment method, if applicable
          example: '2026-12-31T23:59:59+00:00'
    MoneyEmbedded-DunningDocumentList:
      type: object
      description: ''
      deprecated: false
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````