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

# Add case vouchers

> Add new case vouchers (e.g. unpaid invoices, reminder fees or deposits) to a customer. Based on the vouchers, the platform automatically determines whether to create a new case or add the vouchers to an existing case.



## OpenAPI

````yaml POST /v1/{tenantId}/customers/{customerId}/add-case-vouchers
openapi: 3.0.1
info:
  title: Debbie Creditor API Docs
  description: >-
    The Debbie Creditor API is a RESTful interface allowing you, as a creditor,
    to programmatically send data to your debt collection partner and access
    your data in the platform. It provides predictable URLs for accessing
    resources, and uses built-in HTTP features to receive commands and return
    responses. This makes it easy to integrate with your own systems, for
    example your ERP or invoicing system.
  version: v1.0.0
  x-logo:
    url: https://debbie-platform.github.io/creditor-api-docs/deb-logo.svg
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Files
    description: Endpoints for interacting with files
  - name: Voucher Type Ids
    description: >-
      ### Principals:

      | Type | id |

      | --- | --- |

      | Invoice (Faktura) | eb41e58e-fccf-419d-a771-cd5027fe6e87 |

      | Credit note (Kreditnota) | ef2cdc50-230f-4046-b1af-0f9c498dddd3 |

      | Final statement (Opgørelse) | 42385ae0-6846-425c-a793-8d47a3b190b5 |

      | On account invoice (Acontofaktura) |
      2d101b6e-74f9-4a4d-9f8e-c7abe2264da0 |

      | Loan (Gældsbrev) | bf61f462-6d3c-42e8-a99a-852d4a664926 |


      ### Costs:

      | Type | id |

      | --- | --- |

      | Collection cost (Inkassoomkostning) |
      07960de4-303d-4793-92da-3a8cfd5da1a1 |

      | Collection fee (Inkassogebyr) | 4c3ccbbf-0651-45b2-b37b-4fe736acfd7e |

      | Reminder fee (Rykkergebyr) | 3e51bf87-3c8f-4dd5-abd5-69417d113c89 |

      | Compensation cost (Kompensationsgebyr) |
      ed3e3d61-e1bc-4ee2-9166-adf2c41a2bbf |


      ### Interests:

      | Type | id |

      | --- | --- |

      | DK interest (Procesrente) | ca4af363-9925-436c-83d6-23b3db6ed5d2 |

      | Fixed interest (Fastrente) | 299dc393-1b71-4950-860f-8fb485036722 |

      | Yearly interest (Årlig rente) | 37db68dd-80be-40c7-8d2d-3619c793107f |


      ### Transactions:

      | Type | id |

      | --- | --- |

      | Deposit (Indbetaling) | c51f2f6a-8081-45ef-b52d-5e0569fdf12e |


      Your debt collection partner may also have defined custom voucher types.
      If you need a type that is not listed here, please reach out to them.
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/customers/{customerId}/add-case-vouchers:
    post:
      tags:
        - Customers
      summary: Add case vouchers
      description: >-
        Add new case vouchers (e.g. unpaid invoices, reminder fees or deposits)
        to a customer. Based on the vouchers, the platform automatically
        determines whether to create a new case or add the vouchers to an
        existing case.
      operationId: add-case-vouchers-to-customer
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: >-
            Id of your debt collection partner's tenant. You can find it on the
            API page in the creditor portal.
        - in: path
          name: customerId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the customer
      requestBody:
        description: List of new case vouchers
        content:
          application/json:
            schema:
              type: object
              properties:
                caseVouchers:
                  type: array
                  items:
                    $ref: '#/components/schemas/NewCaseVoucher'
              required:
                - caseVouchers
            example:
              caseVouchers:
                - currency: DKK
                  amount: -100000
                  referenceId: D12412347
                  text: J.no. 1234
                  date: '2024-05-28 00:00:00.000+01'
                  dueDate: '2024-06-11 00:00:00.000+01'
                  source: CREDITOR
                  voucherTypeId: eb41e58e-fccf-419d-a771-cd5027fe6e87
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CaseVoucherAddedToCustomer'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    NewCaseVoucher:
      type: object
      properties:
        voucherTypeId:
          type: string
          format: uuid
          description: >-
            An id for the voucher type. A list of ids can be found on the
            Voucher types page.
        amount:
          type: integer
          description: >-
            Amount in base currency. For example 1.00 should be sent as 100. A
            negative amount (e.g. -100) represents a debt, while a positive
            amount (e.g. +100) represents a credit note or deposit.
        referenceId:
          type: string
        currency:
          $ref: '#/components/schemas/Currency'
        interest:
          type: number
          description: >-
            Used when the voucher is accumulating interest to specify the
            interest rate (yearly interest and compound interest). The number is
            in decimal, for example 0.1 would be an interest rate of 10%.
        date:
          type: string
        interestStartDate:
          type: string
        interestEndDate:
          type: string
        dueDate:
          type: string
        appendix:
          $ref: '#/components/schemas/File'
          description: The appendix is for pdf copies or similar for a case voucher.
        source:
          $ref: '#/components/schemas/CaseVoucherSource'
        uniqueId:
          type: string
          description: >-
            A unique id, that can be used to prevent creating the same case
            voucher twice. This id is unique at the tenant level, meaning that
            no two case vouchers can have the same unique id on the same tenant.
        referenceCaseVoucherId:
          type: string
          format: uuid
          description: The id of the voucher that this voucher is a child of.
        referenceVouchers:
          type: array
          items:
            $ref: '#/components/schemas/NewCaseVoucher'
        text:
          type: string
          description: >-
            Free text shown on the case voucher, for example a journal number or
            a short description.
      required:
        - voucherTypeId
        - amount
        - date
        - source
        - currency
    CaseVoucherAddedToCustomer:
      type: object
      properties:
        merged:
          type: boolean
          description: Whether the new case voucher was merged with an existing one
        caseId:
          type: string
          format: uuid
          description: Id of the case that the case voucher is added to
        caseVoucherId:
          type: string
          format: uuid
          description: Id of the case new case voucher
    Currency:
      type: string
      enum:
        - DKK
        - SEK
        - NOK
        - USD
        - EUR
        - GBP
        - CHF
      description: Currency
    File:
      type: object
      properties:
        fileName:
          type: string
        contentType:
          type: string
        fileId:
          type: string
          format: uuid
      required:
        - fileName
        - contentType
        - fileId
    CaseVoucherSource:
      type: string
      enum:
        - CREDITOR
        - COLLECTOR
      description: >-
        The source of the case voucher. "CREDITOR" if the case voucher is
        imposed by the creditor (typically from an ERP system). "COLLECTOR" if
        the case voucher is imposed by collector (debt collection agency). If it
        is a deposit it is a direct payment if set to "CREDITOR".
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication with an API key can be done by using a bearer token in
        the Authorization header. This is done using the following format
        `Authorization: Bearer {token}`. API keys are issued and revoked
        directly from the creditor portal under Developers > API.

````