> ## 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 overdue rules

> Get overdue rules.

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



## OpenAPI

````yaml get /dunning/overdue-rules
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/overdue-rules:
    parameters: []
    get:
      tags:
        - OverdueRule
      summary: Get overdue rules
      description: |-
        Get overdue rules.

        <sup>Required permissions: `dunning-rule:read`</sup>
      operationId: getOverdueRules
      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
      responses:
        '200':
          description: OverdueRule collection
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/OverdueRule-OverdueRuleRead'
                  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/OverdueRule-OverdueRuleRead'
      deprecated: false
      security:
        - JWT:
            - dunning-rule:read
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X GET \
             /dunning/overdue-rules \
             --header "Authorization: Bearer <token>"
components:
  schemas:
    OverdueRule-OverdueRuleRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: ad8f3b1c-4f0e-4b9e-8b0a-0e0e0e0e0e0e
          type: string
        level:
          exclusiveMinimum: 0
          maximum: 6
          description: >-
            Level of the overdue rule. The level is used to sort the overdue
            rules. The overdue rule with the lowest level is used first.
          default: 1
          example: 1
          type: integer
        daysOverdue:
          exclusiveMinimum: 0
          description: 'Days after the invoice or last reminder / dunning is overdue. '
          example: 1
          type: integer
        dueInDays:
          exclusiveMinimum: 0
          description: 'Number of days until this reminder / dunning should be paid. '
          default: 7
          example: 7
          type: integer
        type:
          description: |-
            Type of the overdue rule. 

            Possible values:
             * `reminder`: Send a reminder to the customer.
             * `dunning`: Send a dunning to the customer.
          default: reminder
          example: reminder
        emailTemplate:
          $ref: '#/components/schemas/EmailTemplate-OverdueRuleRead'
          description: The email template that is used to send the reminder / dunning.
        documentTemplate:
          $ref: '#/components/schemas/DocumentTemplateDto-OverdueRuleRead'
          description: >-
            The document template that is used to generate the reminder /
            dunning. This is required for a dunning and optional for a reminder.
        amountInCents:
          minimum: 0
          description: >-
            Amount in cents that is charged in the currency of the base invoice,
            for the dunning. This is required for type "dunning".
          example: 100
          type:
            - integer
            - 'null'
        attachOriginalInvoice:
          description: Attach the original invoice additionally to the reminder / dunning.
          default: true
          example: true
          type: boolean
        sendLetter:
          description: Send a letter by mail to the customer.
          type: boolean
        isEnabled:
          description: Enable or disable the overdue rule.
          default: true
          example: true
          type: boolean
        createdAt:
          readOnly: true
          description: Date and time when the overdue rule was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: Date and time when the overdue rule was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
      required:
        - level
        - daysOverdue
        - dueInDays
        - type
        - emailTemplate
        - documentTemplate
    EmailTemplate-OverdueRuleRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 8d6b0c3e-0b7a-4b0a-8b1a-3b0b8b2d0b0b
          type: string
        name:
          maxLength: 255
          example: Order confirmation
          type: string
        senderName:
          maxLength: 255
          example: Acme Inc.
          type:
            - string
            - 'null'
        senderAddress:
          maxLength: 255
          example: noreply@acme.com
          type:
            - string
            - 'null'
        description:
          maxLength: 255
          example: Order confirmation for a new order
          type: string
        subject:
          maxLength: 255
          example: 'Order confirmation #{{ order.number }}'
          type: string
        contentHtml:
          example: <h1>Order confirmation</h1><p>Thank you for your order.</p>
          type: string
          format: html
        contentPlain:
          example: Order confirmation\n\nThank you for your order.
          type: string
          format: text
        isSystem:
          description: >-
            Indicates if the template is a system template. System templates
            cannot be deleted.
          type: boolean
        isEnabled:
          description: >-
            Indicates if the template is enabled. Disabled templates cannot be
            used.
          default: 'true'
          example: 'true'
          type: boolean
        createdAt:
          readOnly: true
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          example: '2021-01-01T00:00:00+00:00'
          type:
            - string
            - 'null'
          format: date-time
        preHeader:
          description: >-
            The pre-header is the short summary text that follows the subject
            line when an email is viewed in the inbox.
          example: Your order confirmation
          type: string
          format: text
        versions:
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/EmailTemplateVersion-OverdueRuleRead'
        currentVersion:
          anyOf:
            - $ref: '#/components/schemas/EmailTemplateVersion-OverdueRuleRead'
            - type: 'null'
      required:
        - name
        - description
        - subject
        - contentHtml
        - contentPlain
    DocumentTemplateDto-OverdueRuleRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          example: 00000000-0000-0000-0000-000000000000
          type: string
        brandColor:
          description: Your brand color in hex format. Used for some text elements.
          default: '#000000'
          example: '#000000'
          type: string
        headerBackgroundColor:
          description: Your header background color in hex format.
          default: '#ffffff'
          example: '#ffffff'
          type: string
        logoPosition:
          description: >-
            Your logo position in the header. Currently supported: left, center,
            right
          default: right
          example: right
          type: string
        type:
          enum:
            - invoice
            - subscription_cancellation
            - dunning
          description: >-
            The document type. Currently supported: invoice,
            subscription_cancellation, dunning
          default: invoice
          example: invoice
          type: string
        name:
          maxLength: 255
          example: invoice
          type: string
        language:
          enum:
            - de
            - en
          maxLength: 2
          description: >-
            ISO 639-1 language code. The template is selected based on the
            customer language. If no template for language found, we will
            fallback to german (de).
          default: de
          example: de
          type: string
        title:
          maxLength: 255
          example: Your invoice $invoice.documentId
          type: string
        logoUrl:
          description: >-
            The logo url can be a base64 encoded image or a url to a image file.
            If you use a base64 encoded image, the image must be a jpeg, jpg,
            png or gif file.
          deprecated: true
          example: base64
          type: string
        introduction:
          example: Thank you for your order.
          type: string
        closing:
          example: Pay this invoice in the next 7 days.
          type: string
        information:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                example: Invoice number
              value:
                type: string
                example: $invoice.documentId
        footer:
          type: array
          items:
            type: object
            properties:
              line1:
                type: string
                example: Company name
              line2:
                type: string
                example: Street
              line3:
                type: string
                example: City
              line4:
                type: string
                example: Country
              line5:
                type: string
                example: VAT number
      required:
        - type
        - name
        - language
        - title
        - introduction
        - closing
    EmailTemplateVersion-OverdueRuleRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: mltplv_1b2nE1a2b3nF4c5d6e7f8g9h0j
          type: string
        version:
          readOnly: true
          example: 1
          type: integer
        subject:
          example: Hello {{ name }}
          type: string
        contentHtml:
          example: <h1>Hello {{ name }}</h1>
          type: string
        contentPlain:
          example: Hello {{ name }}
          type: string
        preHeader:
          example: Hello {{ name }}
          type:
            - string
            - 'null'
        createdAt:
          readOnly: true
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        createdBy:
          example: system
          enum:
            - system
            - user
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````