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

# Get invoices

> Get a paginated list of invoices.



## OpenAPI

````yaml get /v1/invoice
openapi: 3.0.0
info:
  title: ibana public api
  description: Public API for ibana
  version: 1.0.0
  contact:
    name: ibana
    url: https://ibana.io
    email: dev@ibana.io
servers:
  - url: http://localhost:3001
security: []
tags: []
paths:
  /v1/invoice:
    get:
      tags:
        - Invoice
      summary: Get invoices
      description: Get a paginated list of invoices.
      operationId: InvoiceController_getInvoices_v1
      parameters:
        - name: searchTerm
          required: false
          in: query
          description: The search term to look for in the invoice list.
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Filter invoices by status.
          schema:
            type: string
        - name: counterpartyIds
          required: false
          in: query
          description: Filter invoices by their counterparty ids.
          schema:
            type: string
        - name: taxRegistrationIds
          required: false
          in: query
          description: Filter invoices by their tax registration ids.
          schema:
            type: string
        - name: excludeId
          required: false
          in: query
          description: Exclude an invoice from the search.
          schema:
            type: string
        - name: exportId
          required: false
          in: query
          description: Filter invoices by export ID.
          schema:
            type: string
        - name: exportable
          required: false
          in: query
          description: >-
            Filter for exportable invoices (approved, not archived, not
            exported).
          schema:
            type: string
        - name: dateFrom
          required: false
          in: query
          description: Filter invoices dates from
          schema:
            type: string
        - name: dateTo
          required: false
          in: query
          description: Filter invoices dates to
          schema:
            type: string
        - name: dateField
          required: false
          in: query
          description: >-
            Date field to use for date filtering (invoice date or due/payment
            date).
          schema:
            default: invoice_date
            type: string
            enum:
              - invoice_date
              - due_payment_date
        - name: dueFrom
          required: false
          in: query
          description: Filter invoices due date from
          schema:
            type: string
        - name: dueTo
          required: false
          in: query
          description: Filter invoices due date to
          schema:
            type: string
        - name: skontoFrom
          required: false
          in: query
          description: Filter invoices skonto date from
          schema:
            type: string
        - name: skontoTo
          required: false
          in: query
          description: Filter invoices skonto date to
          schema:
            type: string
        - name: createdFrom
          required: false
          in: query
          description: Filter invoices created at from
          schema:
            type: string
        - name: createdTo
          required: false
          in: query
          description: Filter invoices created at to
          schema:
            type: string
        - name: updatedFrom
          required: false
          in: query
          description: Filter invoices updated at from
          schema:
            type: string
        - name: updatedTo
          required: false
          in: query
          description: Filter invoices updated at to
          schema:
            type: string
        - name: costCenter1Ids
          required: false
          in: query
          description: Filter invoices by their cost center 1 ids.
          schema:
            type: string
        - name: costCenter2Ids
          required: false
          in: query
          description: Filter invoices by their cost center 2 ids.
          schema:
            type: string
        - name: costCenter3Ids
          required: false
          in: query
          description: Filter invoices by their cost center 3 ids.
          schema:
            type: string
        - name: costCenter4Ids
          required: false
          in: query
          description: Filter invoices by their cost center 4 ids.
          schema:
            type: string
        - name: ledgerAccountIds
          required: false
          in: query
          description: Filter invoices by their ledger accounts ids.
          schema:
            type: string
        - name: approvalRequesterIds
          required: false
          in: query
          description: Filter invoices by their approval requester (user).
          schema:
            type: string
        - name: paymentCardIds
          required: false
          in: query
          description: Filter invoices by their payment card ids.
          schema:
            type: string
        - name: currentApproverIds
          required: false
          in: query
          description: Filter invoices by their current approvers (user).
          schema:
            type: string
        - name: invoiceTypes
          required: false
          in: query
          description: Filter invoices by type (invoice, credit note).
          schema:
            type: string
        - name: transactionStatus
          required: false
          in: query
          description: Filter invoices by their transaction status.
          schema:
            type: string
        - name: paymentMethodTypes
          required: false
          in: query
          description: Filter invoices by their payment method types.
          schema:
            type: string
        - name: excludeMatchedToCardTransaction
          required: false
          in: query
          description: Exclude invoices matched to card transactions.
          schema:
            type: string
        - name: recurrenceFilters
          required: false
          in: query
          description: Filter invoices by recurring status.
          schema:
            type: string
            enum:
              - RECURRING
        - name: orderField
          required: false
          in: query
          description: Specify the field you want to order by.
          schema:
            type: string
        - name: orderDir
          required: false
          in: query
          description: Choose between ascending and descending order.
          schema:
            type: string
        - name: order
          required: false
          in: query
          description: Choose between ascending and descending order.
          schema:
            default: ASC
            type: string
            enum:
              - ASC
              - DESC
        - name: page
          required: false
          in: query
          description: Specify the number of the page you want to retrieve.
          schema:
            minimum: 1
            default: 1
            type: number
        - name: take
          required: false
          in: query
          description: Specify the number of items you want to retrieve per page.
          schema:
            minimum: 1
            maximum: 100
            default: 10
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PageDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/InvoiceResponseDto'
      security:
        - bearer: []
components:
  schemas:
    PageDto:
      type: object
      properties:
        data:
          description: Paginated items.
          type: array
          items:
            type: object
        meta:
          description: Additional information about the page.
          allOf:
            - $ref: '#/components/schemas/PageMetaDto'
      required:
        - data
        - meta
    InvoiceResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        originalFileName:
          type: string
          description: Original name of the uploaded invoice file.
        filename:
          type: string
          description: Stored filename of the invoice document.
        fileUrl:
          type: string
          description: >-
            Signed URL to access the invoice file from Google Cloud Storage.
            Valid for 7 days.
        counterpartyName:
          type: string
          description: Name of the counterparty extracted from OCR scan.
        counterpartyIban:
          type: string
          description: IBAN of the counterparty extracted from OCR scan.
        counterpartyVat:
          type: string
          description: VAT number of the counterparty extracted from OCR scan.
        counterparty:
          description: The counterparty of the invoice.
          allOf:
            - $ref: '#/components/schemas/ShallowCounterpartyResponseDto'
        invoiceNumber:
          type: string
          description: Unique identifier or number of the invoice.
        internalInvoiceNumber:
          type: string
          description: Internal unique invoice number (YYYY-MM-XXXXX).
        purchaseOrderNumber:
          type: string
          description: Purchase order number associated with the invoice.
        purchaseOrder:
          description: The matched purchase order for procurement workflow.
          allOf:
            - $ref: '#/components/schemas/PurchaseOrderResponseDto'
        taxRegistration:
          nullable: true
          description: Optional tax registration used as invoice tax jurisdiction.
          type: object
          allOf:
            - $ref: '#/components/schemas/TaxRegistrationResponseDto'
        recommendedPurchaseOrder:
          type: object
          description: Top recommendation candidate for invoice-to-purchase-order matching.
        hasPurchaseOrderRecommendation:
          type: boolean
          description: >-
            Whether a purchase order recommendation is available for this
            invoice.
        date:
          type: string
          description: Issuance date of the invoice.
        billingPeriodStart:
          type: string
          description: Start date of the billing period.
        billingPeriodEnd:
          type: string
          description: End date of the billing period.
        bookingPeriodOverride:
          type: string
          description: >-
            Optional override for the booking period used in accounting exports
            (BMD, IBANA). Only year and month are significant.
        dueDate:
          type: string
          description: Due date for invoice payment.
        skontoDate:
          type: string
          description: Deadline for skonto (early payment discount) eligibility.
        skontoAmount:
          type: number
          description: Discount amount offered for early payment within skonto terms.
        skontoRate:
          type: number
          description: Percentage rate of the skonto discount.
        totalAmount:
          type: number
          description: Total amount due for the invoice.
        currency:
          type: string
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
          default: EUR
          description: Currency code for invoice amounts (e.g., EUR, USD).
        fxRate:
          type: number
          description: Foreign exchange rate used for conversion to base currency.
        fxRateSource:
          type: string
          enum:
            - DAILY
            - MANUAL
            - CARD_TRANSACTION
          description: Source of the currently active FX rate.
        originalFxRate:
          type: number
          nullable: true
          description: FX rate before card-transaction override.
        originalFxRateSource:
          type: string
          nullable: true
          enum:
            - DAILY
            - MANUAL
            - CARD_TRANSACTION
          description: Source of the FX rate before card-transaction override.
        baseCurrency:
          type: string
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
          default: EUR
          description: Base currency for the organization (typically EUR).
        type:
          type: string
          enum:
            - INVOICE
            - CREDIT_NOTE
            - REMINDER
          default: INVOICE
          description: Type of invoice (e.g., Invoice, Credit Note, Reminder).
        paymentTerms:
          type: string
          description: Payment terms or conditions for the invoice.
        notes:
          type: string
          description: Additional comments or notes on the invoice.
        shouldCreateTransaction:
          type: boolean
          default: true
          description: >-
            Indicates whether a transaction is automatically created upon
            invoice approval.
        alreadyPaid:
          type: boolean
          default: false
          description: Indicates whether the invoice has been paid.
        alreadyPaidDate:
          type: string
          description: Date when the invoice was paid.
        archived:
          type: boolean
          default: false
          description: Indicates whether the invoice is archived.
        archivedDate:
          type: string
          description: Date when the invoice was archived.
        archivedByUser:
          description: User who archived the invoice.
          allOf:
            - $ref: '#/components/schemas/ShallowUserResponseDto'
        organization:
          description: Organization associated with the invoice.
          allOf:
            - $ref: '#/components/schemas/OrganizationResponseDto'
        status:
          type: string
          enum:
            - NEW
            - REJECTED
            - APPROVED
            - IN_PROGRESS
            - CANCELLED
          default: NEW
          description: Current status of the invoice (e.g., New, Approved, Declined).
        debitor:
          description: Debitor bank account associated with the invoice.
          allOf:
            - $ref: '#/components/schemas/BankAccountResponseDto'
        export:
          description: Details of the invoice export, if exported.
          allOf:
            - $ref: '#/components/schemas/ShallowInvoiceExportResponseDto'
        splits:
          description: >-
            Splits detailing the invoice breakdown, such as tax rates, or
            subtotals.
          type: array
          items:
            $ref: '#/components/schemas/InvoiceSplitResponseDto'
        lineItems:
          description: ''
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItemResponseDto'
        recurrence:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/InvoiceRecurrenceResponseDto'
        sourceRecurrence:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/InvoiceRecurrenceResponseDto'
        recurrenceSequence:
          type: number
          nullable: true
        generatedForDate:
          type: string
          nullable: true
      required:
        - currency
        - baseCurrency
        - type
        - shouldCreateTransaction
        - alreadyPaid
        - archived
        - organization
        - status
    PageMetaDto:
      type: object
      properties:
        page:
          type: number
          description: Specify the number of the page you want to retrieve.
        take:
          type: number
          description: Specify the number of items you want to retrieve per page.
        itemCount:
          type: number
          description: Total number of items.
        pageCount:
          type: number
          description: Total number of pages.
        hasPreviousPage:
          type: boolean
          description: Whether there is a previous page.
        hasNextPage:
          type: boolean
          description: Whether there is a next page.
      required:
        - page
        - take
        - itemCount
        - pageCount
        - hasPreviousPage
        - hasNextPage
    ShallowCounterpartyResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        email:
          type: string
          description: The email of the counterparty.
        description:
          type: string
          description: The description of the counterparty.
        vat:
          type: string
          description: The EU VAT number of the counterparty.
        accountsPayableNumber:
          type: string
          example: 22 0391919
          description: Accounts payable number of the counterparty. Used in bookkeeping.
        paymentTermsDays:
          type: number
          description: Payment term in days
        skontoPercentage:
          type: number
          description: Early payment discount percentage
        skontoDays:
          type: number
          description: Days for early payment discount
        bankAccount:
          description: The bank account of the counterparty.
          allOf:
            - $ref: '#/components/schemas/BankAccountResponseDto'
      required:
        - email
        - description
        - vat
        - accountsPayableNumber
        - paymentTermsDays
        - skontoPercentage
        - skontoDays
        - bankAccount
    PurchaseOrderResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        purchaseOrderNumber:
          type: string
          description: The unique number of the purchase order.
        externalId:
          type: string
          description: The external ID of the purchase order.
        orderDate:
          format: date-time
          type: string
          description: The date of the purchase order.
        deliveryDate:
          format: date-time
          type: string
          description: The date of the delivery of the purchase order.
        counterparty:
          description: The counterparty of the purchase order.
          allOf:
            - $ref: '#/components/schemas/CounterpartyResponseDto'
        lineItems:
          description: The line items of the purchase order.
          type: array
          items:
            $ref: '#/components/schemas/PurchaseOrderLineItemResponseDto'
        currency:
          type: string
          description: The currency of the purchase order
        counterpartyId:
          type: string
          description: The counterparty ID
        counterpartyName:
          type: string
          description: The counterparty name
        totalOrderAmount:
          type: number
          description: Total monetary amount of the purchase order
        totalInvoicedAmount:
          type: number
          description: Total monetary amount invoiced for this purchase order
        totalLineItems:
          type: number
          description: Total number of line items in the purchase order
        fullyInvoicedLineItemsCount:
          type: number
          description: Number of line items that are fully invoiced (quantity-wise)
        fullyDeliveredLineItemsCount:
          type: number
          description: Number of line items that are fully delivered (quantity-wise)
        invoiceCompletionPercentage:
          type: number
          description: Percentage of order amount that has been invoiced (monetary)
        totalOrderQuantity:
          type: number
          description: Total quantity ordered across all line items
        totalDeliveredQuantity:
          type: number
          description: Total quantity delivered across all line items
        uniqueDeliveriesCount:
          type: number
          description: Number of unique deliveries for this purchase order
        totalInvoicedQuantity:
          type: number
          description: Total quantity invoiced across all line items
        uniqueInvoicesCount:
          type: number
          description: Number of unique invoices for this purchase order
        outstandingInvoiceAmount:
          type: number
          description: Monetary amount still pending invoicing
      required:
        - currency
        - counterpartyId
        - counterpartyName
        - totalOrderAmount
        - totalInvoicedAmount
        - totalLineItems
        - fullyInvoicedLineItemsCount
        - fullyDeliveredLineItemsCount
        - invoiceCompletionPercentage
        - totalOrderQuantity
        - totalDeliveredQuantity
        - uniqueDeliveriesCount
        - totalInvoicedQuantity
        - uniqueInvoicesCount
        - outstandingInvoiceAmount
    TaxRegistrationResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        name:
          type: string
        country:
          type: string
        currency:
          type: string
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
        code:
          type: string
          nullable: true
        uid:
          type: string
          nullable: true
        deletedAt:
          format: date-time
          type: string
          nullable: true
      required:
        - name
        - country
        - currency
    ShallowUserResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        email:
          type: string
          description: The email of the user.
        name:
          type: string
          description: The name of the user.
        authId:
          type: string
          description: The workOs authentication id of the user.
        role:
          type: string
          description: The role the user has in the organization.
        hasPushNotification:
          type: boolean
          description: >-
            A boolean that determines if the user has push notifications
            enabled.
      required:
        - email
        - name
        - authId
        - role
        - hasPushNotification
    OrganizationResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        name:
          type: string
          description: The name of the organization.
        slug:
          type: string
          description: The slug of the organization.
        inCaseOfLawCustomerId:
          type: string
          description: >-
            The In case of law customer ID for this organization, if already
            connected.
          nullable: true
        logoFileName:
          type: string
          description: The logo file name.
        country:
          type: string
          description: The country of the organization using ISO 3166-1 alpha-2 code
        vatNumber:
          type: string
          description: The VAT number of the organization
        featureFlags:
          description: The feature flags associated with the organization.
          type: array
          items:
            $ref: '#/components/schemas/FeatureFlagResponseDto'
        baseCurrency:
          type: string
          description: The base currency of the organization
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
          default: EUR
        paymentRunBatchBooking:
          type: boolean
          description: >-
            Default setting for whether payment runs should be exported as batch
            booking or single bookings.
        paymentRunVerificationOfPayee:
          type: boolean
          description: >-
            Default setting for whether the bank should perform verification of
            payee (IBAN-Name check) for payment runs.
        invoiceExportIncludeForeignCurrencies:
          type: boolean
          description: >-
            When true, invoice exports include original currency/amounts; when
            false, exports use EUR only (foreign amounts converted).
        allowDirectInvoiceApproval:
          type: boolean
          description: >-
            Whether direct approval is allowed for invoice approval workflows in
            this organization.
        allowDirectPaymentRunApproval:
          type: boolean
          description: >-
            Whether direct approval is allowed for payment run approval
            workflows in this organization.
        cardCommonBookingTargetName:
          type: string
          description: >-
            Configured shared card booking target display name used for card
            bookkeeping export.
          nullable: true
        cardCommonBookingTargetAccountsPayableNumber:
          type: string
          description: >-
            Configured shared card booking target accounts payable number used
            for card bookkeeping export.
          nullable: true
        cardFxDifferenceLedgerAccount:
          type: string
          description: >-
            Configured ledger account used for FX difference lines in card
            bookkeeping export.
          nullable: true
        customExportFormats:
          description: Custom export formats enabled for this organization
          example:
            - custom_experta
          type: array
          items:
            type: string
        autoPopulateCustomerEmailFromMetadata:
          type: boolean
          description: >-
            Determines if the organization automatically populates customer
            email addresses from email metadata for AR invoices.
        autoPopulateSupplierEmailFromMetadata:
          type: boolean
          description: >-
            Determines if the organization automatically populates supplier
            email addresses from email metadata for AP invoices.
        excludedEmailDomains:
          type: string
          description: >-
            Comma-separated list of email domains that should be excluded from
            auto-population.
      required:
        - name
        - slug
        - logoFileName
        - country
        - vatNumber
        - featureFlags
        - baseCurrency
        - paymentRunBatchBooking
        - paymentRunVerificationOfPayee
        - invoiceExportIncludeForeignCurrencies
        - allowDirectInvoiceApproval
        - allowDirectPaymentRunApproval
        - customExportFormats
        - autoPopulateCustomerEmailFromMetadata
        - autoPopulateSupplierEmailFromMetadata
        - excludedEmailDomains
    BankAccountResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        name:
          type: string
          description: The name of the bank account holder.
        iban:
          type: string
          description: The IBAN of the bank account.
        bic:
          type: string
          description: The BIC of the bank account.
        countryCode:
          type: string
          description: The country code of the bank account.
        address:
          type: string
          description: The address of the bank account holder.
      required:
        - name
        - iban
        - bic
        - countryCode
        - address
    ShallowInvoiceExportResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        invoiceCount:
          type: number
          description: Count of the exported invoices
      required:
        - invoiceCount
    InvoiceSplitResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        partialAmount:
          type: number
          description: The partial amount for this line item.
        taxRate:
          type: number
          description: The tax rate applicable to this line item.
        taxCode:
          description: The tax code associated with this line item.
          allOf:
            - $ref: '#/components/schemas/TaxCodeResponseDto'
        taxKey:
          description: Deprecated legacy tax key object. Use taxCode instead.
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/DeprecatedTaxKeyResponseDto'
        notes:
          type: string
          description: Any additional notes or details for this line item.
        costCenter:
          description: The primary cost center associated with this line item.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        costCenter2:
          description: An optional secondary cost center associated with this line item.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        costCenter3:
          description: An optional tertiary cost center associated with this line item.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        costCenter4:
          description: An optional quaternary cost center associated with this line item.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        ledgerAccount:
          description: The ledger account associated with this line item.
          allOf:
            - $ref: '#/components/schemas/LedgerAccountResponseDto'
    InvoiceLineItemResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        productCode:
          type: number
          description: >-
            Unique identifier or code for the product or service in this line
            item.
        externalId:
          type: string
          description: External identifier for this line item from the source system.
        title:
          type: string
          description: Brief title or name of the product or service in this line item.
        summary:
          type: string
          description: Short semantic summary of what this line item represents.
        description:
          type: string
          description: >-
            Detailed description of the product, service, or purpose of this
            line item.
        quantity:
          type: number
          description: Number of units for this line item.
        unit:
          type: number
          description: >-
            Unit of measure for this line item (e.g., "pcs", "kg", "discount"
            for discounts).
        unitPrice:
          type: number
          description: >-
            Price per unit for this line item (net amount, excluding tax), in
            the invoice currency.
        pricePerQuantity:
          type: number
          description: >-
            Pricing basis for the displayed unit price, e.g. 100 for "1.84 per
            100".
        totalPrice:
          type: number
          description: >-
            Total price for this line item (net amount, excluding tax).
            Calculated as quantity / pricePerQuantity * unitPrice, in the
            invoice currency.
        discount:
          type: number
          description: >-
            Discount amount for this line item, in the invoice currency
            (negative for discounts).
        taxRate:
          type: number
          description: Tax rate applied to this line item, in percent.
        taxAmount:
          type: number
          description: Total tax amount for this line item, in the invoice currency.
        purchaseOrderLineItem:
          description: The matched purchase order line item for procurement workflow.
          allOf:
            - $ref: '#/components/schemas/PurchaseOrderLineItemResponseDto'
        costCenter1:
          description: The cost center 1 (KOST1) for accounting.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        costCenter2:
          description: The cost center 2 (KOST2) for accounting.
          allOf:
            - $ref: '#/components/schemas/CostCenterResponseDto'
        ledgerAccount:
          description: The ledger account for accounting.
          allOf:
            - $ref: '#/components/schemas/LedgerAccountResponseDto'
        taxCode:
          description: The tax code for accounting.
          allOf:
            - $ref: '#/components/schemas/TaxCodeResponseDto'
        taxKey:
          description: Deprecated legacy tax key object. Use taxCode instead.
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/DeprecatedTaxKeyResponseDto'
    InvoiceRecurrenceResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        intervalMonths:
          type: number
        endMode:
          type: string
          enum:
            - AFTER_OCCURRENCES
            - UNTIL_DATE
        occurrenceCount:
          type: number
          nullable: true
        validUntil:
          type: string
          nullable: true
        autoApprove:
          type: boolean
        active:
          type: boolean
        stoppedAt:
          type: string
          nullable: true
        lastGeneratedAt:
          type: string
          nullable: true
        generatedInvoicesCount:
          type: number
          nullable: true
        latestGeneratedForDate:
          type: string
          nullable: true
        sourceInvoice:
          $ref: '#/components/schemas/InvoiceRecurrenceSourceInvoiceResponseDto'
        generatedInvoices:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceRecurrenceGeneratedInvoiceResponseDto'
      required:
        - intervalMonths
        - endMode
        - autoApprove
        - active
    CounterpartyResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        email:
          type: string
          description: The email of the counterparty.
        name:
          type: string
          description: The name of the counterparty.
        description:
          type: string
          description: The description of the counterparty.
        vat:
          type: string
          description: The EU VAT number of the counterparty.
        accountsPayableNumber:
          type: string
          example: 22 0391919
          description: Accounts payable number of the counterparty. Used in bookkeeping.
        accountsPayableMode:
          type: string
          enum:
            - AUTO
            - MANUAL
            - NONE
          description: How accounts payable number is managed for this counterparty.
        street:
          type: string
          description: Street name and number of the counterparty.
        city:
          type: string
          description: City of the counterparty.
        zip:
          type: string
          description: ZIP or postal code of the counterparty.
        country:
          type: string
          description: Country of the counterparty using ISO 3166-1 alpha-2 code.
        paymentTermsDays:
          type: number
          description: Payment term in days
        skontoPercentage:
          type: number
          description: Early payment discount percentage
        skontoDays:
          type: number
          description: Days for early payment discount
        organization:
          description: The organization of the counterparty.
          allOf:
            - $ref: '#/components/schemas/OrganizationResponseDto'
        bankAccount:
          description: The bank account of the counterparty.
          allOf:
            - $ref: '#/components/schemas/BankAccountResponseDto'
        transactions:
          description: The transactions of the counterparty.
          allOf:
            - $ref: '#/components/schemas/TransactionResponseDto'
        cardBookingPreference:
          type: string
          enum:
            - INVOICE_COUNTERPARTY
            - ORG_CARD_COMMON
          description: >-
            Default booking preference for card-paid invoices of this
            counterparty.
        apBalance:
          description: Derived AP balance for this counterparty.
          allOf:
            - $ref: '#/components/schemas/CounterpartyApBalanceResponseDto'
      required:
        - email
        - name
        - description
        - vat
        - accountsPayableNumber
        - accountsPayableMode
        - street
        - city
        - zip
        - country
        - paymentTermsDays
        - skontoPercentage
        - skontoDays
        - organization
        - bankAccount
        - transactions
        - cardBookingPreference
    PurchaseOrderLineItemResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        productCode:
          type: number
          description: >-
            Unique identifier or code for the product or service in this line
            item.
        externalId:
          type: string
          description: External identifier for this line item from the source system.
        title:
          type: string
          description: Brief title or name of the product or service in this line item.
        summary:
          type: string
          description: Short semantic summary of what this line item represents.
        description:
          type: string
          description: >-
            Detailed description of the product, service, or purpose of this
            line item.
        quantity:
          type: number
          description: Number of units for this line item.
        unit:
          type: number
          description: >-
            Unit of measure for this line item (e.g., "pcs", "kg", "discount"
            for discounts).
        unitPrice:
          type: number
          description: >-
            Price per unit for this line item (net amount, excluding tax), in
            the invoice currency.
        pricePerQuantity:
          type: number
          description: >-
            Pricing basis for the displayed unit price, e.g. 100 for "1.84 per
            100".
        totalPrice:
          type: number
          description: >-
            Total price for this line item (net amount, excluding tax).
            Calculated as quantity / pricePerQuantity * unitPrice, in the
            invoice currency.
        discount:
          type: number
          description: >-
            Discount amount for this line item, in the invoice currency
            (negative for discounts).
        taxRate:
          type: number
          description: Tax rate applied to this line item, in percent.
        taxAmount:
          type: number
          description: Total tax amount for this line item, in the invoice currency.
        deliveredQuantity:
          type: number
          description: Total quantity delivered for this line item
        invoicedQuantity:
          type: number
          description: Total quantity invoiced for this line item
        invoicedTotalAmount:
          type: number
          description: Total amount invoiced for this line item
        deliveryPercentage:
          type: number
          description: Percentage of ordered quantity that has been delivered
        invoicedPercentage:
          type: number
          description: Percentage of ordered quantity that has been invoiced
    FeatureFlagResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        featureName:
          type: string
          description: The name of the feature.
        isEnabled:
          type: boolean
          description: A boolean that indicates if the feature is enabled.
      required:
        - featureName
        - isEnabled
    TaxCodeResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        name:
          type: string
        description:
          type: string
        country:
          type: string
          nullable: true
        externalCode:
          type: string
        treatment:
          type: string
          enum:
            - STANDARD
            - REDUCED
            - EXEMPT
            - ZERO_RATED
            - OUT_OF_SCOPE
            - REVERSE_CHARGE
            - IG_ERWERB
            - IMPORT_VAT
            - OTHER
        operation:
          type: string
          enum:
            - PURCHASE
            - SALE
            - BOTH
        rate:
          type: number
        isActive:
          type: boolean
        isCustom:
          type: boolean
        sortOrder:
          type: number
      required:
        - name
        - treatment
        - operation
        - rate
        - isActive
        - isCustom
        - sortOrder
    DeprecatedTaxKeyResponseDto:
      type: object
      properties:
        id:
          type: string
          deprecated: true
        type:
          type: string
          enum:
            - PURCHASE
            - SALE
            - BOTH
          deprecated: true
        name:
          type: string
          deprecated: true
        description:
          type: string
          deprecated: true
        internalTaxKeyName:
          type: string
          deprecated: true
        externalCode:
          type: string
          deprecated: true
        isSystemKey:
          type: boolean
          deprecated: true
      required:
        - id
        - type
        - name
        - isSystemKey
    CostCenterResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        code:
          type: string
          description: Code of the cost center
        name:
          type: string
          description: Name of the cost center
        type:
          type: string
          description: Type of the cost center (KOST 1, KOST 2)
      required:
        - code
        - name
        - type
    LedgerAccountResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        accountNumber:
          type: string
          description: Account number of the ledger account
        name:
          type: string
          description: Name of the ledger account
      required:
        - accountNumber
        - name
    InvoiceRecurrenceSourceInvoiceResponseDto:
      type: object
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        internalInvoiceNumber:
          type: string
      required:
        - id
    InvoiceRecurrenceGeneratedInvoiceResponseDto:
      type: object
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        internalInvoiceNumber:
          type: string
        status:
          type: string
          nullable: true
        recurrenceSequence:
          type: number
          nullable: true
        generatedForDate:
          type: string
          nullable: true
        date:
          type: string
          nullable: true
      required:
        - id
    TransactionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        amount:
          type: number
          description: The amount of the transaction.
        remittanceInformation:
          type: string
          description: The remittance information of the transaction.
        requestedExecutionDate:
          format: date-time
          type: string
          description: The requested execution date of the transaction.
        skontoAmount:
          type: number
          description: The amount of the skonto.
        skontoDate:
          format: date-time
          type: string
          description: The date of the skonto.
        ignoreSkontoDeadline:
          type: boolean
          description: Determines if the skonto deadline should be ignored.
        express:
          type: boolean
          description: >-
            Determines if the transaction should be processed as an instant or
            urgent payment.
        currency:
          type: string
          nullable: false
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
          description: The currency of the transaction.
        creditor:
          description: The creditor of the transaction.
          allOf:
            - $ref: '#/components/schemas/BankAccountResponseDto'
        debitor:
          description: The debitor of the transaction.
          allOf:
            - $ref: '#/components/schemas/BankAccountResponseDto'
        analysis:
          description: The analysis of the transaction.
          allOf:
            - $ref: '#/components/schemas/AnalysisResponseDto'
        archived:
          type: boolean
          description: Determines if the transaction has been archived.
        archivedDate:
          format: date-time
          type: string
          description: The date and time the transaction was archived.
        archivedByUser:
          description: The user that archived the transaction.
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
        paymentRun:
          description: The payment run the transaction is assigned to
          allOf:
            - $ref: '#/components/schemas/PaymentRunResponseDto'
        counterparty:
          description: The counterparty of the transaction.
          allOf:
            - $ref: '#/components/schemas/CounterpartyResponseDto'
        invoice:
          description: The invoice associated with the transaction.
          allOf:
            - $ref: '#/components/schemas/TransactionInvoiceInfoDto'
    CounterpartyApBalanceResponseDto:
      type: object
      properties:
        openInvoiceAmount:
          type: number
        approvedOpenCreditNoteAmount:
          type: number
        manualCreditAmount:
          type: number
        totalAvailableCredit:
          type: number
        netPayableAmount:
          type: number
        remainingCreditBalance:
          type: number
        scheduledBankTransferAmount:
          type: number
        remainingToScheduleAmount:
          type: number
        unapprovedCreditNoteAmount:
          type: number
        appliedInvoiceCreditAmount:
          type: number
        balancesByCurrency:
          type: array
          items:
            $ref: '#/components/schemas/CounterpartyApBalanceCurrencyResponseDto'
      required:
        - openInvoiceAmount
        - approvedOpenCreditNoteAmount
        - manualCreditAmount
        - totalAvailableCredit
        - netPayableAmount
        - remainingCreditBalance
        - scheduledBankTransferAmount
        - remainingToScheduleAmount
        - unapprovedCreditNoteAmount
        - appliedInvoiceCreditAmount
    AnalysisResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        analysisRules:
          description: The analysis rules of the transaction.
          allOf:
            - $ref: '#/components/schemas/AnalysisRuleResponseDto'
      required:
        - analysisRules
    UserResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        email:
          type: string
          description: The email of the user.
        name:
          type: string
          description: The name of the user.
        authId:
          type: string
          description: The workOs authentication id of the user.
        role:
          type: string
          description: The role the user has in the organization.
        hasPushNotification:
          type: boolean
          description: >-
            A boolean that determines if the user has push notifications
            enabled.
        featureFlags:
          type: array
          description: The feature flags available to the user.
          items:
            type: string
            enum:
              - invoice
              - ar-invoice
              - transaction
              - candis
              - bank-transaction
              - webhook
              - procurement
              - ai-search
              - insights
              - payment-cards
              - in-case-of-law
        organization:
          description: The active organization the user is in.
          allOf:
            - $ref: '#/components/schemas/OrganizationResponseDto'
      required:
        - email
        - name
        - authId
        - role
        - hasPushNotification
        - organization
    PaymentRunResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Id of the payment run
        createdAt:
          format: date-time
          type: string
          description: Creation date of the payment run
        createdById:
          type: string
          description: Id of the user who created the payment run
        createdByName:
          type: string
          description: Name of the user who created the payment run
        organizationId:
          type: string
          description: Id of the orgnaization
        sumAmount:
          type: number
          description: Total amount of all transactions in the payment run
        sumAmountWithSkonto:
          type: number
          description: Total amount of all transactions in the payment run with skonto
        sumBookedAmount:
          type: number
          description: >-
            Total amount of all transactions in the payment run at the time of
            booking
        transactionCount:
          type: number
          description: Count of transactions in the payment run
        batchBooking:
          type: boolean
          description: >-
            Override setting for whether this payment run should be exported as
            batch booking. If null, uses the organization default.
      required:
        - id
        - createdAt
        - createdById
        - createdByName
        - organizationId
        - sumAmount
        - sumAmountWithSkonto
        - sumBookedAmount
        - transactionCount
    TransactionInvoiceInfoDto:
      type: object
      properties:
        id:
          type: string
          description: The id of the invoice.
        invoiceNumber:
          type: string
          description: The invoice number.
        status:
          type: string
          description: The status of the invoice.
        totalAmount:
          type: number
          description: The total amount of the invoice.
        dueDate:
          format: date-time
          type: string
          description: The due date of the invoice.
        invoiceDate:
          format: date-time
          type: string
          description: The date of the invoice.
        currency:
          type: string
          description: The currency of the invoice.
      required:
        - id
        - invoiceNumber
        - status
        - totalAmount
        - dueDate
        - invoiceDate
        - currency
    CounterpartyApBalanceCurrencyResponseDto:
      type: object
      properties:
        currency:
          type: string
          enum:
            - EUR
            - USD
            - GBP
            - JPY
            - AUD
            - CAD
            - CHF
            - CNY
            - HKD
            - NZD
            - SEK
            - KRW
            - SGD
            - NOK
            - MXN
            - INR
            - BRL
            - RUB
            - ZAR
            - TRY
            - AED
            - THB
            - DKK
            - HUF
            - PLN
            - TWD
            - SAR
            - MYR
            - IDR
        approvedOpenCreditNoteAmount:
          type: number
        manualCreditAmount:
          type: number
        totalAvailableCredit:
          type: number
        appliedInvoiceCreditAmount:
          type: number
        remainingCreditBalance:
          type: number
      required:
        - currency
        - approvedOpenCreditNoteAmount
        - manualCreditAmount
        - totalAvailableCredit
        - appliedInvoiceCreditAmount
        - remainingCreditBalance
    AnalysisRuleResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the entity.
        createdAt:
          format: date-time
          type: string
          description: The date and time the entity was created.
        updatedAt:
          format: date-time
          type: string
          description: The date and time the entity was last updated.
        type:
          type: string
          enum:
            - AMOUNT_DEVIATION
            - AMOUNT_DEVIATION_SAME_IBAN
            - AMOUNT_DEVIATION_SAME_COUNTRY
            - SAME_IBAN_DIFFERENT_NAME
            - SAME_NAME_DIFFERENT_IBAN
            - NEW_BANK_ACCOUNT
            - DUPLICATE_INVOICE
            - PAYMENT_REMINDER
          description: The type of the analysis rule.
        severity:
          type: string
          enum:
            - NORMAL
            - INFO
            - WARNING
            - SUSPICIOUS
          description: The severity of the analysis rule.
        markedOk:
          type: boolean
          description: Determines if the transaction was marked as ok by a user.
        markedOkReason:
          type: string
          description: The reason why the transaction was marked as ok.
        markedOkDate:
          format: date-time
          type: string
          description: The date and time the transaction was marked as ok.
        value:
          type: string
          description: 'The value of the analysis rule. '
        markedOkUser:
          description: The user that marked the transaction as ok.
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
      required:
        - type
        - severity
        - markedOk
        - markedOkReason
        - markedOkDate
        - value
        - markedOkUser
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````