openapi: 3.1.0
info:
  title: AbaNinja Documents API - Invoices
  version: 3.0.0
  x-domain-id: documents
servers:
  - url: https://api.abaninja.ch
    description: The AbaNinja API server
tags:
  - name: document-invoices
    description: Manage invoice documents
    x-displayName: Invoices
security:
  - ApiToken: []
paths:
  /accounts/{accountUuid}/documents/v2/invoices:
    get:
      tags:
        - document-invoices
      summary: Get invoices
      description: Get invoices
      operationId: documents_list_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: is_template
          in: query
          description: get templates
          required: false
          schema:
            type: boolean
            default: false
        - name: updatedSince
          in: query
          description: filter for updated items
          required: false
          schema: {}
        - name: limit
          in: query
          description: pagination limit
          required: false
          schema:
            type:
              - number
              - 'null'
            maximum: 400
            minimum: 1
        - name: page
          in: query
          description: pagination page
          required: false
          schema:
            type:
              - number
              - 'null'
            default: 1
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            id:
                              type: number
                              format: int64
                              deprecated: true
                            currencyCode:
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            currencyCodeRecognized:
                              description: >-
                                when importing invoices and detecting the currency, this field contains the detected
                                value
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            title:
                              type:
                                - string
                                - 'null'
                            type:
                              type: string
                              enum:
                                - invoice
                            subtype:
                              type:
                                - string
                                - 'null'
                              enum:
                                - partial
                                - final
                                - on_account
                                - instalment
                                - dunning
                            reference:
                              type: string
                            status:
                              type: string
                              enum:
                                - draft
                                - open
                                - sending
                                - send-failed
                                - sent
                                - viewed
                                - approved
                                - declined
                                - partial
                                - paid
                                - in-payment
                                - collected
                                - planned
                                - pending
                                - archived
                                - cancelled
                                - converted
                                - due
                                - reminder
                                - first-dunning
                                - second-dunning
                                - final-dunning
                                - inactive
                                - active
                                - inbox
                                - expired
                                - done
                                - assign
                                - awaiting-payment
                                - error
                            sentStatus:
                              type: string
                              enum:
                                - OPEN
                                - SENDING
                                - ERROR
                                - SENT
                            customField1:
                              type:
                                - string
                                - 'null'
                            customField2:
                              type:
                                - string
                                - 'null'
                            customField3:
                              type:
                                - string
                                - 'null'
                            customField4:
                              type:
                                - string
                                - 'null'
                            invoiceDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dueDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            receiver:
                              properties:
                                addressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                customerNumber:
                                  type:
                                    - string
                                    - 'null'
                                name:
                                  type:
                                    - string
                                    - 'null'
                                email:
                                  type:
                                    - string
                                    - 'null'
                                  format: email
                                personUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                            documentTotal:
                              type: number
                              format: float
                            nextDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            customDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dunningLevel:
                              type: string
                              enum:
                                - REMINDER
                                - FIRST_DUNNING
                                - FINAL_DUNNING
                                - NO_DUNNING
                            invoiceNumber:
                              description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                              type: string
                              deprecated: true
                            importedInvoiceNumber:
                              description: The recognized invoiceNumber of the imported document
                              type:
                                - string
                                - 'null'
                            systemInvoiceNumber:
                              description: The invoiceNumber generated by AbaNinja
                              type: string
                            isArchived:
                              type: boolean
                            isCancelled:
                              type: boolean
                            isImported:
                              type: boolean
                            openAmount:
                              type: number
                              format: float
                            updatedAt:
                              type: string
                              format: date-time
                            isTemplate:
                              type: boolean
                            number:
                              type: string
                              deprecated: true
                            paymentInstructions:
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                iban:
                                  type: string
                                bic:
                                  type:
                                    - string
                                    - 'null'
                                qrIban:
                                  type: string
                                reference:
                                  type:
                                    - string
                                    - 'null'
                            balance:
                              type: number
                              format: float
                              deprecated: true
                            archived:
                              type: boolean
                              deprecated: true
                            cancelled:
                              type: boolean
                              deprecated: true
                            cashDiscounts:
                              type: array
                              items:
                                properties:
                                  days:
                                    type: number
                                    format: int64
                                  percentage:
                                    type: number
                                    format: float
                                type: object
                              maxItems: 3
                              minItems: 0
                            documentDiscount:
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  type: number
                                  format: float
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: fe69a694d64645f98325550841e6e705
      x-required-scopes:
        - customers
    post:
      tags:
        - document-invoices
      summary: Create invoice
      description: Create invoices
      operationId: documents_create_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create invoices
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/invoice.schema.json
              title: Invoices
              description: A Schema for creating invoices in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      isTemplate:
                        const: true
                      invoiceDate:
                        type: string
                        format: date
                      dueDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      deliveryDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      paymentInstructions:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                        title: Payment Instructions
                        description: Payment Instruction Schema for AbaNinja Invoice Json
                        $defs:
                          ibanInstruction:
                            title: IBAN
                            type: object
                            properties:
                              iban:
                                type: string
                                pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                              bic:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                description: SCOR Reference
                            required:
                              - iban
                            if:
                              properties:
                                iban:
                                  not:
                                    pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                            then:
                              required:
                                - bic
                          qrIbanInstruction:
                            title: QR-IBAN
                            type: object
                            properties:
                              qrIban:
                                type: string
                                pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[0-9]{2,27}$
                                description: QRR Reference
                            required:
                              - qrIban
                          bankAccountReference:
                            title: Bank Account UUID
                            type: object
                            properties:
                              bankAccountUuid:
                                type: string
                                format: uuid
                                description: Identifier of the bank account
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                description: QRR or SCOR Reference
                            required:
                              - bankAccountUuid
                        properties:
                          iban:
                            type: string
                            pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                          bic:
                            type:
                              - 'null'
                              - string
                            pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                          reference:
                            type:
                              - 'null'
                              - string
                            pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                            description: QRR or SCOR Reference
                          qrIban:
                            type: string
                            pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                          bankAccountUuid:
                            type: string
                            format: uuid
                            description: Identifier of the bank account
                        required:
                          - iban
                          - qrIban
                          - bankAccountUuid
                      pricesIncludeVat:
                        type: boolean
                        description: Controls if singlePrice includes vat or not
                      isVariantInvoice:
                        type: boolean
                        default: false
                      documentTotal:
                        type: number
                        description: Total Amount incl. VAT
                      positions:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                          description: Schema for an invoice position item for the AbaNinja API
                          type: object
                          properties:
                            positionNumber:
                              type: integer
                              minimum: 1
                              description: >-
                                Defines order of the position inside position table. 1=first position, 2=second
                                position. Must be a unique value otherwise unexpected sorting can occur
                            uuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: UUID to use. Especially needed for updating positions without re-creating them
                            kind:
                              const: page_break
                            unitUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: >-
                                UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                                "unitCode"
                            unitCode:
                              type:
                                - 'null'
                                - string
                              description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                              default: C62
                              deprecated: true
                            quantity:
                              type:
                                - number
                                - 'null'
                              default: 1
                            singlePrice:
                              type:
                                - number
                                - 'null'
                              description: Defaults to the products price if given. Otherwise 0.00.
                            discount:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                              description: Discount Object Schema for AbaNinja Invoice Json
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                amount:
                                  type: number
                                  minimum: 0
                              required:
                                - percentage
                                - amount
                            vatUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of VAT to use. Takes precedence over "vat"
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                            productUuid: false
                            productNumber:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The productNumber to set. If an existing products number is used, the actual product
                                will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                "unitCode"
                            productDescription:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Required if there is no existing product with the given productNumber or the
                                productNumber is not sent
                            title:
                              type: string
                              maximum: 255
                            text:
                              type: string
                              maximum: 255
                            items:
                              type: array
                              items:
                                properties:
                                  positionNumber:
                                    type: integer
                                    minimum: 1
                                    description: >-
                                      Defines order of the position inside position table. 1=first position, 2=second
                                      position. Must be a unique value otherwise unexpected sorting can occur
                                  kind:
                                    const: product
                                  unitUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: >-
                                      UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                      precedence over "unitCode"
                                  unitCode:
                                    type:
                                      - 'null'
                                      - string
                                    description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                    default: C62
                                    deprecated: true
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    default: 1
                                  singlePrice:
                                    type:
                                      - number
                                      - 'null'
                                    description: Defaults to the products price if given. Otherwise 0.00.
                                  discount:
                                    $schema: https://json-schema.org/draft/2020-12/schema
                                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                    description: Discount Object Schema for AbaNinja Invoice Json
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                      amount:
                                        type: number
                                        minimum: 0
                                    required:
                                      - percentage
                                      - amount
                                  vatUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of VAT to use. Takes precedence over "vat"
                                  vat:
                                    type:
                                      - 'null'
                                      - object
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                        maximum: 100
                                    required:
                                      - percentage
                                  productUuid: false
                                  productNumber:
                                    type:
                                      - string
                                      - 'null'
                                    maxLength: 255
                                    description: >-
                                      The productNumber to set. If an existing products number is used, the actual
                                      product will be linked and its unit will be used. Takes precedence over "unitUuid"
                                      and "unitCode"
                                  productDescription:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Required if there is no existing product with the given productNumber or the
                                      productNumber is not sent
                                required:
                                  - kind
                                  - productUuid
                                  - singlePrice
                                  - productDescription
                              minItems: 1
                              description: Only Items with the same VAT rate are allowed in a group
                            showCollapsed:
                              type: boolean
                              default: true
                          $defs:
                            productPosition:
                              type: object
                              properties:
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            subtitlePosition:
                              type: object
                              properties:
                                kind:
                                  const: subtitle
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - title
                            textPosition:
                              type: object
                              properties:
                                kind:
                                  const: text
                                text:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - text
                            sectionTotalPosition:
                              type: object
                              properties:
                                kind:
                                  const: section_total
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                            dividerPosition:
                              type: object
                              properties:
                                kind:
                                  const: divider
                              required:
                                - kind
                            pageBreakPosition:
                              type: object
                              properties:
                                kind:
                                  const: page_break
                              required:
                                - kind
                            groupPosition:
                              type: object
                              properties:
                                kind:
                                  const: group
                                title:
                                  type: string
                                  maximum: 255
                                items:
                                  type: array
                                  items:
                                    properties:
                                      positionNumber:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          Defines order of the position inside position table. 1=first position,
                                          2=second position. Must be a unique value otherwise unexpected sorting can
                                          occur
                                      kind:
                                        const: product
                                      unitUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: >-
                                          UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                          precedence over "unitCode"
                                      unitCode:
                                        type:
                                          - 'null'
                                          - string
                                        description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                        default: C62
                                        deprecated: true
                                      quantity:
                                        type:
                                          - number
                                          - 'null'
                                        default: 1
                                      singlePrice:
                                        type:
                                          - number
                                          - 'null'
                                        description: Defaults to the products price if given. Otherwise 0.00.
                                      discount:
                                        $schema: https://json-schema.org/draft/2020-12/schema
                                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                        description: Discount Object Schema for AbaNinja Invoice Json
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                          amount:
                                            type: number
                                            minimum: 0
                                        required:
                                          - percentage
                                          - amount
                                      vatUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: UUID of VAT to use. Takes precedence over "vat"
                                      vat:
                                        type:
                                          - 'null'
                                          - object
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                            maximum: 100
                                        required:
                                          - percentage
                                      productUuid: false
                                      productNumber:
                                        type:
                                          - string
                                          - 'null'
                                        maxLength: 255
                                        description: >-
                                          The productNumber to set. If an existing products number is used, the actual
                                          product will be linked and its unit will be used. Takes precedence over
                                          "unitUuid" and "unitCode"
                                      productDescription:
                                        type:
                                          - string
                                          - 'null'
                                        description: >-
                                          Required if there is no existing product with the given productNumber or the
                                          productNumber is not sent
                                    required:
                                      - kind
                                      - productUuid
                                      - singlePrice
                                      - productDescription
                                  minItems: 1
                                  description: Only Items with the same VAT rate are allowed in a group
                                showCollapsed:
                                  type: boolean
                                  default: true
                              required:
                                - kind
                                - title
                                - items
                          required:
                            - kind
                            - productUuid
                            - singlePrice
                            - productDescription
                            - title
                            - text
                            - items
                        minItems: 1
                      cashDiscounts:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json
                          description: Cash Discount Schema for AbaNinja Invoice Json
                          type: object
                          properties:
                            days:
                              type: integer
                              minimum: 1
                              maximum: 60
                              description: Number of days
                            percentage:
                              type: number
                              minimum: 0.5
                              maximum: 100
                          required:
                            - days
                            - percentage
                        description: Skonto
                        maxItems: 3
                      documentDiscount:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                        description: Discount Object Schema for AbaNinja Invoice Json
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                          amount:
                            type: number
                            minimum: 0
                        required:
                          - percentage
                          - amount
                      currencyCode:
                        type: string
                        pattern: ^[A-Z]{3}$
                      title:
                        type:
                          - 'null'
                          - string
                        maxLength: 75
                      reference:
                        type:
                          - string
                        maxLength: 255
                      customField1:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField2:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField3:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField4:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      terms:
                        type:
                          - string
                      publicNotes:
                        type:
                          - 'null'
                          - string
                      footerText:
                        type:
                          - 'null'
                          - string
                      receiver:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                        description: Invoice Receiver for AbaNinja Invoice Json
                        type: object
                        $defs:
                          personAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              personUuid:
                                type: string
                                format: uuid
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                            required:
                              - addressUuid
                              - personUuid
                          companyAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              companyUuid:
                                type: string
                                format: uuid
                              contactPersonUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of contact person inside company
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                              additionalReceivers:
                                type: array
                                maxItems: 5
                                items:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                            required:
                              - addressUuid
                              - companyUuid
                          additionalCompanyReceiver:
                            type: object
                            properties:
                              personUuid:
                                type: string
                                format: uuid
                                description: UUID of contact person inside given company
                            required:
                              - personUuid
                            additionalProperties: false
                          customerNumberReceiver:
                            type: object
                            properties:
                              customerNumber:
                                type: string
                            required:
                              - customerNumber
                        properties:
                          addressUuid:
                            type: string
                            format: uuid
                          personUuid:
                            type: string
                            format: uuid
                          deliveryAddressUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                          companyUuid:
                            type: string
                            format: uuid
                          contactPersonUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of contact person inside company
                          additionalReceivers:
                            type: array
                            maxItems: 5
                            items:
                              type: object
                              properties:
                                personUuid:
                                  type: string
                                  format: uuid
                                  description: UUID of contact person inside given company
                              required:
                                - personUuid
                              additionalProperties: false
                          customerNumber:
                            type: string
                        required:
                          - addressUuid
                          - personUuid
                          - companyUuid
                          - customerNumber
                    required:
                      - invoiceDate
                      - paymentInstructions
                      - documentTotal
                      - pricesIncludeVat
                      - positions
                      - currencyCode
                      - isTemplate
                      - receiver
                  minItems: 1
              required:
                - documents
              $defs:
                singleInvoice:
                  type: object
                  properties:
                    isTemplate:
                      const: true
                    invoiceDate:
                      type: string
                      format: date
                    dueDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    deliveryDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    paymentInstructions:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                      title: Payment Instructions
                      description: Payment Instruction Schema for AbaNinja Invoice Json
                      $defs:
                        ibanInstruction:
                          title: IBAN
                          type: object
                          properties:
                            iban:
                              type: string
                              pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                            bic:
                              type:
                                - 'null'
                                - string
                              pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                              description: SCOR Reference
                          required:
                            - iban
                          if:
                            properties:
                              iban:
                                not:
                                  pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                          then:
                            required:
                              - bic
                        qrIbanInstruction:
                          title: QR-IBAN
                          type: object
                          properties:
                            qrIban:
                              type: string
                              pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: ^[0-9]{2,27}$
                              description: QRR Reference
                          required:
                            - qrIban
                        bankAccountReference:
                          title: Bank Account UUID
                          type: object
                          properties:
                            bankAccountUuid:
                              type: string
                              format: uuid
                              description: Identifier of the bank account
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                              description: QRR or SCOR Reference
                          required:
                            - bankAccountUuid
                      properties:
                        iban:
                          type: string
                          pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                        bic:
                          type:
                            - 'null'
                            - string
                          pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                        reference:
                          type:
                            - 'null'
                            - string
                          pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                          description: QRR or SCOR Reference
                        qrIban:
                          type: string
                          pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                        bankAccountUuid:
                          type: string
                          format: uuid
                          description: Identifier of the bank account
                      required:
                        - iban
                        - qrIban
                        - bankAccountUuid
                    pricesIncludeVat:
                      type: boolean
                      description: Controls if singlePrice includes vat or not
                    isVariantInvoice:
                      type: boolean
                      default: false
                    documentTotal:
                      type: number
                      description: Total Amount incl. VAT
                    positions:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                        description: Schema for an invoice position item for the AbaNinja API
                        type: object
                        properties:
                          positionNumber:
                            type: integer
                            minimum: 1
                            description: >-
                              Defines order of the position inside position table. 1=first position, 2=second position.
                              Must be a unique value otherwise unexpected sorting can occur
                          uuid:
                            type:
                              - string
                              - 'null'
                            format: uuid
                            description: UUID to use. Especially needed for updating positions without re-creating them
                          kind:
                            const: page_break
                          unitUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: >-
                              UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                              "unitCode"
                          unitCode:
                            type:
                              - 'null'
                              - string
                            description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                            default: C62
                            deprecated: true
                          quantity:
                            type:
                              - number
                              - 'null'
                            default: 1
                          singlePrice:
                            type:
                              - number
                              - 'null'
                            description: Defaults to the products price if given. Otherwise 0.00.
                          discount:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                            description: Discount Object Schema for AbaNinja Invoice Json
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                              amount:
                                type: number
                                minimum: 0
                            required:
                              - percentage
                              - amount
                          vatUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of VAT to use. Takes precedence over "vat"
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                          productUuid: false
                          productNumber:
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            description: >-
                              The productNumber to set. If an existing products number is used, the actual product will
                              be linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                          productDescription:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Required if there is no existing product with the given productNumber or the productNumber
                              is not sent
                          title:
                            type: string
                            maximum: 255
                          text:
                            type: string
                            maximum: 255
                          items:
                            type: array
                            items:
                              properties:
                                positionNumber:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Defines order of the position inside position table. 1=first position, 2=second
                                    position. Must be a unique value otherwise unexpected sorting can occur
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            minItems: 1
                            description: Only Items with the same VAT rate are allowed in a group
                          showCollapsed:
                            type: boolean
                            default: true
                        $defs:
                          productPosition:
                            type: object
                            properties:
                              kind:
                                const: product
                              unitUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: >-
                                  UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                  over "unitCode"
                              unitCode:
                                type:
                                  - 'null'
                                  - string
                                description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                default: C62
                                deprecated: true
                              quantity:
                                type:
                                  - number
                                  - 'null'
                                default: 1
                              singlePrice:
                                type:
                                  - number
                                  - 'null'
                                description: Defaults to the products price if given. Otherwise 0.00.
                              discount:
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                description: Discount Object Schema for AbaNinja Invoice Json
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                  amount:
                                    type: number
                                    minimum: 0
                                required:
                                  - percentage
                                  - amount
                              vatUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of VAT to use. Takes precedence over "vat"
                              vat:
                                type:
                                  - 'null'
                                  - object
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                required:
                                  - percentage
                              productUuid: false
                              productNumber:
                                type:
                                  - string
                                  - 'null'
                                maxLength: 255
                                description: >-
                                  The productNumber to set. If an existing products number is used, the actual product
                                  will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                  "unitCode"
                              productDescription:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Required if there is no existing product with the given productNumber or the
                                  productNumber is not sent
                            required:
                              - kind
                              - productUuid
                              - singlePrice
                              - productDescription
                          subtitlePosition:
                            type: object
                            properties:
                              kind:
                                const: subtitle
                              title:
                                type: string
                                maximum: 255
                            required:
                              - kind
                              - title
                          textPosition:
                            type: object
                            properties:
                              kind:
                                const: text
                              text:
                                type: string
                                maximum: 255
                            required:
                              - kind
                              - text
                          sectionTotalPosition:
                            type: object
                            properties:
                              kind:
                                const: section_total
                              title:
                                type: string
                                maximum: 255
                            required:
                              - kind
                          dividerPosition:
                            type: object
                            properties:
                              kind:
                                const: divider
                            required:
                              - kind
                          pageBreakPosition:
                            type: object
                            properties:
                              kind:
                                const: page_break
                            required:
                              - kind
                          groupPosition:
                            type: object
                            properties:
                              kind:
                                const: group
                              title:
                                type: string
                                maximum: 255
                              items:
                                type: array
                                items:
                                  properties:
                                    positionNumber:
                                      type: integer
                                      minimum: 1
                                      description: >-
                                        Defines order of the position inside position table. 1=first position, 2=second
                                        position. Must be a unique value otherwise unexpected sorting can occur
                                    kind:
                                      const: product
                                    unitUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                      description: >-
                                        UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                        precedence over "unitCode"
                                    unitCode:
                                      type:
                                        - 'null'
                                        - string
                                      description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                      default: C62
                                      deprecated: true
                                    quantity:
                                      type:
                                        - number
                                        - 'null'
                                      default: 1
                                    singlePrice:
                                      type:
                                        - number
                                        - 'null'
                                      description: Defaults to the products price if given. Otherwise 0.00.
                                    discount:
                                      $schema: https://json-schema.org/draft/2020-12/schema
                                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                      description: Discount Object Schema for AbaNinja Invoice Json
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                        amount:
                                          type: number
                                          minimum: 0
                                      required:
                                        - percentage
                                        - amount
                                    vatUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                      description: UUID of VAT to use. Takes precedence over "vat"
                                    vat:
                                      type:
                                        - 'null'
                                        - object
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                          maximum: 100
                                      required:
                                        - percentage
                                    productUuid: false
                                    productNumber:
                                      type:
                                        - string
                                        - 'null'
                                      maxLength: 255
                                      description: >-
                                        The productNumber to set. If an existing products number is used, the actual
                                        product will be linked and its unit will be used. Takes precedence over
                                        "unitUuid" and "unitCode"
                                    productDescription:
                                      type:
                                        - string
                                        - 'null'
                                      description: >-
                                        Required if there is no existing product with the given productNumber or the
                                        productNumber is not sent
                                  required:
                                    - kind
                                    - productUuid
                                    - singlePrice
                                    - productDescription
                                minItems: 1
                                description: Only Items with the same VAT rate are allowed in a group
                              showCollapsed:
                                type: boolean
                                default: true
                            required:
                              - kind
                              - title
                              - items
                        required:
                          - kind
                          - productUuid
                          - singlePrice
                          - productDescription
                          - title
                          - text
                          - items
                      minItems: 1
                    cashDiscounts:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json
                        description: Cash Discount Schema for AbaNinja Invoice Json
                        type: object
                        properties:
                          days:
                            type: integer
                            minimum: 1
                            maximum: 60
                            description: Number of days
                          percentage:
                            type: number
                            minimum: 0.5
                            maximum: 100
                        required:
                          - days
                          - percentage
                      description: Skonto
                      maxItems: 3
                    documentDiscount:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                      description: Discount Object Schema for AbaNinja Invoice Json
                      properties:
                        percentage:
                          type: number
                          minimum: 0
                        amount:
                          type: number
                          minimum: 0
                      required:
                        - percentage
                        - amount
                    currencyCode:
                      type: string
                      pattern: ^[A-Z]{3}$
                    title:
                      type:
                        - 'null'
                        - string
                      maxLength: 75
                    reference:
                      type:
                        - string
                      maxLength: 255
                    customField1:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField2:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField3:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField4:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    terms:
                      type:
                        - string
                    publicNotes:
                      type:
                        - 'null'
                        - string
                    footerText:
                      type:
                        - 'null'
                        - string
                    receiver:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                      description: Invoice Receiver for AbaNinja Invoice Json
                      type: object
                      $defs:
                        personAddress:
                          type: object
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            personUuid:
                              type: string
                              format: uuid
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                          required:
                            - addressUuid
                            - personUuid
                        companyAddress:
                          type: object
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            companyUuid:
                              type: string
                              format: uuid
                            contactPersonUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of contact person inside company
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                            additionalReceivers:
                              type: array
                              maxItems: 5
                              items:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                          required:
                            - addressUuid
                            - companyUuid
                        additionalCompanyReceiver:
                          type: object
                          properties:
                            personUuid:
                              type: string
                              format: uuid
                              description: UUID of contact person inside given company
                          required:
                            - personUuid
                          additionalProperties: false
                        customerNumberReceiver:
                          type: object
                          properties:
                            customerNumber:
                              type: string
                          required:
                            - customerNumber
                      properties:
                        addressUuid:
                          type: string
                          format: uuid
                        personUuid:
                          type: string
                          format: uuid
                        deliveryAddressUuid:
                          type:
                            - 'null'
                            - string
                          format: uuid
                        companyUuid:
                          type: string
                          format: uuid
                        contactPersonUuid:
                          type:
                            - 'null'
                            - string
                          format: uuid
                          description: UUID of contact person inside company
                        additionalReceivers:
                          type: array
                          maxItems: 5
                          items:
                            type: object
                            properties:
                              personUuid:
                                type: string
                                format: uuid
                                description: UUID of contact person inside given company
                            required:
                              - personUuid
                            additionalProperties: false
                        customerNumber:
                          type: string
                      required:
                        - addressUuid
                        - personUuid
                        - companyUuid
                        - customerNumber
                  required:
                    - invoiceDate
                    - paymentInstructions
                    - documentTotal
                    - pricesIncludeVat
                    - positions
                    - currencyCode
                    - isTemplate
                    - receiver
      responses:
        '201':
          description: Invoice created
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          title: Invoice Resource
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            currencyCode:
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            currencyCodeRecognized:
                              description: >-
                                when importing invoices and detecting the currency, this field contains the detected
                                value
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            title:
                              type:
                                - string
                                - 'null'
                            reference:
                              type: string
                            sentStatus:
                              type: string
                              enum:
                                - OPEN
                                - SENDING
                                - ERROR
                                - SENT
                            status:
                              type: string
                              enum:
                                - draft
                                - open
                                - sending
                                - send-failed
                                - sent
                                - viewed
                                - approved
                                - declined
                                - partial
                                - paid
                                - in-payment
                                - collected
                                - planned
                                - pending
                                - archived
                                - cancelled
                                - converted
                                - due
                                - reminder
                                - first-dunning
                                - second-dunning
                                - final-dunning
                                - inactive
                                - active
                                - inbox
                                - expired
                                - done
                                - assign
                                - awaiting-payment
                                - error
                            customField1:
                              type:
                                - string
                                - 'null'
                            customField2:
                              type:
                                - string
                                - 'null'
                            customField3:
                              type:
                                - string
                                - 'null'
                            customField4:
                              type:
                                - string
                                - 'null'
                            terms:
                              type: string
                            publicNotes:
                              type:
                                - string
                                - 'null'
                            footerText:
                              type:
                                - string
                                - 'null'
                            receiver:
                              properties:
                                addressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                networkUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                networkKey:
                                  type:
                                    - string
                                    - 'null'
                                networkName:
                                  type:
                                    - string
                                    - 'null'
                                deliveryAddressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                additionalReceivers:
                                  type: array
                                  items:
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                    type: object
                                receiverInformation:
                                  title: Receiver Information Resource
                                  description: Receiver information resource
                                  properties:
                                    customerNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    companyName:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    name:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    nameWithSalutation:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    careOfAddress:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    address:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    extension:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    houseNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    zipCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    city:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    countryCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    email:
                                      type:
                                        - string
                                        - 'null'
                                      format: email
                                      readOnly: true
                                    language:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      enum:
                                        - de
                                        - en
                                        - fr
                                        - it
                                    deliveryAddress:
                                      properties:
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                      type: object
                                      readOnly: true
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          fullName:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                          email:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                        type: object
                                      readOnly: true
                                  type: object
                                personUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                            invoiceDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dueDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            nextDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            customDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dunningLevel:
                              type: string
                              enum:
                                - REMINDER
                                - FIRST_DUNNING
                                - FINAL_DUNNING
                                - NO_DUNNING
                            paymentInstructions:
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                iban:
                                  type: string
                                bic:
                                  type:
                                    - string
                                    - 'null'
                                qrIban:
                                  type: string
                                reference:
                                  type:
                                    - string
                                    - 'null'
                            pricesIncludeVat:
                              type: boolean
                            isVariantInvoice:
                              type: boolean
                            documentTotal:
                              type: number
                              format: float
                            positions:
                              type: array
                              items:
                                properties:
                                  uuid:
                                    type: string
                                    format: uuid
                                  positionNumber:
                                    type: number
                                    format: int64
                                  kind:
                                    type: string
                                    enum:
                                      - text
                                  productNumber:
                                    type: string
                                  productDescription:
                                    type: string
                                  productUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  productGroupUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  singlePrice:
                                    type: number
                                    format: float
                                  positionTotal:
                                    type: number
                                    format: float
                                  discount:
                                    properties:
                                      amount:
                                        type: number
                                        format: float
                                      percentage:
                                        type: number
                                        format: float
                                  vatUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  vat:
                                    properties:
                                      percentage:
                                        type: number
                                        format: float
                                      amount:
                                        type:
                                          - number
                                          - 'null'
                                        format: float
                                    type: object
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    format: float
                                  unitUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityEmployeeUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityStartDate:
                                    type:
                                      - string
                                      - 'null'
                                    format: date-time
                                  relatedInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  originalInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  title:
                                    type: string
                                  showCollapsed:
                                    type: boolean
                                  items:
                                    type: array
                                    items:
                                      properties:
                                        uuid:
                                          type: string
                                          format: uuid
                                        positionNumber:
                                          type: number
                                          format: int64
                                        kind:
                                          type: string
                                          enum:
                                            - product
                                        productNumber:
                                          type: string
                                        productDescription:
                                          type: string
                                        productUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        productGroupUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        singlePrice:
                                          type: number
                                          format: float
                                        positionTotal:
                                          type: number
                                          format: float
                                        discount:
                                          properties:
                                            amount:
                                              type: number
                                              format: float
                                            percentage:
                                              type: number
                                              format: float
                                        vatUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        vat:
                                          properties:
                                            percentage:
                                              type: number
                                              format: float
                                            amount:
                                              type:
                                                - number
                                                - 'null'
                                              format: float
                                          type: object
                                        quantity:
                                          type:
                                            - number
                                            - 'null'
                                          format: float
                                        unitUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityEmployeeUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityStartDate:
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                        relatedInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        originalInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        unitCode:
                                          type: string
                                  unitCode:
                                    type: string
                                  text:
                                    type: string
                            isTemplate:
                              type: boolean
                            isCollectiveBill:
                              type: boolean
                            invoiceNumber:
                              description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                              type: string
                              deprecated: true
                            importedInvoiceNumber:
                              description: The recognized invoiceNumber of the imported document
                              type:
                                - string
                                - 'null'
                            systemInvoiceNumber:
                              description: The invoiceNumber generated by AbaNinja
                              type: string
                            openAmount:
                              type: number
                              format: float
                            type:
                              type: string
                              enum:
                                - invoice
                            subtype:
                              type:
                                - string
                                - 'null'
                              enum:
                                - partial
                                - final
                                - on_account
                                - instalment
                                - dunning
                            abanetSendAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            abanetConfirmedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            bookedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncMessage:
                              type:
                                - string
                                - 'null'
                            syncStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - OK
                                - FAILED
                                - INCORRECT_STATE
                                - GENERAL_ERROR
                                - CONNECTION_ERROR
                                - BLOCKED_PREVIOUS_NOT_SYNCED
                            cashDiscounts:
                              type: array
                              items:
                                properties:
                                  days:
                                    type: number
                                    format: int64
                                  percentage:
                                    type: number
                                    format: float
                                type: object
                              maxItems: 3
                              minItems: 0
                            documentDiscount:
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  type: number
                                  format: float
                          type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 201
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '202':
          description: Asynchronous processing
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Asynchronous Import Resource
                    description: Resource for asynchronous document imports
                    properties:
                      status:
                        type: string
                        format: uri
                      queueUuid:
                        type: string
                        format: uuid
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 202
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: d5df668659a1d982c4a0ef984338993b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}:
    get:
      tags:
        - document-invoices
      summary: Get invoice
      description: Get a single invoice
      operationId: documents_get_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            currencyCode:
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            currencyCodeRecognized:
                              description: >-
                                when importing invoices and detecting the currency, this field contains the detected
                                value
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            title:
                              type:
                                - string
                                - 'null'
                            reference:
                              type: string
                            sentStatus:
                              type: string
                              enum:
                                - OPEN
                                - SENDING
                                - ERROR
                                - SENT
                            status:
                              type: string
                              enum:
                                - draft
                                - open
                                - sending
                                - send-failed
                                - sent
                                - viewed
                                - approved
                                - declined
                                - partial
                                - paid
                                - in-payment
                                - collected
                                - planned
                                - pending
                                - archived
                                - cancelled
                                - converted
                                - due
                                - reminder
                                - first-dunning
                                - second-dunning
                                - final-dunning
                                - inactive
                                - active
                                - inbox
                                - expired
                                - done
                                - assign
                                - awaiting-payment
                                - error
                            customField1:
                              type:
                                - string
                                - 'null'
                            customField2:
                              type:
                                - string
                                - 'null'
                            customField3:
                              type:
                                - string
                                - 'null'
                            customField4:
                              type:
                                - string
                                - 'null'
                            terms:
                              type: string
                            publicNotes:
                              type:
                                - string
                                - 'null'
                            footerText:
                              type:
                                - string
                                - 'null'
                            receiver:
                              properties:
                                addressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                networkUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                networkKey:
                                  type:
                                    - string
                                    - 'null'
                                networkName:
                                  type:
                                    - string
                                    - 'null'
                                deliveryAddressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                additionalReceivers:
                                  type: array
                                  items:
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                    type: object
                                receiverInformation:
                                  title: Receiver Information Resource
                                  description: Receiver information resource
                                  properties:
                                    customerNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    companyName:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    name:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    nameWithSalutation:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    careOfAddress:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    address:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    extension:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    houseNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    zipCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    city:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    countryCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    email:
                                      type:
                                        - string
                                        - 'null'
                                      format: email
                                      readOnly: true
                                    language:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      enum:
                                        - de
                                        - en
                                        - fr
                                        - it
                                    deliveryAddress:
                                      properties:
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                      type: object
                                      readOnly: true
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          fullName:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                          email:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                        type: object
                                      readOnly: true
                                  type: object
                                personUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                            invoiceDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dueDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            nextDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            customDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dunningLevel:
                              type: string
                              enum:
                                - REMINDER
                                - FIRST_DUNNING
                                - FINAL_DUNNING
                                - NO_DUNNING
                            paymentInstructions:
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                iban:
                                  type: string
                                bic:
                                  type:
                                    - string
                                    - 'null'
                                qrIban:
                                  type: string
                                reference:
                                  type:
                                    - string
                                    - 'null'
                            pricesIncludeVat:
                              type: boolean
                            isVariantInvoice:
                              type: boolean
                            documentTotal:
                              type: number
                              format: float
                            positions:
                              type: array
                              items:
                                properties:
                                  uuid:
                                    type: string
                                    format: uuid
                                  positionNumber:
                                    type: number
                                    format: int64
                                  kind:
                                    type: string
                                    enum:
                                      - text
                                  productNumber:
                                    type: string
                                  productDescription:
                                    type: string
                                  productUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  productGroupUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  singlePrice:
                                    type: number
                                    format: float
                                  positionTotal:
                                    type: number
                                    format: float
                                  discount:
                                    properties:
                                      amount:
                                        type: number
                                        format: float
                                      percentage:
                                        type: number
                                        format: float
                                  vatUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  vat:
                                    properties:
                                      percentage:
                                        type: number
                                        format: float
                                      amount:
                                        type:
                                          - number
                                          - 'null'
                                        format: float
                                    type: object
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    format: float
                                  unitUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityEmployeeUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityStartDate:
                                    type:
                                      - string
                                      - 'null'
                                    format: date-time
                                  relatedInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  originalInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  title:
                                    type: string
                                  showCollapsed:
                                    type: boolean
                                  items:
                                    type: array
                                    items:
                                      properties:
                                        uuid:
                                          type: string
                                          format: uuid
                                        positionNumber:
                                          type: number
                                          format: int64
                                        kind:
                                          type: string
                                          enum:
                                            - product
                                        productNumber:
                                          type: string
                                        productDescription:
                                          type: string
                                        productUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        productGroupUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        singlePrice:
                                          type: number
                                          format: float
                                        positionTotal:
                                          type: number
                                          format: float
                                        discount:
                                          properties:
                                            amount:
                                              type: number
                                              format: float
                                            percentage:
                                              type: number
                                              format: float
                                        vatUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        vat:
                                          properties:
                                            percentage:
                                              type: number
                                              format: float
                                            amount:
                                              type:
                                                - number
                                                - 'null'
                                              format: float
                                          type: object
                                        quantity:
                                          type:
                                            - number
                                            - 'null'
                                          format: float
                                        unitUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityEmployeeUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityStartDate:
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                        relatedInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        originalInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        unitCode:
                                          type: string
                                  unitCode:
                                    type: string
                                  text:
                                    type: string
                            isTemplate:
                              type: boolean
                            isCollectiveBill:
                              type: boolean
                            invoiceNumber:
                              description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                              type: string
                              deprecated: true
                            importedInvoiceNumber:
                              description: The recognized invoiceNumber of the imported document
                              type:
                                - string
                                - 'null'
                            systemInvoiceNumber:
                              description: The invoiceNumber generated by AbaNinja
                              type: string
                            openAmount:
                              type: number
                              format: float
                            type:
                              type: string
                              enum:
                                - invoice
                            subtype:
                              type:
                                - string
                                - 'null'
                              enum:
                                - partial
                                - final
                                - on_account
                                - instalment
                                - dunning
                            abanetSendAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            abanetConfirmedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            bookedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncMessage:
                              type:
                                - string
                                - 'null'
                            syncStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - OK
                                - FAILED
                                - INCORRECT_STATE
                                - GENERAL_ERROR
                                - CONNECTION_ERROR
                                - BLOCKED_PREVIOUS_NOT_SYNCED
                            cashDiscounts:
                              type: array
                              items:
                                properties:
                                  days:
                                    type: number
                                    format: int64
                                  percentage:
                                    type: number
                                    format: float
                                type: object
                              maxItems: 3
                              minItems: 0
                            documentDiscount:
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  type: number
                                  format: float
                            documentUrl:
                              type:
                                - string
                                - 'null'
                              format: uri
                            documentData:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                currencyCode:
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                currencyCodeRecognized:
                                  description: >-
                                    when importing invoices and detecting the currency, this field contains the detected
                                    value
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                reference:
                                  type: string
                                publicNotes:
                                  type:
                                    - string
                                    - 'null'
                                receiver:
                                  properties:
                                    addressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    companyUuid:
                                      type: string
                                      format: uuid
                                    networkUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    networkKey:
                                      type:
                                        - string
                                        - 'null'
                                    networkName:
                                      type:
                                        - string
                                        - 'null'
                                    deliveryAddressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    contactPersonUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          personUuid:
                                            type: string
                                            format: uuid
                                        type: object
                                    receiverInformation:
                                      title: Receiver Information Resource
                                      description: Receiver information resource
                                      properties:
                                        customerNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        email:
                                          type:
                                            - string
                                            - 'null'
                                          format: email
                                          readOnly: true
                                        language:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                          enum:
                                            - de
                                            - en
                                            - fr
                                            - it
                                        deliveryAddress:
                                          properties:
                                            companyName:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            name:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            nameWithSalutation:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            careOfAddress:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            address:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            extension:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            houseNumber:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            zipCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            city:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            countryCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                          type: object
                                          readOnly: true
                                        additionalReceivers:
                                          type: array
                                          items:
                                            properties:
                                              fullName:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                              email:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                            type: object
                                          readOnly: true
                                      type: object
                                    personUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                invoiceNumber:
                                  description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                                  type: string
                                  deprecated: true
                                importedInvoiceNumber:
                                  description: The recognized invoiceNumber of the imported document
                                  type:
                                    - string
                                    - 'null'
                                systemInvoiceNumber:
                                  description: The invoiceNumber generated by AbaNinja
                                  type: string
                                invoiceDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dueDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                deliveryDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                nextDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                customDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dunningLevel:
                                  type: string
                                  enum:
                                    - REMINDER
                                    - FIRST_DUNNING
                                    - FINAL_DUNNING
                                    - NO_DUNNING
                                sentStatus:
                                  type: string
                                  enum:
                                    - OPEN
                                    - SENDING
                                    - ERROR
                                    - SENT
                                status:
                                  type: string
                                  enum:
                                    - draft
                                    - open
                                    - sending
                                    - send-failed
                                    - sent
                                    - viewed
                                    - approved
                                    - declined
                                    - partial
                                    - paid
                                    - in-payment
                                    - collected
                                    - planned
                                    - pending
                                    - archived
                                    - cancelled
                                    - converted
                                    - due
                                    - reminder
                                    - first-dunning
                                    - second-dunning
                                    - final-dunning
                                    - inactive
                                    - active
                                    - inbox
                                    - expired
                                    - done
                                    - assign
                                    - awaiting-payment
                                    - error
                                paymentInstructions:
                                  properties:
                                    bankAccountUuid:
                                      type: string
                                      format: uuid
                                    iban:
                                      type: string
                                    bic:
                                      type:
                                        - string
                                        - 'null'
                                    qrIban:
                                      type: string
                                    reference:
                                      type:
                                        - string
                                        - 'null'
                                documentTotal:
                                  type: number
                                  format: float
                                taxPositions:
                                  type: array
                                  items:
                                    title: Tax Position Resource
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      id:
                                        type: number
                                        format: int64
                                        deprecated: true
                                      accountNumber:
                                        type:
                                          - number
                                          - 'null'
                                        format: int64
                                        deprecated: true
                                      bookingAccountUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      isTaxIncluded:
                                        type: boolean
                                      amount:
                                        type: number
                                        format: float
                                      taxRate:
                                        type: number
                                        format: float
                                        deprecated: true
                                      vatUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                        deprecated: true
                                      taxRateUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      vat:
                                        properties:
                                          percentage:
                                            type: number
                                            format: float
                                          amount:
                                            type:
                                              - number
                                              - 'null'
                                            format: float
                                        type: object
                                    type: object
                                isTemplate:
                                  type: boolean
                                openAmount:
                                  type: number
                                  format: float
                                type:
                                  type: string
                                  enum:
                                    - invoice
                                subtype:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - partial
                                    - final
                                    - on_account
                                    - instalment
                                    - dunning
                                abanetSendAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                abanetConfirmedAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                wasRecognitionLimitReached:
                                  type: boolean
                                hasCustomPaymentSlip:
                                  description: >-
                                    if the invoice has a custom payment slip (true) or if it will be generated by
                                    AbaNinja (false)
                                  type: boolean
                              type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 555ecc2a277c4d6831a7d652d2b19bc9
      x-required-scopes:
        - customers
    patch:
      tags:
        - document-invoices
      summary: Update invoice
      description: Update invoice
      operationId: documents_update_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update invoice
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/invoice.schema.json
              title: Invoices
              description: A Schema for creating invoices in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      isTemplate:
                        const: true
                      invoiceDate:
                        type: string
                        format: date
                      dueDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      deliveryDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      paymentInstructions:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                        title: Payment Instructions
                        description: Payment Instruction Schema for AbaNinja Invoice Json
                        $defs:
                          ibanInstruction:
                            title: IBAN
                            type: object
                            properties:
                              iban:
                                type: string
                                pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                              bic:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                description: SCOR Reference
                            required:
                              - iban
                            if:
                              properties:
                                iban:
                                  not:
                                    pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                            then:
                              required:
                                - bic
                          qrIbanInstruction:
                            title: QR-IBAN
                            type: object
                            properties:
                              qrIban:
                                type: string
                                pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[0-9]{2,27}$
                                description: QRR Reference
                            required:
                              - qrIban
                          bankAccountReference:
                            title: Bank Account UUID
                            type: object
                            properties:
                              bankAccountUuid:
                                type: string
                                format: uuid
                                description: Identifier of the bank account
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                description: QRR or SCOR Reference
                            required:
                              - bankAccountUuid
                        properties:
                          iban:
                            type: string
                            pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                          bic:
                            type:
                              - 'null'
                              - string
                            pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                          reference:
                            type:
                              - 'null'
                              - string
                            pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                            description: QRR or SCOR Reference
                          qrIban:
                            type: string
                            pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                          bankAccountUuid:
                            type: string
                            format: uuid
                            description: Identifier of the bank account
                        required:
                          - iban
                          - qrIban
                          - bankAccountUuid
                      pricesIncludeVat:
                        type: boolean
                        description: Controls if singlePrice includes vat or not
                      isVariantInvoice:
                        type: boolean
                        default: false
                      documentTotal:
                        type: number
                        description: Total Amount incl. VAT
                      positions:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                          description: Schema for an invoice position item for the AbaNinja API
                          type: object
                          properties:
                            positionNumber:
                              type: integer
                              minimum: 1
                              description: >-
                                Defines order of the position inside position table. 1=first position, 2=second
                                position. Must be a unique value otherwise unexpected sorting can occur
                            uuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: UUID to use. Especially needed for updating positions without re-creating them
                            kind:
                              const: page_break
                            unitUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: >-
                                UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                                "unitCode"
                            unitCode:
                              type:
                                - 'null'
                                - string
                              description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                              default: C62
                              deprecated: true
                            quantity:
                              type:
                                - number
                                - 'null'
                              default: 1
                            singlePrice:
                              type:
                                - number
                                - 'null'
                              description: Defaults to the products price if given. Otherwise 0.00.
                            discount:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                              description: Discount Object Schema for AbaNinja Invoice Json
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                amount:
                                  type: number
                                  minimum: 0
                              required:
                                - percentage
                                - amount
                            vatUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of VAT to use. Takes precedence over "vat"
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                            productUuid: false
                            productNumber:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The productNumber to set. If an existing products number is used, the actual product
                                will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                "unitCode"
                            productDescription:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Required if there is no existing product with the given productNumber or the
                                productNumber is not sent
                            title:
                              type: string
                              maximum: 255
                            text:
                              type: string
                              maximum: 255
                            items:
                              type: array
                              items:
                                properties:
                                  positionNumber:
                                    type: integer
                                    minimum: 1
                                    description: >-
                                      Defines order of the position inside position table. 1=first position, 2=second
                                      position. Must be a unique value otherwise unexpected sorting can occur
                                  kind:
                                    const: product
                                  unitUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: >-
                                      UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                      precedence over "unitCode"
                                  unitCode:
                                    type:
                                      - 'null'
                                      - string
                                    description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                    default: C62
                                    deprecated: true
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    default: 1
                                  singlePrice:
                                    type:
                                      - number
                                      - 'null'
                                    description: Defaults to the products price if given. Otherwise 0.00.
                                  discount:
                                    $schema: https://json-schema.org/draft/2020-12/schema
                                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                    description: Discount Object Schema for AbaNinja Invoice Json
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                      amount:
                                        type: number
                                        minimum: 0
                                    required:
                                      - percentage
                                      - amount
                                  vatUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of VAT to use. Takes precedence over "vat"
                                  vat:
                                    type:
                                      - 'null'
                                      - object
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                        maximum: 100
                                    required:
                                      - percentage
                                  productUuid: false
                                  productNumber:
                                    type:
                                      - string
                                      - 'null'
                                    maxLength: 255
                                    description: >-
                                      The productNumber to set. If an existing products number is used, the actual
                                      product will be linked and its unit will be used. Takes precedence over "unitUuid"
                                      and "unitCode"
                                  productDescription:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Required if there is no existing product with the given productNumber or the
                                      productNumber is not sent
                                required:
                                  - kind
                                  - productUuid
                                  - singlePrice
                                  - productDescription
                              minItems: 1
                              description: Only Items with the same VAT rate are allowed in a group
                            showCollapsed:
                              type: boolean
                              default: true
                          $defs:
                            productPosition:
                              type: object
                              properties:
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            subtitlePosition:
                              type: object
                              properties:
                                kind:
                                  const: subtitle
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - title
                            textPosition:
                              type: object
                              properties:
                                kind:
                                  const: text
                                text:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - text
                            sectionTotalPosition:
                              type: object
                              properties:
                                kind:
                                  const: section_total
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                            dividerPosition:
                              type: object
                              properties:
                                kind:
                                  const: divider
                              required:
                                - kind
                            pageBreakPosition:
                              type: object
                              properties:
                                kind:
                                  const: page_break
                              required:
                                - kind
                            groupPosition:
                              type: object
                              properties:
                                kind:
                                  const: group
                                title:
                                  type: string
                                  maximum: 255
                                items:
                                  type: array
                                  items:
                                    properties:
                                      positionNumber:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          Defines order of the position inside position table. 1=first position,
                                          2=second position. Must be a unique value otherwise unexpected sorting can
                                          occur
                                      kind:
                                        const: product
                                      unitUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: >-
                                          UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                          precedence over "unitCode"
                                      unitCode:
                                        type:
                                          - 'null'
                                          - string
                                        description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                        default: C62
                                        deprecated: true
                                      quantity:
                                        type:
                                          - number
                                          - 'null'
                                        default: 1
                                      singlePrice:
                                        type:
                                          - number
                                          - 'null'
                                        description: Defaults to the products price if given. Otherwise 0.00.
                                      discount:
                                        $schema: https://json-schema.org/draft/2020-12/schema
                                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                        description: Discount Object Schema for AbaNinja Invoice Json
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                          amount:
                                            type: number
                                            minimum: 0
                                        required:
                                          - percentage
                                          - amount
                                      vatUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: UUID of VAT to use. Takes precedence over "vat"
                                      vat:
                                        type:
                                          - 'null'
                                          - object
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                            maximum: 100
                                        required:
                                          - percentage
                                      productUuid: false
                                      productNumber:
                                        type:
                                          - string
                                          - 'null'
                                        maxLength: 255
                                        description: >-
                                          The productNumber to set. If an existing products number is used, the actual
                                          product will be linked and its unit will be used. Takes precedence over
                                          "unitUuid" and "unitCode"
                                      productDescription:
                                        type:
                                          - string
                                          - 'null'
                                        description: >-
                                          Required if there is no existing product with the given productNumber or the
                                          productNumber is not sent
                                    required:
                                      - kind
                                      - productUuid
                                      - singlePrice
                                      - productDescription
                                  minItems: 1
                                  description: Only Items with the same VAT rate are allowed in a group
                                showCollapsed:
                                  type: boolean
                                  default: true
                              required:
                                - kind
                                - title
                                - items
                          required:
                            - kind
                            - productUuid
                            - singlePrice
                            - productDescription
                            - title
                            - text
                            - items
                        minItems: 1
                      cashDiscounts:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json
                          description: Cash Discount Schema for AbaNinja Invoice Json
                          type: object
                          properties:
                            days:
                              type: integer
                              minimum: 1
                              maximum: 60
                              description: Number of days
                            percentage:
                              type: number
                              minimum: 0.5
                              maximum: 100
                          required:
                            - days
                            - percentage
                        description: Skonto
                        maxItems: 3
                      documentDiscount:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                        description: Discount Object Schema for AbaNinja Invoice Json
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                          amount:
                            type: number
                            minimum: 0
                        required:
                          - percentage
                          - amount
                      currencyCode:
                        type: string
                        pattern: ^[A-Z]{3}$
                      title:
                        type:
                          - 'null'
                          - string
                        maxLength: 75
                      reference:
                        type:
                          - string
                        maxLength: 255
                      customField1:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField2:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField3:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField4:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      terms:
                        type:
                          - string
                      publicNotes:
                        type:
                          - 'null'
                          - string
                      footerText:
                        type:
                          - 'null'
                          - string
                      receiver:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                        description: Invoice Receiver for AbaNinja Invoice Json
                        type: object
                        $defs:
                          personAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              personUuid:
                                type: string
                                format: uuid
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                            required:
                              - addressUuid
                              - personUuid
                          companyAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              companyUuid:
                                type: string
                                format: uuid
                              contactPersonUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of contact person inside company
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                              additionalReceivers:
                                type: array
                                maxItems: 5
                                items:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                            required:
                              - addressUuid
                              - companyUuid
                          additionalCompanyReceiver:
                            type: object
                            properties:
                              personUuid:
                                type: string
                                format: uuid
                                description: UUID of contact person inside given company
                            required:
                              - personUuid
                            additionalProperties: false
                          customerNumberReceiver:
                            type: object
                            properties:
                              customerNumber:
                                type: string
                            required:
                              - customerNumber
                        properties:
                          addressUuid:
                            type: string
                            format: uuid
                          personUuid:
                            type: string
                            format: uuid
                          deliveryAddressUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                          companyUuid:
                            type: string
                            format: uuid
                          contactPersonUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of contact person inside company
                          additionalReceivers:
                            type: array
                            maxItems: 5
                            items:
                              type: object
                              properties:
                                personUuid:
                                  type: string
                                  format: uuid
                                  description: UUID of contact person inside given company
                              required:
                                - personUuid
                              additionalProperties: false
                          customerNumber:
                            type: string
                        required:
                          - addressUuid
                          - personUuid
                          - companyUuid
                          - customerNumber
                    required:
                      - invoiceDate
                      - paymentInstructions
                      - documentTotal
                      - pricesIncludeVat
                      - positions
                      - currencyCode
                      - isTemplate
                      - receiver
                  minItems: 1
              required:
                - documents
              $defs:
                singleInvoice:
                  type: object
                  properties:
                    isTemplate:
                      const: true
                    invoiceDate:
                      type: string
                      format: date
                    dueDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    deliveryDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    paymentInstructions:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                      title: Payment Instructions
                      description: Payment Instruction Schema for AbaNinja Invoice Json
                      $defs:
                        ibanInstruction:
                          title: IBAN
                          type: object
                          properties:
                            iban:
                              type: string
                              pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                            bic:
                              type:
                                - 'null'
                                - string
                              pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                              description: SCOR Reference
                          required:
                            - iban
                          if:
                            properties:
                              iban:
                                not:
                                  pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                          then:
                            required:
                              - bic
                        qrIbanInstruction:
                          title: QR-IBAN
                          type: object
                          properties:
                            qrIban:
                              type: string
                              pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: ^[0-9]{2,27}$
                              description: QRR Reference
                          required:
                            - qrIban
                        bankAccountReference:
                          title: Bank Account UUID
                          type: object
                          properties:
                            bankAccountUuid:
                              type: string
                              format: uuid
                              description: Identifier of the bank account
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                              description: QRR or SCOR Reference
                          required:
                            - bankAccountUuid
                      properties:
                        iban:
                          type: string
                          pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                        bic:
                          type:
                            - 'null'
                            - string
                          pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                        reference:
                          type:
                            - 'null'
                            - string
                          pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                          description: QRR or SCOR Reference
                        qrIban:
                          type: string
                          pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                        bankAccountUuid:
                          type: string
                          format: uuid
                          description: Identifier of the bank account
                      required:
                        - iban
                        - qrIban
                        - bankAccountUuid
                    pricesIncludeVat:
                      type: boolean
                      description: Controls if singlePrice includes vat or not
                    isVariantInvoice:
                      type: boolean
                      default: false
                    documentTotal:
                      type: number
                      description: Total Amount incl. VAT
                    positions:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                        description: Schema for an invoice position item for the AbaNinja API
                        type: object
                        properties:
                          positionNumber:
                            type: integer
                            minimum: 1
                            description: >-
                              Defines order of the position inside position table. 1=first position, 2=second position.
                              Must be a unique value otherwise unexpected sorting can occur
                          uuid:
                            type:
                              - string
                              - 'null'
                            format: uuid
                            description: UUID to use. Especially needed for updating positions without re-creating them
                          kind:
                            const: page_break
                          unitUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: >-
                              UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                              "unitCode"
                          unitCode:
                            type:
                              - 'null'
                              - string
                            description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                            default: C62
                            deprecated: true
                          quantity:
                            type:
                              - number
                              - 'null'
                            default: 1
                          singlePrice:
                            type:
                              - number
                              - 'null'
                            description: Defaults to the products price if given. Otherwise 0.00.
                          discount:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                            description: Discount Object Schema for AbaNinja Invoice Json
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                              amount:
                                type: number
                                minimum: 0
                            required:
                              - percentage
                              - amount
                          vatUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of VAT to use. Takes precedence over "vat"
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                          productUuid: false
                          productNumber:
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            description: >-
                              The productNumber to set. If an existing products number is used, the actual product will
                              be linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                          productDescription:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Required if there is no existing product with the given productNumber or the productNumber
                              is not sent
                          title:
                            type: string
                            maximum: 255
                          text:
                            type: string
                            maximum: 255
                          items:
                            type: array
                            items:
                              properties:
                                positionNumber:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Defines order of the position inside position table. 1=first position, 2=second
                                    position. Must be a unique value otherwise unexpected sorting can occur
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            minItems: 1
                            description: Only Items with the same VAT rate are allowed in a group
                          showCollapsed:
                            type: boolean
                            default: true
                        $defs:
                          productPosition:
                            type: object
                            properties:
                              kind:
                                const: product
                              unitUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: >-
                                  UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                  over "unitCode"
                              unitCode:
                                type:
                                  - 'null'
                                  - string
                                description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                default: C62
                                deprecated: true
                              quantity:
                                type:
                                  - number
                                  - 'null'
                                default: 1
                              singlePrice:
                                type:
                                  - number
                                  - 'null'
                                description: Defaults to the products price if given. Otherwise 0.00.
                              discount:
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                description: Discount Object Schema for AbaNinja Invoice Json
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                  amount:
                                    type: number
                                    minimum: 0
                                required:
                                  - percentage
                                  - amount
                              vatUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of VAT to use. Takes precedence over "vat"
                              vat:
                                type:
                                  - 'null'
                                  - object
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                required:
                                  - percentage
                              productUuid: false
                              productNumber:
                                type:
                                  - string
                                  - 'null'
                                maxLength: 255
                                description: >-
                                  The productNumber to set. If an existing products number is used, the actual product
                                  will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                  "unitCode"
                              productDescription:
                                type:
                                  - string
                                  - 'null'
                                description: >-
                                  Required if there is no existing product with the given productNumber or the
                                  productNumber is not sent
                            required:
                              - kind
                              - productUuid
                              - singlePrice
                              - productDescription
                          subtitlePosition:
                            type: object
                            properties:
                              kind:
                                const: subtitle
                              title:
                                type: string
                                maximum: 255
                            required:
                              - kind
                              - title
                          textPosition:
                            type: object
                            properties:
                              kind:
                                const: text
                              text:
                                type: string
                                maximum: 255
                            required:
                              - kind
                              - text
                          sectionTotalPosition:
                            type: object
                            properties:
                              kind:
                                const: section_total
                              title:
                                type: string
                                maximum: 255
                            required:
                              - kind
                          dividerPosition:
                            type: object
                            properties:
                              kind:
                                const: divider
                            required:
                              - kind
                          pageBreakPosition:
                            type: object
                            properties:
                              kind:
                                const: page_break
                            required:
                              - kind
                          groupPosition:
                            type: object
                            properties:
                              kind:
                                const: group
                              title:
                                type: string
                                maximum: 255
                              items:
                                type: array
                                items:
                                  properties:
                                    positionNumber:
                                      type: integer
                                      minimum: 1
                                      description: >-
                                        Defines order of the position inside position table. 1=first position, 2=second
                                        position. Must be a unique value otherwise unexpected sorting can occur
                                    kind:
                                      const: product
                                    unitUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                      description: >-
                                        UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                        precedence over "unitCode"
                                    unitCode:
                                      type:
                                        - 'null'
                                        - string
                                      description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                      default: C62
                                      deprecated: true
                                    quantity:
                                      type:
                                        - number
                                        - 'null'
                                      default: 1
                                    singlePrice:
                                      type:
                                        - number
                                        - 'null'
                                      description: Defaults to the products price if given. Otherwise 0.00.
                                    discount:
                                      $schema: https://json-schema.org/draft/2020-12/schema
                                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                      description: Discount Object Schema for AbaNinja Invoice Json
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                        amount:
                                          type: number
                                          minimum: 0
                                      required:
                                        - percentage
                                        - amount
                                    vatUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                      description: UUID of VAT to use. Takes precedence over "vat"
                                    vat:
                                      type:
                                        - 'null'
                                        - object
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                          maximum: 100
                                      required:
                                        - percentage
                                    productUuid: false
                                    productNumber:
                                      type:
                                        - string
                                        - 'null'
                                      maxLength: 255
                                      description: >-
                                        The productNumber to set. If an existing products number is used, the actual
                                        product will be linked and its unit will be used. Takes precedence over
                                        "unitUuid" and "unitCode"
                                    productDescription:
                                      type:
                                        - string
                                        - 'null'
                                      description: >-
                                        Required if there is no existing product with the given productNumber or the
                                        productNumber is not sent
                                  required:
                                    - kind
                                    - productUuid
                                    - singlePrice
                                    - productDescription
                                minItems: 1
                                description: Only Items with the same VAT rate are allowed in a group
                              showCollapsed:
                                type: boolean
                                default: true
                            required:
                              - kind
                              - title
                              - items
                        required:
                          - kind
                          - productUuid
                          - singlePrice
                          - productDescription
                          - title
                          - text
                          - items
                      minItems: 1
                    cashDiscounts:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json
                        description: Cash Discount Schema for AbaNinja Invoice Json
                        type: object
                        properties:
                          days:
                            type: integer
                            minimum: 1
                            maximum: 60
                            description: Number of days
                          percentage:
                            type: number
                            minimum: 0.5
                            maximum: 100
                        required:
                          - days
                          - percentage
                      description: Skonto
                      maxItems: 3
                    documentDiscount:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                      description: Discount Object Schema for AbaNinja Invoice Json
                      properties:
                        percentage:
                          type: number
                          minimum: 0
                        amount:
                          type: number
                          minimum: 0
                      required:
                        - percentage
                        - amount
                    currencyCode:
                      type: string
                      pattern: ^[A-Z]{3}$
                    title:
                      type:
                        - 'null'
                        - string
                      maxLength: 75
                    reference:
                      type:
                        - string
                      maxLength: 255
                    customField1:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField2:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField3:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    customField4:
                      type:
                        - 'null'
                        - string
                      maxLength: 255
                    terms:
                      type:
                        - string
                    publicNotes:
                      type:
                        - 'null'
                        - string
                    footerText:
                      type:
                        - 'null'
                        - string
                    receiver:
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                      description: Invoice Receiver for AbaNinja Invoice Json
                      type: object
                      $defs:
                        personAddress:
                          type: object
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            personUuid:
                              type: string
                              format: uuid
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                          required:
                            - addressUuid
                            - personUuid
                        companyAddress:
                          type: object
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            companyUuid:
                              type: string
                              format: uuid
                            contactPersonUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of contact person inside company
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                            additionalReceivers:
                              type: array
                              maxItems: 5
                              items:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                          required:
                            - addressUuid
                            - companyUuid
                        additionalCompanyReceiver:
                          type: object
                          properties:
                            personUuid:
                              type: string
                              format: uuid
                              description: UUID of contact person inside given company
                          required:
                            - personUuid
                          additionalProperties: false
                        customerNumberReceiver:
                          type: object
                          properties:
                            customerNumber:
                              type: string
                          required:
                            - customerNumber
                      properties:
                        addressUuid:
                          type: string
                          format: uuid
                        personUuid:
                          type: string
                          format: uuid
                        deliveryAddressUuid:
                          type:
                            - 'null'
                            - string
                          format: uuid
                        companyUuid:
                          type: string
                          format: uuid
                        contactPersonUuid:
                          type:
                            - 'null'
                            - string
                          format: uuid
                          description: UUID of contact person inside company
                        additionalReceivers:
                          type: array
                          maxItems: 5
                          items:
                            type: object
                            properties:
                              personUuid:
                                type: string
                                format: uuid
                                description: UUID of contact person inside given company
                            required:
                              - personUuid
                            additionalProperties: false
                        customerNumber:
                          type: string
                      required:
                        - addressUuid
                        - personUuid
                        - companyUuid
                        - customerNumber
                  required:
                    - invoiceDate
                    - paymentInstructions
                    - documentTotal
                    - pricesIncludeVat
                    - positions
                    - currencyCode
                    - isTemplate
                    - receiver
      responses:
        '200':
          description: Invoice updated
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          properties:
                            uuid:
                              type: string
                              format: uuid
                            currencyCode:
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            currencyCodeRecognized:
                              description: >-
                                when importing invoices and detecting the currency, this field contains the detected
                                value
                              type:
                                - string
                                - 'null'
                              format: iso-4217
                              maxLength: 3
                              minLength: 3
                            title:
                              type:
                                - string
                                - 'null'
                            reference:
                              type: string
                            sentStatus:
                              type: string
                              enum:
                                - OPEN
                                - SENDING
                                - ERROR
                                - SENT
                            status:
                              type: string
                              enum:
                                - draft
                                - open
                                - sending
                                - send-failed
                                - sent
                                - viewed
                                - approved
                                - declined
                                - partial
                                - paid
                                - in-payment
                                - collected
                                - planned
                                - pending
                                - archived
                                - cancelled
                                - converted
                                - due
                                - reminder
                                - first-dunning
                                - second-dunning
                                - final-dunning
                                - inactive
                                - active
                                - inbox
                                - expired
                                - done
                                - assign
                                - awaiting-payment
                                - error
                            customField1:
                              type:
                                - string
                                - 'null'
                            customField2:
                              type:
                                - string
                                - 'null'
                            customField3:
                              type:
                                - string
                                - 'null'
                            customField4:
                              type:
                                - string
                                - 'null'
                            terms:
                              type: string
                            publicNotes:
                              type:
                                - string
                                - 'null'
                            footerText:
                              type:
                                - string
                                - 'null'
                            receiver:
                              properties:
                                addressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                networkUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                networkKey:
                                  type:
                                    - string
                                    - 'null'
                                networkName:
                                  type:
                                    - string
                                    - 'null'
                                deliveryAddressUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                additionalReceivers:
                                  type: array
                                  items:
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                    type: object
                                receiverInformation:
                                  title: Receiver Information Resource
                                  description: Receiver information resource
                                  properties:
                                    customerNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    companyName:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    name:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    nameWithSalutation:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    careOfAddress:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    address:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    extension:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    houseNumber:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    zipCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    city:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    countryCode:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                    email:
                                      type:
                                        - string
                                        - 'null'
                                      format: email
                                      readOnly: true
                                    language:
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      enum:
                                        - de
                                        - en
                                        - fr
                                        - it
                                    deliveryAddress:
                                      properties:
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                      type: object
                                      readOnly: true
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          fullName:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                          email:
                                            type:
                                              - string
                                              - 'null'
                                            readOnly: true
                                        type: object
                                      readOnly: true
                                  type: object
                                personUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                            invoiceDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dueDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            nextDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            customDunningDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            dunningLevel:
                              type: string
                              enum:
                                - REMINDER
                                - FIRST_DUNNING
                                - FINAL_DUNNING
                                - NO_DUNNING
                            paymentInstructions:
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                iban:
                                  type: string
                                bic:
                                  type:
                                    - string
                                    - 'null'
                                qrIban:
                                  type: string
                                reference:
                                  type:
                                    - string
                                    - 'null'
                            pricesIncludeVat:
                              type: boolean
                            isVariantInvoice:
                              type: boolean
                            documentTotal:
                              type: number
                              format: float
                            positions:
                              type: array
                              items:
                                properties:
                                  uuid:
                                    type: string
                                    format: uuid
                                  positionNumber:
                                    type: number
                                    format: int64
                                  kind:
                                    type: string
                                    enum:
                                      - text
                                  productNumber:
                                    type: string
                                  productDescription:
                                    type: string
                                  productUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  productGroupUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  singlePrice:
                                    type: number
                                    format: float
                                  positionTotal:
                                    type: number
                                    format: float
                                  discount:
                                    properties:
                                      amount:
                                        type: number
                                        format: float
                                      percentage:
                                        type: number
                                        format: float
                                  vatUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  vat:
                                    properties:
                                      percentage:
                                        type: number
                                        format: float
                                      amount:
                                        type:
                                          - number
                                          - 'null'
                                        format: float
                                    type: object
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    format: float
                                  unitUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityEmployeeUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  employeeActivityStartDate:
                                    type:
                                      - string
                                      - 'null'
                                    format: date-time
                                  relatedInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  originalInvoice:
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        enum:
                                          - invoice
                                          - receipt
                                          - credit_note
                                          - recurring_invoice
                                          - quote
                                          - contract_note
                                          - delivery_note
                                          - supplier_credit_note
                                      number:
                                        type: string
                                    type:
                                      - object
                                      - 'null'
                                  title:
                                    type: string
                                  showCollapsed:
                                    type: boolean
                                  items:
                                    type: array
                                    items:
                                      properties:
                                        uuid:
                                          type: string
                                          format: uuid
                                        positionNumber:
                                          type: number
                                          format: int64
                                        kind:
                                          type: string
                                          enum:
                                            - product
                                        productNumber:
                                          type: string
                                        productDescription:
                                          type: string
                                        productUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        productGroupUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        singlePrice:
                                          type: number
                                          format: float
                                        positionTotal:
                                          type: number
                                          format: float
                                        discount:
                                          properties:
                                            amount:
                                              type: number
                                              format: float
                                            percentage:
                                              type: number
                                              format: float
                                        vatUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        vat:
                                          properties:
                                            percentage:
                                              type: number
                                              format: float
                                            amount:
                                              type:
                                                - number
                                                - 'null'
                                              format: float
                                          type: object
                                        quantity:
                                          type:
                                            - number
                                            - 'null'
                                          format: float
                                        unitUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityEmployeeUuid:
                                          type:
                                            - string
                                            - 'null'
                                          format: uuid
                                        employeeActivityStartDate:
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                        relatedInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        originalInvoice:
                                          properties:
                                            uuid:
                                              type: string
                                              format: uuid
                                            type:
                                              type: string
                                              enum:
                                                - invoice
                                                - receipt
                                                - credit_note
                                                - recurring_invoice
                                                - quote
                                                - contract_note
                                                - delivery_note
                                                - supplier_credit_note
                                            number:
                                              type: string
                                          type:
                                            - object
                                            - 'null'
                                        unitCode:
                                          type: string
                                  unitCode:
                                    type: string
                                  text:
                                    type: string
                            isTemplate:
                              type: boolean
                            isCollectiveBill:
                              type: boolean
                            invoiceNumber:
                              description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                              type: string
                              deprecated: true
                            importedInvoiceNumber:
                              description: The recognized invoiceNumber of the imported document
                              type:
                                - string
                                - 'null'
                            systemInvoiceNumber:
                              description: The invoiceNumber generated by AbaNinja
                              type: string
                            openAmount:
                              type: number
                              format: float
                            type:
                              type: string
                              enum:
                                - invoice
                            subtype:
                              type:
                                - string
                                - 'null'
                              enum:
                                - partial
                                - final
                                - on_account
                                - instalment
                                - dunning
                            abanetSendAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            abanetConfirmedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            bookedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncedAt:
                              type:
                                - string
                                - 'null'
                              format: date-time
                            syncMessage:
                              type:
                                - string
                                - 'null'
                            syncStatus:
                              type:
                                - string
                                - 'null'
                              enum:
                                - OK
                                - FAILED
                                - INCORRECT_STATE
                                - GENERAL_ERROR
                                - CONNECTION_ERROR
                                - BLOCKED_PREVIOUS_NOT_SYNCED
                            cashDiscounts:
                              type: array
                              items:
                                properties:
                                  days:
                                    type: number
                                    format: int64
                                  percentage:
                                    type: number
                                    format: float
                                type: object
                              maxItems: 3
                              minItems: 0
                            documentDiscount:
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  type: number
                                  format: float
                            documentUrl:
                              type:
                                - string
                                - 'null'
                              format: uri
                            documentData:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                currencyCode:
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                currencyCodeRecognized:
                                  description: >-
                                    when importing invoices and detecting the currency, this field contains the detected
                                    value
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                reference:
                                  type: string
                                publicNotes:
                                  type:
                                    - string
                                    - 'null'
                                receiver:
                                  properties:
                                    addressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    companyUuid:
                                      type: string
                                      format: uuid
                                    networkUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    networkKey:
                                      type:
                                        - string
                                        - 'null'
                                    networkName:
                                      type:
                                        - string
                                        - 'null'
                                    deliveryAddressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    contactPersonUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          personUuid:
                                            type: string
                                            format: uuid
                                        type: object
                                    receiverInformation:
                                      title: Receiver Information Resource
                                      description: Receiver information resource
                                      properties:
                                        customerNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        email:
                                          type:
                                            - string
                                            - 'null'
                                          format: email
                                          readOnly: true
                                        language:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                          enum:
                                            - de
                                            - en
                                            - fr
                                            - it
                                        deliveryAddress:
                                          properties:
                                            companyName:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            name:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            nameWithSalutation:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            careOfAddress:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            address:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            extension:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            houseNumber:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            zipCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            city:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            countryCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                          type: object
                                          readOnly: true
                                        additionalReceivers:
                                          type: array
                                          items:
                                            properties:
                                              fullName:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                              email:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                            type: object
                                          readOnly: true
                                      type: object
                                    personUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                invoiceNumber:
                                  description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                                  type: string
                                  deprecated: true
                                importedInvoiceNumber:
                                  description: The recognized invoiceNumber of the imported document
                                  type:
                                    - string
                                    - 'null'
                                systemInvoiceNumber:
                                  description: The invoiceNumber generated by AbaNinja
                                  type: string
                                invoiceDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dueDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                deliveryDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                nextDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                customDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dunningLevel:
                                  type: string
                                  enum:
                                    - REMINDER
                                    - FIRST_DUNNING
                                    - FINAL_DUNNING
                                    - NO_DUNNING
                                sentStatus:
                                  type: string
                                  enum:
                                    - OPEN
                                    - SENDING
                                    - ERROR
                                    - SENT
                                status:
                                  type: string
                                  enum:
                                    - draft
                                    - open
                                    - sending
                                    - send-failed
                                    - sent
                                    - viewed
                                    - approved
                                    - declined
                                    - partial
                                    - paid
                                    - in-payment
                                    - collected
                                    - planned
                                    - pending
                                    - archived
                                    - cancelled
                                    - converted
                                    - due
                                    - reminder
                                    - first-dunning
                                    - second-dunning
                                    - final-dunning
                                    - inactive
                                    - active
                                    - inbox
                                    - expired
                                    - done
                                    - assign
                                    - awaiting-payment
                                    - error
                                paymentInstructions:
                                  properties:
                                    bankAccountUuid:
                                      type: string
                                      format: uuid
                                    iban:
                                      type: string
                                    bic:
                                      type:
                                        - string
                                        - 'null'
                                    qrIban:
                                      type: string
                                    reference:
                                      type:
                                        - string
                                        - 'null'
                                documentTotal:
                                  type: number
                                  format: float
                                taxPositions:
                                  type: array
                                  items:
                                    title: Tax Position Resource
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      id:
                                        type: number
                                        format: int64
                                        deprecated: true
                                      accountNumber:
                                        type:
                                          - number
                                          - 'null'
                                        format: int64
                                        deprecated: true
                                      bookingAccountUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      isTaxIncluded:
                                        type: boolean
                                      amount:
                                        type: number
                                        format: float
                                      taxRate:
                                        type: number
                                        format: float
                                        deprecated: true
                                      vatUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                        deprecated: true
                                      taxRateUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      vat:
                                        properties:
                                          percentage:
                                            type: number
                                            format: float
                                          amount:
                                            type:
                                              - number
                                              - 'null'
                                            format: float
                                        type: object
                                    type: object
                                isTemplate:
                                  type: boolean
                                openAmount:
                                  type: number
                                  format: float
                                type:
                                  type: string
                                  enum:
                                    - invoice
                                subtype:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - partial
                                    - final
                                    - on_account
                                    - instalment
                                    - dunning
                                abanetSendAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                abanetConfirmedAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                wasRecognitionLimitReached:
                                  type: boolean
                                hasCustomPaymentSlip:
                                  description: >-
                                    if the invoice has a custom payment slip (true) or if it will be generated by
                                    AbaNinja (false)
                                  type: boolean
                              type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 842b28b467741ee232dd1604dc14c3ae
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions:
    get:
      tags:
        - document-invoices
      summary: Get bulk actions
      description: Get invoice bulk actions
      operationId: documents_list_bulk_actions_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: forList
          in: query
          description: filter list actions
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    example:
                      archive: Archive
                      cancel: Cancel
                      delete: Delete
                    additionalProperties:
                      description: description of the action
                      type: string
                    propertyNames:
                      enum:
                        - paymentAdd
                        - archive
                        - cancel
                        - cancelPermanently
                        - clone
                        - collectInvoice
                        - convertCNDN
                        - convertCNI
                        - convertDNI
                        - convertIC
                        - convertDN
                        - convertT
                        - convertCN
                        - convert
                        - convertTemplateToContractNote
                        - convertTemplateToCreditNote
                        - convertTemplateToDeliveryNote
                        - convertTI
                        - convertTemplateToQuote
                        - convertToTemplate
                        - createFinal
                        - createInstalments
                        - createPartial
                        - createOnAccount
                        - customerPortalUrl
                        - delete
                        - dissolve
                        - downloadPdf
                        - downloadPaymentConfirmation
                        - dunningPrint
                        - dunningSent
                        - dunningDate
                        - setDunningAmounts
                        - edit
                        - activity
                        - info
                        - email
                        - markApproved
                        - markDeclined
                        - markSent
                        - massDownloadZip
                        - massDunningPrint
                        - massDunningSent
                        - massPrint
                        - massSent
                        - offsetCreditNotes
                        - offsetInvoices
                        - offsetReceipts
                        - offsetSupplierCreditNotes
                        - plannedMail
                        - print
                        - regeneratePdf
                        - resync
                        - restore
                        - save
                        - sendPaymentConfirmation
                        - sendAbaNet
                        - sendDeepSign
                        - sign
                        - signSupplierCreditNote
                        - sync
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 664ce4e360c1ffcaac5a88b94d3647ae
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/calculate:
    post:
      tags:
        - document-invoices
      summary: Calculate amounts of new document
      description: Calculates the amounts of a document for previewing without manipulating any resources
      operationId: documents_create_calculate_3
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Document to calculate
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/invoice-calculate.schema.json
              description: A Schema for calculating invoices in AbaNinja over API
              type: object
              properties:
                currencyCode:
                  type: string
                  pattern: ^[A-Z]{3}$
                positions:
                  type: array
                  items:
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                    description: Schema for an invoice position item for the AbaNinja API
                    type: object
                    properties:
                      positionNumber:
                        type: integer
                        minimum: 1
                        description: >-
                          Defines order of the position inside position table. 1=first position, 2=second position. Must
                          be a unique value otherwise unexpected sorting can occur
                      uuid:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: UUID to use. Especially needed for updating positions without re-creating them
                      kind:
                        const: page_break
                      unitUuid:
                        type:
                          - 'null'
                          - string
                        format: uuid
                        description: >-
                          UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                          "unitCode"
                      unitCode:
                        type:
                          - 'null'
                          - string
                        description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                        default: C62
                        deprecated: true
                      quantity:
                        type:
                          - number
                          - 'null'
                        default: 1
                      singlePrice:
                        type:
                          - number
                          - 'null'
                        description: Defaults to the products price if given. Otherwise 0.00.
                      discount:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                        description: Discount Object Schema for AbaNinja Invoice Json
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                          amount:
                            type: number
                            minimum: 0
                        required:
                          - percentage
                          - amount
                      vatUuid:
                        type:
                          - 'null'
                          - string
                        format: uuid
                        description: UUID of VAT to use. Takes precedence over "vat"
                      vat:
                        type:
                          - 'null'
                          - object
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                            maximum: 100
                        required:
                          - percentage
                      productUuid: false
                      productNumber:
                        type:
                          - string
                          - 'null'
                        maxLength: 255
                        description: >-
                          The productNumber to set. If an existing products number is used, the actual product will be
                          linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                      productDescription:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Required if there is no existing product with the given productNumber or the productNumber is
                          not sent
                      title:
                        type: string
                        maximum: 255
                      text:
                        type: string
                        maximum: 255
                      items:
                        type: array
                        items:
                          properties:
                            positionNumber:
                              type: integer
                              minimum: 1
                              description: >-
                                Defines order of the position inside position table. 1=first position, 2=second
                                position. Must be a unique value otherwise unexpected sorting can occur
                            kind:
                              const: product
                            unitUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: >-
                                UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                                "unitCode"
                            unitCode:
                              type:
                                - 'null'
                                - string
                              description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                              default: C62
                              deprecated: true
                            quantity:
                              type:
                                - number
                                - 'null'
                              default: 1
                            singlePrice:
                              type:
                                - number
                                - 'null'
                              description: Defaults to the products price if given. Otherwise 0.00.
                            discount:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                              description: Discount Object Schema for AbaNinja Invoice Json
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                amount:
                                  type: number
                                  minimum: 0
                              required:
                                - percentage
                                - amount
                            vatUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of VAT to use. Takes precedence over "vat"
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                            productUuid: false
                            productNumber:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The productNumber to set. If an existing products number is used, the actual product
                                will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                "unitCode"
                            productDescription:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Required if there is no existing product with the given productNumber or the
                                productNumber is not sent
                          required:
                            - kind
                            - productUuid
                            - singlePrice
                            - productDescription
                        minItems: 1
                        description: Only Items with the same VAT rate are allowed in a group
                      showCollapsed:
                        type: boolean
                        default: true
                    $defs:
                      productPosition:
                        type: object
                        properties:
                          kind:
                            const: product
                          unitUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: >-
                              UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                              "unitCode"
                          unitCode:
                            type:
                              - 'null'
                              - string
                            description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                            default: C62
                            deprecated: true
                          quantity:
                            type:
                              - number
                              - 'null'
                            default: 1
                          singlePrice:
                            type:
                              - number
                              - 'null'
                            description: Defaults to the products price if given. Otherwise 0.00.
                          discount:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                            description: Discount Object Schema for AbaNinja Invoice Json
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                              amount:
                                type: number
                                minimum: 0
                            required:
                              - percentage
                              - amount
                          vatUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of VAT to use. Takes precedence over "vat"
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                          productUuid: false
                          productNumber:
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            description: >-
                              The productNumber to set. If an existing products number is used, the actual product will
                              be linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                          productDescription:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Required if there is no existing product with the given productNumber or the productNumber
                              is not sent
                        required:
                          - kind
                          - productUuid
                          - singlePrice
                          - productDescription
                      subtitlePosition:
                        type: object
                        properties:
                          kind:
                            const: subtitle
                          title:
                            type: string
                            maximum: 255
                        required:
                          - kind
                          - title
                      textPosition:
                        type: object
                        properties:
                          kind:
                            const: text
                          text:
                            type: string
                            maximum: 255
                        required:
                          - kind
                          - text
                      sectionTotalPosition:
                        type: object
                        properties:
                          kind:
                            const: section_total
                          title:
                            type: string
                            maximum: 255
                        required:
                          - kind
                      dividerPosition:
                        type: object
                        properties:
                          kind:
                            const: divider
                        required:
                          - kind
                      pageBreakPosition:
                        type: object
                        properties:
                          kind:
                            const: page_break
                        required:
                          - kind
                      groupPosition:
                        type: object
                        properties:
                          kind:
                            const: group
                          title:
                            type: string
                            maximum: 255
                          items:
                            type: array
                            items:
                              properties:
                                positionNumber:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Defines order of the position inside position table. 1=first position, 2=second
                                    position. Must be a unique value otherwise unexpected sorting can occur
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            minItems: 1
                            description: Only Items with the same VAT rate are allowed in a group
                          showCollapsed:
                            type: boolean
                            default: true
                        required:
                          - kind
                          - title
                          - items
                    required:
                      - kind
                      - productUuid
                      - singlePrice
                      - productDescription
                      - title
                      - text
                      - items
                documentDiscount:
                  $schema: https://json-schema.org/draft/2020-12/schema
                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                  description: Discount Object Schema for AbaNinja Invoice Json
                  properties:
                    percentage:
                      type: number
                      minimum: 0
                    amount:
                      type: number
                      minimum: 0
                  required:
                    - percentage
                    - amount
                invoiceDate:
                  type:
                    - string
                    - 'null'
                  format: date
              required:
                - positions
                - currencyCode
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Calculation Resource
                    properties:
                      total:
                        type: number
                        format: float
                      positionTotal:
                        type: number
                        format: float
                      discount:
                        type: number
                        format: float
                      roundingDifference:
                        type: number
                        format: float
                      taxes:
                        type: array
                        items:
                          properties:
                            rate:
                              type: number
                              format: float
                            value:
                              type: number
                              format: float
                            name:
                              type: string
                            baseSum:
                              type: number
                              format: float
                          type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: da911941ed564e0285e8375bdd8de007
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/import:
    post:
      tags:
        - document-invoices
      summary: Import invoice
      description: Import invoice from PDF
      operationId: documents_create_import
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Import invoices
        required: true
        content:
          multipart/form-data:
            schema:
              properties:
                data:
                  $schema: https://json-schema.org/draft/2020-12/schema
                  $id: https://api.abaninja.ch/schemas/2.0.0/import-invoice-multipart.schema.json
                  description: A Schema for importing invoice pdfs in AbaNinja over API
                  type: object
                  properties:
                    documents:
                      type: array
                      items:
                        type: object
                        properties:
                          documentFile:
                            type: string
                            description: The file name when uploading the document as multipart request
                          documentData:
                            type: object
                            description: Additional Data for the invoice document
                            properties:
                              currencyCode:
                                type: string
                                pattern: ^[A-Z]{3}$
                              receiver:
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                                description: Invoice Receiver for AbaNinja Invoice Json
                                type: object
                                $defs:
                                  personAddress:
                                    type: object
                                    properties:
                                      addressUuid:
                                        type: string
                                        format: uuid
                                      personUuid:
                                        type: string
                                        format: uuid
                                      deliveryAddressUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                    required:
                                      - addressUuid
                                      - personUuid
                                  companyAddress:
                                    type: object
                                    properties:
                                      addressUuid:
                                        type: string
                                        format: uuid
                                      companyUuid:
                                        type: string
                                        format: uuid
                                      contactPersonUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: UUID of contact person inside company
                                      deliveryAddressUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                      additionalReceivers:
                                        type: array
                                        maxItems: 5
                                        items:
                                          type: object
                                          properties:
                                            personUuid:
                                              type: string
                                              format: uuid
                                              description: UUID of contact person inside given company
                                          required:
                                            - personUuid
                                          additionalProperties: false
                                    required:
                                      - addressUuid
                                      - companyUuid
                                  additionalCompanyReceiver:
                                    type: object
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                        description: UUID of contact person inside given company
                                    required:
                                      - personUuid
                                    additionalProperties: false
                                  customerNumberReceiver:
                                    type: object
                                    properties:
                                      customerNumber:
                                        type: string
                                    required:
                                      - customerNumber
                                properties:
                                  addressUuid:
                                    type: string
                                    format: uuid
                                  personUuid:
                                    type: string
                                    format: uuid
                                  deliveryAddressUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                  companyUuid:
                                    type: string
                                    format: uuid
                                  contactPersonUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of contact person inside company
                                  additionalReceivers:
                                    type: array
                                    maxItems: 5
                                    items:
                                      type: object
                                      properties:
                                        personUuid:
                                          type: string
                                          format: uuid
                                          description: UUID of contact person inside given company
                                      required:
                                        - personUuid
                                      additionalProperties: false
                                  customerNumber:
                                    type: string
                                required:
                                  - addressUuid
                                  - personUuid
                                  - companyUuid
                                  - customerNumber
                              invoiceNumber:
                                type:
                                  - 'null'
                                  - string
                              invoiceDate:
                                type: string
                                format: date
                              dueDate:
                                type: string
                                format: date
                              deliveryDate:
                                type:
                                  - 'null'
                                  - string
                                format: date
                              paymentInstructions:
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                                title: Payment Instructions
                                description: Payment Instruction Schema for AbaNinja Invoice Json
                                $defs:
                                  ibanInstruction:
                                    title: IBAN
                                    type: object
                                    properties:
                                      iban:
                                        type: string
                                        pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                      bic:
                                        type:
                                          - 'null'
                                          - string
                                        pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                      reference:
                                        type:
                                          - 'null'
                                          - string
                                        pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                        description: SCOR Reference
                                    required:
                                      - iban
                                    if:
                                      properties:
                                        iban:
                                          not:
                                            pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                                    then:
                                      required:
                                        - bic
                                  qrIbanInstruction:
                                    title: QR-IBAN
                                    type: object
                                    properties:
                                      qrIban:
                                        type: string
                                        pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                      reference:
                                        type:
                                          - 'null'
                                          - string
                                        pattern: ^[0-9]{2,27}$
                                        description: QRR Reference
                                    required:
                                      - qrIban
                                  bankAccountReference:
                                    title: Bank Account UUID
                                    type: object
                                    properties:
                                      bankAccountUuid:
                                        type: string
                                        format: uuid
                                        description: Identifier of the bank account
                                      reference:
                                        type:
                                          - 'null'
                                          - string
                                        pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                        description: QRR or SCOR Reference
                                    required:
                                      - bankAccountUuid
                                properties:
                                  iban:
                                    type: string
                                    pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                  bic:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                    description: QRR or SCOR Reference
                                  qrIban:
                                    type: string
                                    pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                  bankAccountUuid:
                                    type: string
                                    format: uuid
                                    description: Identifier of the bank account
                                required:
                                  - iban
                                  - qrIban
                                  - bankAccountUuid
                              documentTotal:
                                type: number
                                description: Total Amount incl. VAT
                              taxPositions:
                                type: array
                                items:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                                  description: A Schema for tax positions for imported invoices
                                  type: object
                                  properties:
                                    id:
                                      type:
                                        - integer
                                        - 'null'
                                      exclusiveMinimum: 0
                                      deprecated: true
                                      description: identifier of the object. "uuid" should be used instead
                                    uuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    accountNumber:
                                      type: integer
                                      minimum: 1000
                                      maximum: 999999999999
                                      deprecated: true
                                      description: The booking account number. Use bookingAccountUuid instead.
                                    bookingAccountUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    isTaxIncluded:
                                      type: boolean
                                      default: false
                                      description: controls if amount already includes tax or not
                                    amount:
                                      type: number
                                    taxRate:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                      deprecated: true
                                      description: Tax Rate to apply. Use "taxRateUuid" instead
                                    taxRateUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                  required:
                                    - amount
                                minItems: 1
                              reference:
                                type:
                                  - string
                                maxLength: 255
                              publicNotes:
                                type:
                                  - 'null'
                                  - string
                            required:
                              - currencyCode
                              - receiver
                              - invoiceDate
                              - dueDate
                              - paymentInstructions
                              - documentTotal
                              - taxPositions
                        required:
                          - documentFile
                      minItems: 1
                  required:
                    - documents
                  $defs:
                    singleDocument:
                      type: object
                      properties:
                        documentFile:
                          type: string
                          description: The file name when uploading the document as multipart request
                        documentData:
                          type: object
                          description: Additional Data for the invoice document
                          properties:
                            currencyCode:
                              type: string
                              pattern: ^[A-Z]{3}$
                            receiver:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                              description: Invoice Receiver for AbaNinja Invoice Json
                              type: object
                              $defs:
                                personAddress:
                                  type: object
                                  properties:
                                    addressUuid:
                                      type: string
                                      format: uuid
                                    personUuid:
                                      type: string
                                      format: uuid
                                    deliveryAddressUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                  required:
                                    - addressUuid
                                    - personUuid
                                companyAddress:
                                  type: object
                                  properties:
                                    addressUuid:
                                      type: string
                                      format: uuid
                                    companyUuid:
                                      type: string
                                      format: uuid
                                    contactPersonUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                      description: UUID of contact person inside company
                                    deliveryAddressUuid:
                                      type:
                                        - 'null'
                                        - string
                                      format: uuid
                                    additionalReceivers:
                                      type: array
                                      maxItems: 5
                                      items:
                                        type: object
                                        properties:
                                          personUuid:
                                            type: string
                                            format: uuid
                                            description: UUID of contact person inside given company
                                        required:
                                          - personUuid
                                        additionalProperties: false
                                  required:
                                    - addressUuid
                                    - companyUuid
                                additionalCompanyReceiver:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                                customerNumberReceiver:
                                  type: object
                                  properties:
                                    customerNumber:
                                      type: string
                                  required:
                                    - customerNumber
                              properties:
                                addressUuid:
                                  type: string
                                  format: uuid
                                personUuid:
                                  type: string
                                  format: uuid
                                deliveryAddressUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of contact person inside company
                                additionalReceivers:
                                  type: array
                                  maxItems: 5
                                  items:
                                    type: object
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                        description: UUID of contact person inside given company
                                    required:
                                      - personUuid
                                    additionalProperties: false
                                customerNumber:
                                  type: string
                              required:
                                - addressUuid
                                - personUuid
                                - companyUuid
                                - customerNumber
                            invoiceNumber:
                              type:
                                - 'null'
                                - string
                            invoiceDate:
                              type: string
                              format: date
                            dueDate:
                              type: string
                              format: date
                            deliveryDate:
                              type:
                                - 'null'
                                - string
                              format: date
                            paymentInstructions:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                              title: Payment Instructions
                              description: Payment Instruction Schema for AbaNinja Invoice Json
                              $defs:
                                ibanInstruction:
                                  title: IBAN
                                  type: object
                                  properties:
                                    iban:
                                      type: string
                                      pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                    bic:
                                      type:
                                        - 'null'
                                        - string
                                      pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                    reference:
                                      type:
                                        - 'null'
                                        - string
                                      pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                      description: SCOR Reference
                                  required:
                                    - iban
                                  if:
                                    properties:
                                      iban:
                                        not:
                                          pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                                  then:
                                    required:
                                      - bic
                                qrIbanInstruction:
                                  title: QR-IBAN
                                  type: object
                                  properties:
                                    qrIban:
                                      type: string
                                      pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                    reference:
                                      type:
                                        - 'null'
                                        - string
                                      pattern: ^[0-9]{2,27}$
                                      description: QRR Reference
                                  required:
                                    - qrIban
                                bankAccountReference:
                                  title: Bank Account UUID
                                  type: object
                                  properties:
                                    bankAccountUuid:
                                      type: string
                                      format: uuid
                                      description: Identifier of the bank account
                                    reference:
                                      type:
                                        - 'null'
                                        - string
                                      pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                      description: QRR or SCOR Reference
                                  required:
                                    - bankAccountUuid
                              properties:
                                iban:
                                  type: string
                                  pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                bic:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                  description: QRR or SCOR Reference
                                qrIban:
                                  type: string
                                  pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                  description: Identifier of the bank account
                              required:
                                - iban
                                - qrIban
                                - bankAccountUuid
                            documentTotal:
                              type: number
                              description: Total Amount incl. VAT
                            taxPositions:
                              type: array
                              items:
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                                description: A Schema for tax positions for imported invoices
                                type: object
                                properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    exclusiveMinimum: 0
                                    deprecated: true
                                    description: identifier of the object. "uuid" should be used instead
                                  uuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  accountNumber:
                                    type: integer
                                    minimum: 1000
                                    maximum: 999999999999
                                    deprecated: true
                                    description: The booking account number. Use bookingAccountUuid instead.
                                  bookingAccountUuid:
                                    type:
                                      - string
                                      - 'null'
                                    format: uuid
                                  isTaxIncluded:
                                    type: boolean
                                    default: false
                                    description: controls if amount already includes tax or not
                                  amount:
                                    type: number
                                  taxRate:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                    deprecated: true
                                    description: Tax Rate to apply. Use "taxRateUuid" instead
                                  taxRateUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                required:
                                  - amount
                              minItems: 1
                            reference:
                              type:
                                - string
                              maxLength: 255
                            publicNotes:
                              type:
                                - 'null'
                                - string
                          required:
                            - currencyCode
                            - receiver
                            - invoiceDate
                            - dueDate
                            - paymentInstructions
                            - documentTotal
                            - taxPositions
                      required:
                        - documentFile
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  maximum: 5
                  minimum: 1
              type: object
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/import-invoice.schema.json
              description: A Schema for importing invoice pdfs in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      documentUrl:
                        type: string
                        format: uri
                        description: The url where to download the document file to import
                      documentData:
                        type: object
                        description: Additional Data for the invoice document
                        properties:
                          currencyCode:
                            type: string
                            pattern: ^[A-Z]{3}$
                          receiver:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                            description: Invoice Receiver for AbaNinja Invoice Json
                            type: object
                            $defs:
                              personAddress:
                                type: object
                                properties:
                                  addressUuid:
                                    type: string
                                    format: uuid
                                  personUuid:
                                    type: string
                                    format: uuid
                                  deliveryAddressUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                required:
                                  - addressUuid
                                  - personUuid
                              companyAddress:
                                type: object
                                properties:
                                  addressUuid:
                                    type: string
                                    format: uuid
                                  companyUuid:
                                    type: string
                                    format: uuid
                                  contactPersonUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of contact person inside company
                                  deliveryAddressUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                  additionalReceivers:
                                    type: array
                                    maxItems: 5
                                    items:
                                      type: object
                                      properties:
                                        personUuid:
                                          type: string
                                          format: uuid
                                          description: UUID of contact person inside given company
                                      required:
                                        - personUuid
                                      additionalProperties: false
                                required:
                                  - addressUuid
                                  - companyUuid
                              additionalCompanyReceiver:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                              customerNumberReceiver:
                                type: object
                                properties:
                                  customerNumber:
                                    type: string
                                required:
                                  - customerNumber
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              personUuid:
                                type: string
                                format: uuid
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                              companyUuid:
                                type: string
                                format: uuid
                              contactPersonUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of contact person inside company
                              additionalReceivers:
                                type: array
                                maxItems: 5
                                items:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                              customerNumber:
                                type: string
                            required:
                              - addressUuid
                              - personUuid
                              - companyUuid
                              - customerNumber
                          invoiceNumber:
                            type:
                              - 'null'
                              - string
                          invoiceDate:
                            type: string
                            format: date
                          dueDate:
                            type: string
                            format: date
                          deliveryDate:
                            type:
                              - 'null'
                              - string
                            format: date
                          paymentInstructions:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                            title: Payment Instructions
                            description: Payment Instruction Schema for AbaNinja Invoice Json
                            $defs:
                              ibanInstruction:
                                title: IBAN
                                type: object
                                properties:
                                  iban:
                                    type: string
                                    pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                  bic:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                    description: SCOR Reference
                                required:
                                  - iban
                                if:
                                  properties:
                                    iban:
                                      not:
                                        pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                                then:
                                  required:
                                    - bic
                              qrIbanInstruction:
                                title: QR-IBAN
                                type: object
                                properties:
                                  qrIban:
                                    type: string
                                    pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^[0-9]{2,27}$
                                    description: QRR Reference
                                required:
                                  - qrIban
                              bankAccountReference:
                                title: Bank Account UUID
                                type: object
                                properties:
                                  bankAccountUuid:
                                    type: string
                                    format: uuid
                                    description: Identifier of the bank account
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                    description: QRR or SCOR Reference
                                required:
                                  - bankAccountUuid
                            properties:
                              iban:
                                type: string
                                pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                              bic:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                description: QRR or SCOR Reference
                              qrIban:
                                type: string
                                pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                              bankAccountUuid:
                                type: string
                                format: uuid
                                description: Identifier of the bank account
                            required:
                              - iban
                              - qrIban
                              - bankAccountUuid
                          documentTotal:
                            type: number
                            description: Total Amount incl. VAT
                          taxPositions:
                            type: array
                            items:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                              description: A Schema for tax positions for imported invoices
                              type: object
                              properties:
                                id:
                                  type:
                                    - integer
                                    - 'null'
                                  exclusiveMinimum: 0
                                  deprecated: true
                                  description: identifier of the object. "uuid" should be used instead
                                uuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                accountNumber:
                                  type: integer
                                  minimum: 1000
                                  maximum: 999999999999
                                  deprecated: true
                                  description: The booking account number. Use bookingAccountUuid instead.
                                bookingAccountUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                isTaxIncluded:
                                  type: boolean
                                  default: false
                                  description: controls if amount already includes tax or not
                                amount:
                                  type: number
                                taxRate:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                                  deprecated: true
                                  description: Tax Rate to apply. Use "taxRateUuid" instead
                                taxRateUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                              required:
                                - amount
                            minItems: 1
                          reference:
                            type:
                              - string
                            maxLength: 255
                          publicNotes:
                            type:
                              - 'null'
                              - string
                          hasCustomPaymentSlip:
                            type: boolean
                            default: false
                            description: >-
                              if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja
                              (false)
                        required:
                          - currencyCode
                          - receiver
                          - invoiceDate
                          - dueDate
                          - paymentInstructions
                          - documentTotal
                          - taxPositions
                    required:
                      - documentUrl
                  minItems: 1
              required:
                - documents
              $defs:
                singleDocument:
                  type: object
                  properties:
                    documentUrl:
                      type: string
                      format: uri
                      description: The url where to download the document file to import
                    documentData:
                      type: object
                      description: Additional Data for the invoice document
                      properties:
                        currencyCode:
                          type: string
                          pattern: ^[A-Z]{3}$
                        receiver:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                          description: Invoice Receiver for AbaNinja Invoice Json
                          type: object
                          $defs:
                            personAddress:
                              type: object
                              properties:
                                addressUuid:
                                  type: string
                                  format: uuid
                                personUuid:
                                  type: string
                                  format: uuid
                                deliveryAddressUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                              required:
                                - addressUuid
                                - personUuid
                            companyAddress:
                              type: object
                              properties:
                                addressUuid:
                                  type: string
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of contact person inside company
                                deliveryAddressUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                additionalReceivers:
                                  type: array
                                  maxItems: 5
                                  items:
                                    type: object
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                        description: UUID of contact person inside given company
                                    required:
                                      - personUuid
                                    additionalProperties: false
                              required:
                                - addressUuid
                                - companyUuid
                            additionalCompanyReceiver:
                              type: object
                              properties:
                                personUuid:
                                  type: string
                                  format: uuid
                                  description: UUID of contact person inside given company
                              required:
                                - personUuid
                              additionalProperties: false
                            customerNumberReceiver:
                              type: object
                              properties:
                                customerNumber:
                                  type: string
                              required:
                                - customerNumber
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            personUuid:
                              type: string
                              format: uuid
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                            companyUuid:
                              type: string
                              format: uuid
                            contactPersonUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of contact person inside company
                            additionalReceivers:
                              type: array
                              maxItems: 5
                              items:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                            customerNumber:
                              type: string
                          required:
                            - addressUuid
                            - personUuid
                            - companyUuid
                            - customerNumber
                        invoiceNumber:
                          type:
                            - 'null'
                            - string
                        invoiceDate:
                          type: string
                          format: date
                        dueDate:
                          type: string
                          format: date
                        deliveryDate:
                          type:
                            - 'null'
                            - string
                          format: date
                        paymentInstructions:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                          title: Payment Instructions
                          description: Payment Instruction Schema for AbaNinja Invoice Json
                          $defs:
                            ibanInstruction:
                              title: IBAN
                              type: object
                              properties:
                                iban:
                                  type: string
                                  pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                bic:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                  description: SCOR Reference
                              required:
                                - iban
                              if:
                                properties:
                                  iban:
                                    not:
                                      pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                              then:
                                required:
                                  - bic
                            qrIbanInstruction:
                              title: QR-IBAN
                              type: object
                              properties:
                                qrIban:
                                  type: string
                                  pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^[0-9]{2,27}$
                                  description: QRR Reference
                              required:
                                - qrIban
                            bankAccountReference:
                              title: Bank Account UUID
                              type: object
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                  description: Identifier of the bank account
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                  description: QRR or SCOR Reference
                              required:
                                - bankAccountUuid
                          properties:
                            iban:
                              type: string
                              pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                            bic:
                              type:
                                - 'null'
                                - string
                              pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                              description: QRR or SCOR Reference
                            qrIban:
                              type: string
                              pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                            bankAccountUuid:
                              type: string
                              format: uuid
                              description: Identifier of the bank account
                          required:
                            - iban
                            - qrIban
                            - bankAccountUuid
                        documentTotal:
                          type: number
                          description: Total Amount incl. VAT
                        taxPositions:
                          type: array
                          items:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                            description: A Schema for tax positions for imported invoices
                            type: object
                            properties:
                              id:
                                type:
                                  - integer
                                  - 'null'
                                exclusiveMinimum: 0
                                deprecated: true
                                description: identifier of the object. "uuid" should be used instead
                              uuid:
                                type:
                                  - string
                                  - 'null'
                                format: uuid
                              accountNumber:
                                type: integer
                                minimum: 1000
                                maximum: 999999999999
                                deprecated: true
                                description: The booking account number. Use bookingAccountUuid instead.
                              bookingAccountUuid:
                                type:
                                  - string
                                  - 'null'
                                format: uuid
                              isTaxIncluded:
                                type: boolean
                                default: false
                                description: controls if amount already includes tax or not
                              amount:
                                type: number
                              taxRate:
                                type: number
                                minimum: 0
                                maximum: 100
                                deprecated: true
                                description: Tax Rate to apply. Use "taxRateUuid" instead
                              taxRateUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                            required:
                              - amount
                          minItems: 1
                        reference:
                          type:
                            - string
                          maxLength: 255
                        publicNotes:
                          type:
                            - 'null'
                            - string
                        hasCustomPaymentSlip:
                          type: boolean
                          default: false
                          description: >-
                            if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja
                            (false)
                      required:
                        - currencyCode
                        - receiver
                        - invoiceDate
                        - dueDate
                        - paymentInstructions
                        - documentTotal
                        - taxPositions
                  required:
                    - documentUrl
      responses:
        '201':
          description: Invoice created
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          title: Imported Invoice Resource
                          properties:
                            documentUrl:
                              type:
                                - string
                                - 'null'
                              format: uri
                            documentData:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                currencyCode:
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                currencyCodeRecognized:
                                  description: >-
                                    when importing invoices and detecting the currency, this field contains the detected
                                    value
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                reference:
                                  type: string
                                publicNotes:
                                  type:
                                    - string
                                    - 'null'
                                receiver:
                                  properties:
                                    addressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    companyUuid:
                                      type: string
                                      format: uuid
                                    networkUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    networkKey:
                                      type:
                                        - string
                                        - 'null'
                                    networkName:
                                      type:
                                        - string
                                        - 'null'
                                    deliveryAddressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    contactPersonUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          personUuid:
                                            type: string
                                            format: uuid
                                        type: object
                                    receiverInformation:
                                      title: Receiver Information Resource
                                      description: Receiver information resource
                                      properties:
                                        customerNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        email:
                                          type:
                                            - string
                                            - 'null'
                                          format: email
                                          readOnly: true
                                        language:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                          enum:
                                            - de
                                            - en
                                            - fr
                                            - it
                                        deliveryAddress:
                                          properties:
                                            companyName:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            name:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            nameWithSalutation:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            careOfAddress:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            address:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            extension:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            houseNumber:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            zipCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            city:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            countryCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                          type: object
                                          readOnly: true
                                        additionalReceivers:
                                          type: array
                                          items:
                                            properties:
                                              fullName:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                              email:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                            type: object
                                          readOnly: true
                                      type: object
                                    personUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                invoiceNumber:
                                  description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                                  type: string
                                  deprecated: true
                                importedInvoiceNumber:
                                  description: The recognized invoiceNumber of the imported document
                                  type:
                                    - string
                                    - 'null'
                                systemInvoiceNumber:
                                  description: The invoiceNumber generated by AbaNinja
                                  type: string
                                invoiceDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dueDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                deliveryDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                nextDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                customDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dunningLevel:
                                  type: string
                                  enum:
                                    - REMINDER
                                    - FIRST_DUNNING
                                    - FINAL_DUNNING
                                    - NO_DUNNING
                                sentStatus:
                                  type: string
                                  enum:
                                    - OPEN
                                    - SENDING
                                    - ERROR
                                    - SENT
                                status:
                                  type: string
                                  enum:
                                    - draft
                                    - open
                                    - sending
                                    - send-failed
                                    - sent
                                    - viewed
                                    - approved
                                    - declined
                                    - partial
                                    - paid
                                    - in-payment
                                    - collected
                                    - planned
                                    - pending
                                    - archived
                                    - cancelled
                                    - converted
                                    - due
                                    - reminder
                                    - first-dunning
                                    - second-dunning
                                    - final-dunning
                                    - inactive
                                    - active
                                    - inbox
                                    - expired
                                    - done
                                    - assign
                                    - awaiting-payment
                                    - error
                                paymentInstructions:
                                  properties:
                                    bankAccountUuid:
                                      type: string
                                      format: uuid
                                    iban:
                                      type: string
                                    bic:
                                      type:
                                        - string
                                        - 'null'
                                    qrIban:
                                      type: string
                                    reference:
                                      type:
                                        - string
                                        - 'null'
                                documentTotal:
                                  type: number
                                  format: float
                                taxPositions:
                                  type: array
                                  items:
                                    title: Tax Position Resource
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      id:
                                        type: number
                                        format: int64
                                        deprecated: true
                                      accountNumber:
                                        type:
                                          - number
                                          - 'null'
                                        format: int64
                                        deprecated: true
                                      bookingAccountUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      isTaxIncluded:
                                        type: boolean
                                      amount:
                                        type: number
                                        format: float
                                      taxRate:
                                        type: number
                                        format: float
                                        deprecated: true
                                      vatUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                        deprecated: true
                                      taxRateUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      vat:
                                        properties:
                                          percentage:
                                            type: number
                                            format: float
                                          amount:
                                            type:
                                              - number
                                              - 'null'
                                            format: float
                                        type: object
                                    type: object
                                isTemplate:
                                  type: boolean
                                openAmount:
                                  type: number
                                  format: float
                                type:
                                  type: string
                                  enum:
                                    - invoice
                                subtype:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - partial
                                    - final
                                    - on_account
                                    - instalment
                                    - dunning
                                abanetSendAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                abanetConfirmedAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                wasRecognitionLimitReached:
                                  type: boolean
                                hasCustomPaymentSlip:
                                  description: >-
                                    if the invoice has a custom payment slip (true) or if it will be generated by
                                    AbaNinja (false)
                                  type: boolean
                              type: object
                          type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 201
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '202':
          description: Asynchronous processing
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Asynchronous Import Resource
                    description: Resource for asynchronous document imports
                    properties:
                      status:
                        type: string
                        format: uri
                      queueUuid:
                        type: string
                        format: uuid
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 202
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: e9b69e6c492f9b24d798b7c5ef0f86fc
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/{type}/{invoiceUuid}/preview:
    post:
      tags:
        - document-invoices
        - document-contract-notes
        - document-recurring-invoices
        - document-quotes
        - document-delivery-notes
        - document-credit-notes
      summary: Create preview
      description: Creates a new PDF preview for a document or returns the sent PDF if one exists
      operationId: documents_create_preview
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: type
          in: path
          description: Type of the document
          required: true
          schema:
            type: string
            enum:
              - invoices
              - contract-notes
              - recurring-invoices
              - quotes
              - delivery-notes
              - credit-notes
      requestBody:
        description: >-
          Create a PDF preview for a document overwriting the stored values. Omit to simply return the PDF for stored
          values.
        required: false
        content:
          application/json:
            schema:
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      isTemplate:
                        const: true
                      creditNoteDate:
                        type: string
                        format: date
                      dueDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      pricesIncludeVat:
                        type: boolean
                        description: Controls if single_price and position_total includes vat or not
                      documentTotal:
                        type: number
                        description: Total Amount incl. VAT
                        deprecated: true
                      positions:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                          description: Schema for an invoice position item for the AbaNinja API
                          type: object
                          properties:
                            positionNumber:
                              type: integer
                              minimum: 1
                              description: >-
                                Defines order of the position inside position table. 1=first position, 2=second
                                position. Must be a unique value otherwise unexpected sorting can occur
                            uuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                              description: UUID to use. Especially needed for updating positions without re-creating them
                            kind:
                              const: page_break
                            unitUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: >-
                                UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                                "unitCode"
                            unitCode:
                              type:
                                - 'null'
                                - string
                              description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                              default: C62
                              deprecated: true
                            quantity:
                              type:
                                - number
                                - 'null'
                              default: 1
                            singlePrice:
                              type:
                                - number
                                - 'null'
                              description: Defaults to the products price if given. Otherwise 0.00.
                            discount:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                              description: Discount Object Schema for AbaNinja Invoice Json
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                amount:
                                  type: number
                                  minimum: 0
                              required:
                                - percentage
                                - amount
                            vatUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of VAT to use. Takes precedence over "vat"
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                            productUuid: false
                            productNumber:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The productNumber to set. If an existing products number is used, the actual product
                                will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                "unitCode"
                            productDescription:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Required if there is no existing product with the given productNumber or the
                                productNumber is not sent
                            title:
                              type: string
                              maximum: 255
                            text:
                              type: string
                              maximum: 255
                            items:
                              type: array
                              items:
                                properties:
                                  positionNumber:
                                    type: integer
                                    minimum: 1
                                    description: >-
                                      Defines order of the position inside position table. 1=first position, 2=second
                                      position. Must be a unique value otherwise unexpected sorting can occur
                                  kind:
                                    const: product
                                  unitUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: >-
                                      UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                      precedence over "unitCode"
                                  unitCode:
                                    type:
                                      - 'null'
                                      - string
                                    description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                    default: C62
                                    deprecated: true
                                  quantity:
                                    type:
                                      - number
                                      - 'null'
                                    default: 1
                                  singlePrice:
                                    type:
                                      - number
                                      - 'null'
                                    description: Defaults to the products price if given. Otherwise 0.00.
                                  discount:
                                    $schema: https://json-schema.org/draft/2020-12/schema
                                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                    description: Discount Object Schema for AbaNinja Invoice Json
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                      amount:
                                        type: number
                                        minimum: 0
                                    required:
                                      - percentage
                                      - amount
                                  vatUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of VAT to use. Takes precedence over "vat"
                                  vat:
                                    type:
                                      - 'null'
                                      - object
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                        maximum: 100
                                    required:
                                      - percentage
                                  productUuid: false
                                  productNumber:
                                    type:
                                      - string
                                      - 'null'
                                    maxLength: 255
                                    description: >-
                                      The productNumber to set. If an existing products number is used, the actual
                                      product will be linked and its unit will be used. Takes precedence over "unitUuid"
                                      and "unitCode"
                                  productDescription:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Required if there is no existing product with the given productNumber or the
                                      productNumber is not sent
                                required:
                                  - kind
                                  - productUuid
                                  - singlePrice
                                  - productDescription
                              minItems: 1
                              description: Only Items with the same VAT rate are allowed in a group
                            showCollapsed:
                              type: boolean
                              default: true
                          $defs:
                            productPosition:
                              type: object
                              properties:
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            subtitlePosition:
                              type: object
                              properties:
                                kind:
                                  const: subtitle
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - title
                            textPosition:
                              type: object
                              properties:
                                kind:
                                  const: text
                                text:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                                - text
                            sectionTotalPosition:
                              type: object
                              properties:
                                kind:
                                  const: section_total
                                title:
                                  type: string
                                  maximum: 255
                              required:
                                - kind
                            dividerPosition:
                              type: object
                              properties:
                                kind:
                                  const: divider
                              required:
                                - kind
                            pageBreakPosition:
                              type: object
                              properties:
                                kind:
                                  const: page_break
                              required:
                                - kind
                            groupPosition:
                              type: object
                              properties:
                                kind:
                                  const: group
                                title:
                                  type: string
                                  maximum: 255
                                items:
                                  type: array
                                  items:
                                    properties:
                                      positionNumber:
                                        type: integer
                                        minimum: 1
                                        description: >-
                                          Defines order of the position inside position table. 1=first position,
                                          2=second position. Must be a unique value otherwise unexpected sorting can
                                          occur
                                      kind:
                                        const: product
                                      unitUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: >-
                                          UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes
                                          precedence over "unitCode"
                                      unitCode:
                                        type:
                                          - 'null'
                                          - string
                                        description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                        default: C62
                                        deprecated: true
                                      quantity:
                                        type:
                                          - number
                                          - 'null'
                                        default: 1
                                      singlePrice:
                                        type:
                                          - number
                                          - 'null'
                                        description: Defaults to the products price if given. Otherwise 0.00.
                                      discount:
                                        $schema: https://json-schema.org/draft/2020-12/schema
                                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                        description: Discount Object Schema for AbaNinja Invoice Json
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                          amount:
                                            type: number
                                            minimum: 0
                                        required:
                                          - percentage
                                          - amount
                                      vatUuid:
                                        type:
                                          - 'null'
                                          - string
                                        format: uuid
                                        description: UUID of VAT to use. Takes precedence over "vat"
                                      vat:
                                        type:
                                          - 'null'
                                          - object
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                            maximum: 100
                                        required:
                                          - percentage
                                      productUuid: false
                                      productNumber:
                                        type:
                                          - string
                                          - 'null'
                                        maxLength: 255
                                        description: >-
                                          The productNumber to set. If an existing products number is used, the actual
                                          product will be linked and its unit will be used. Takes precedence over
                                          "unitUuid" and "unitCode"
                                      productDescription:
                                        type:
                                          - string
                                          - 'null'
                                        description: >-
                                          Required if there is no existing product with the given productNumber or the
                                          productNumber is not sent
                                    required:
                                      - kind
                                      - productUuid
                                      - singlePrice
                                      - productDescription
                                  minItems: 1
                                  description: Only Items with the same VAT rate are allowed in a group
                                showCollapsed:
                                  type: boolean
                                  default: true
                              required:
                                - kind
                                - title
                                - items
                          required:
                            - kind
                            - productUuid
                            - singlePrice
                            - productDescription
                            - title
                            - text
                            - items
                        minItems: 1
                      documentDiscount:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                        description: Discount Object Schema for AbaNinja Invoice Json
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                          amount:
                            type: number
                            minimum: 0
                        required:
                          - percentage
                          - amount
                      currencyCode:
                        type: string
                        pattern: ^[A-Z]{3}$
                      title:
                        type:
                          - 'null'
                          - string
                        maxLength: 75
                      reference:
                        type:
                          - string
                        maxLength: 255
                      customField1:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField2:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField3:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      customField4:
                        type:
                          - 'null'
                          - string
                        maxLength: 255
                      terms:
                        type:
                          - string
                      publicNotes:
                        type:
                          - 'null'
                          - string
                      footerText:
                        type:
                          - 'null'
                          - string
                      receiver:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                        description: Invoice Receiver for AbaNinja Invoice Json
                        type: object
                        $defs:
                          personAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              personUuid:
                                type: string
                                format: uuid
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                            required:
                              - addressUuid
                              - personUuid
                          companyAddress:
                            type: object
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              companyUuid:
                                type: string
                                format: uuid
                              contactPersonUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of contact person inside company
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                              additionalReceivers:
                                type: array
                                maxItems: 5
                                items:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                            required:
                              - addressUuid
                              - companyUuid
                          additionalCompanyReceiver:
                            type: object
                            properties:
                              personUuid:
                                type: string
                                format: uuid
                                description: UUID of contact person inside given company
                            required:
                              - personUuid
                            additionalProperties: false
                          customerNumberReceiver:
                            type: object
                            properties:
                              customerNumber:
                                type: string
                            required:
                              - customerNumber
                        properties:
                          addressUuid:
                            type: string
                            format: uuid
                          personUuid:
                            type: string
                            format: uuid
                          deliveryAddressUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                          companyUuid:
                            type: string
                            format: uuid
                          contactPersonUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of contact person inside company
                          additionalReceivers:
                            type: array
                            maxItems: 5
                            items:
                              type: object
                              properties:
                                personUuid:
                                  type: string
                                  format: uuid
                                  description: UUID of contact person inside given company
                              required:
                                - personUuid
                              additionalProperties: false
                          customerNumber:
                            type: string
                        required:
                          - addressUuid
                          - personUuid
                          - companyUuid
                          - customerNumber
                    required:
                      - creditNoteDate
                      - pricesIncludeVat
                      - positions
                      - currencyCode
                      - isTemplate
                      - receiver
                  minItems: 1
                  maxItems: 1
      responses:
        '201':
          description: Created a preview PDF
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Created Preview Resource
                    description: Created PDF preview
                    properties:
                      previewUrl:
                        type: string
                        format: uri
                      downloadUrl:
                        type: string
                        format: uri
                      expiresAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 201
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 82f90a22d3bd897616be85162928664b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/{type}/preview/{previewUuid}:
    get:
      tags:
        - document-invoices
        - document-contract-notes
        - document-recurring-invoices
        - document-quotes
        - document-delivery-notes
        - document-credit-notes
      summary: Show PDF Preview
      description: Returns a previously created PDF preview file
      operationId: documents_get_preview
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: previewUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: type
          in: path
          description: Type of the document
          required: true
          schema:
            type: string
            enum:
              - invoices
              - contract-notes
              - recurring-invoices
              - quotes
              - delivery-notes
              - credit-notes
        - name: forceDownload
          in: query
          description: 'If true, then the file shall be sent as Content-Disposition: attachment'
          required: false
          schema:
            type: boolean
            default: false
        - name: cert
          in: query
          description: Signature parameter, generated and returned when creating preview
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          headers:
            Content-Type:
              schema:
                type: string
                enum:
                  - application/pdf
            Content-Disposition:
              description: '"inline" or "attachment", based on the forceDownload query param'
              schema:
                type: string
                example: attachment; filename="invoice-preview.pdf"
          content:
            application/pdf:
              schema:
                type: string
                format: binary
        '403':
          description: Invalid signature
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Preview not available anymore
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security: []
      x-legacy-operation-id: 8d06ad9a9255dd0c78752532e7de7c76
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/calculate:
    post:
      tags:
        - document-invoices
      summary: Calculate amounts of an existing document
      description: Calculates the amounts of an existing document for previewing without manipulating any resources
      operationId: documents_create_calculate_8
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Document to calculate
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/invoice-calculate.schema.json
              description: A Schema for calculating invoices in AbaNinja over API
              type: object
              properties:
                currencyCode:
                  type: string
                  pattern: ^[A-Z]{3}$
                positions:
                  type: array
                  items:
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json
                    description: Schema for an invoice position item for the AbaNinja API
                    type: object
                    properties:
                      positionNumber:
                        type: integer
                        minimum: 1
                        description: >-
                          Defines order of the position inside position table. 1=first position, 2=second position. Must
                          be a unique value otherwise unexpected sorting can occur
                      uuid:
                        type:
                          - string
                          - 'null'
                        format: uuid
                        description: UUID to use. Especially needed for updating positions without re-creating them
                      kind:
                        const: page_break
                      unitUuid:
                        type:
                          - 'null'
                          - string
                        format: uuid
                        description: >-
                          UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                          "unitCode"
                      unitCode:
                        type:
                          - 'null'
                          - string
                        description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                        default: C62
                        deprecated: true
                      quantity:
                        type:
                          - number
                          - 'null'
                        default: 1
                      singlePrice:
                        type:
                          - number
                          - 'null'
                        description: Defaults to the products price if given. Otherwise 0.00.
                      discount:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                        description: Discount Object Schema for AbaNinja Invoice Json
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                          amount:
                            type: number
                            minimum: 0
                        required:
                          - percentage
                          - amount
                      vatUuid:
                        type:
                          - 'null'
                          - string
                        format: uuid
                        description: UUID of VAT to use. Takes precedence over "vat"
                      vat:
                        type:
                          - 'null'
                          - object
                        properties:
                          percentage:
                            type: number
                            minimum: 0
                            maximum: 100
                        required:
                          - percentage
                      productUuid: false
                      productNumber:
                        type:
                          - string
                          - 'null'
                        maxLength: 255
                        description: >-
                          The productNumber to set. If an existing products number is used, the actual product will be
                          linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                      productDescription:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Required if there is no existing product with the given productNumber or the productNumber is
                          not sent
                      title:
                        type: string
                        maximum: 255
                      text:
                        type: string
                        maximum: 255
                      items:
                        type: array
                        items:
                          properties:
                            positionNumber:
                              type: integer
                              minimum: 1
                              description: >-
                                Defines order of the position inside position table. 1=first position, 2=second
                                position. Must be a unique value otherwise unexpected sorting can occur
                            kind:
                              const: product
                            unitUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: >-
                                UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                                "unitCode"
                            unitCode:
                              type:
                                - 'null'
                                - string
                              description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                              default: C62
                              deprecated: true
                            quantity:
                              type:
                                - number
                                - 'null'
                              default: 1
                            singlePrice:
                              type:
                                - number
                                - 'null'
                              description: Defaults to the products price if given. Otherwise 0.00.
                            discount:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                              description: Discount Object Schema for AbaNinja Invoice Json
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                amount:
                                  type: number
                                  minimum: 0
                              required:
                                - percentage
                                - amount
                            vatUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of VAT to use. Takes precedence over "vat"
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                            productUuid: false
                            productNumber:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The productNumber to set. If an existing products number is used, the actual product
                                will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                "unitCode"
                            productDescription:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Required if there is no existing product with the given productNumber or the
                                productNumber is not sent
                          required:
                            - kind
                            - productUuid
                            - singlePrice
                            - productDescription
                        minItems: 1
                        description: Only Items with the same VAT rate are allowed in a group
                      showCollapsed:
                        type: boolean
                        default: true
                    $defs:
                      productPosition:
                        type: object
                        properties:
                          kind:
                            const: product
                          unitUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: >-
                              UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over
                              "unitCode"
                          unitCode:
                            type:
                              - 'null'
                              - string
                            description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                            default: C62
                            deprecated: true
                          quantity:
                            type:
                              - number
                              - 'null'
                            default: 1
                          singlePrice:
                            type:
                              - number
                              - 'null'
                            description: Defaults to the products price if given. Otherwise 0.00.
                          discount:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                            description: Discount Object Schema for AbaNinja Invoice Json
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                              amount:
                                type: number
                                minimum: 0
                            required:
                              - percentage
                              - amount
                          vatUuid:
                            type:
                              - 'null'
                              - string
                            format: uuid
                            description: UUID of VAT to use. Takes precedence over "vat"
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                          productUuid: false
                          productNumber:
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            description: >-
                              The productNumber to set. If an existing products number is used, the actual product will
                              be linked and its unit will be used. Takes precedence over "unitUuid" and "unitCode"
                          productDescription:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Required if there is no existing product with the given productNumber or the productNumber
                              is not sent
                        required:
                          - kind
                          - productUuid
                          - singlePrice
                          - productDescription
                      subtitlePosition:
                        type: object
                        properties:
                          kind:
                            const: subtitle
                          title:
                            type: string
                            maximum: 255
                        required:
                          - kind
                          - title
                      textPosition:
                        type: object
                        properties:
                          kind:
                            const: text
                          text:
                            type: string
                            maximum: 255
                        required:
                          - kind
                          - text
                      sectionTotalPosition:
                        type: object
                        properties:
                          kind:
                            const: section_total
                          title:
                            type: string
                            maximum: 255
                        required:
                          - kind
                      dividerPosition:
                        type: object
                        properties:
                          kind:
                            const: divider
                        required:
                          - kind
                      pageBreakPosition:
                        type: object
                        properties:
                          kind:
                            const: page_break
                        required:
                          - kind
                      groupPosition:
                        type: object
                        properties:
                          kind:
                            const: group
                          title:
                            type: string
                            maximum: 255
                          items:
                            type: array
                            items:
                              properties:
                                positionNumber:
                                  type: integer
                                  minimum: 1
                                  description: >-
                                    Defines order of the position inside position table. 1=first position, 2=second
                                    position. Must be a unique value otherwise unexpected sorting can occur
                                kind:
                                  const: product
                                unitUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: >-
                                    UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence
                                    over "unitCode"
                                unitCode:
                                  type:
                                    - 'null'
                                    - string
                                  description: 'ISO Code for Unit. Default: unit of the product if given or C62 - Pieces'
                                  default: C62
                                  deprecated: true
                                quantity:
                                  type:
                                    - number
                                    - 'null'
                                  default: 1
                                singlePrice:
                                  type:
                                    - number
                                    - 'null'
                                  description: Defaults to the products price if given. Otherwise 0.00.
                                discount:
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                                  description: Discount Object Schema for AbaNinja Invoice Json
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                    amount:
                                      type: number
                                      minimum: 0
                                  required:
                                    - percentage
                                    - amount
                                vatUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of VAT to use. Takes precedence over "vat"
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                productUuid: false
                                productNumber:
                                  type:
                                    - string
                                    - 'null'
                                  maxLength: 255
                                  description: >-
                                    The productNumber to set. If an existing products number is used, the actual product
                                    will be linked and its unit will be used. Takes precedence over "unitUuid" and
                                    "unitCode"
                                productDescription:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Required if there is no existing product with the given productNumber or the
                                    productNumber is not sent
                              required:
                                - kind
                                - productUuid
                                - singlePrice
                                - productDescription
                            minItems: 1
                            description: Only Items with the same VAT rate are allowed in a group
                          showCollapsed:
                            type: boolean
                            default: true
                        required:
                          - kind
                          - title
                          - items
                    required:
                      - kind
                      - productUuid
                      - singlePrice
                      - productDescription
                      - title
                      - text
                      - items
                documentDiscount:
                  $schema: https://json-schema.org/draft/2020-12/schema
                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json
                  description: Discount Object Schema for AbaNinja Invoice Json
                  properties:
                    percentage:
                      type: number
                      minimum: 0
                    amount:
                      type: number
                      minimum: 0
                  required:
                    - percentage
                    - amount
                invoiceDate:
                  type:
                    - string
                    - 'null'
                  format: date
              required:
                - positions
                - currencyCode
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Calculation Resource
                    properties:
                      total:
                        type: number
                        format: float
                      positionTotal:
                        type: number
                        format: float
                      discount:
                        type: number
                        format: float
                      roundingDifference:
                        type: number
                        format: float
                      taxes:
                        type: array
                        items:
                          properties:
                            rate:
                              type: number
                              format: float
                            value:
                              type: number
                              format: float
                            name:
                              type: string
                            baseSum:
                              type: number
                              format: float
                          type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 99e51274059b24273cc1a7a9d2d7b0f4
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/comments:
    get:
      tags:
        - document-invoices
      summary: Get comment collection
      description: fetches comments of a document via pagination
      operationId: documents_list_comments_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 1
            minimum: 1
        - name: perPage
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      title: Document Comment Resource
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        authorUserUuid:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        createdAt:
                          type: string
                          format: date-time
                        userName:
                          type: string
                        comment:
                          type: string
                        type:
                          description: Defines if it is only for internal use or if customers can see the comments
                          type: string
                          enum:
                            - intern
                            - extern
                        isDeletable:
                          description: if the current user can delete the comment
                          type: boolean
                      type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    properties:
                      pagination:
                        properties:
                          currentPage:
                            type: integer
                            minimum: 1
                          firstPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          from:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          lastPage:
                            type: integer
                          lastPageUrl:
                            type: string
                            format: uri
                          nextPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          perPage:
                            type: integer
                            example: 50
                          previousPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          to:
                            type:
                              - integer
                              - 'null'
                            example: 50
                          totalItems:
                            type: integer
                        type: object
                    type: object
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: fcfe8946e7cdae82f6870309cd5c1393
      x-required-scopes:
        - customers
    post:
      tags:
        - document-invoices
      summary: Create comment
      description: creates a new comment on a document either for internal or external use
      operationId: documents_create_comments_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Comment to create
        required: true
        content:
          application/json:
            schema:
              title: Create Document Comment Request
              required:
                - comment
                - type
              properties:
                comment:
                  type: string
                  minLength: 3
                type:
                  description: Defines if it is only for internal use or if customers can see the comments
                  type: string
                  enum:
                    - intern
                    - extern
              type: object
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Document Comment Resource
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      authorUserUuid:
                        type:
                          - string
                          - 'null'
                        format: uuid
                      createdAt:
                        type: string
                        format: date-time
                      userName:
                        type: string
                      comment:
                        type: string
                      type:
                        description: Defines if it is only for internal use or if customers can see the comments
                        type: string
                        enum:
                          - intern
                          - extern
                      isDeletable:
                        description: if the current user can delete the comment
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 201
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 8ea4767deb924e56186994aba0ad53a2
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/files:
    get:
      tags:
        - document-invoices
      summary: Get Files
      description: Returns a list of files
      operationId: documents_list_files_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: page
          in: query
          schema:
            type:
              - integer
              - 'null'
            default: 1
            minimum: 1
        - name: perPage
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: kind
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - invoice
                - invoice_attachment
                - invoice_payments
                - imported_invoice
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      title: Document File Resource
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        name:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        archivedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                        archivedReason:
                          type:
                            - string
                            - 'null'
                          enum:
                            - SENT_NEW_DOCUMENT
                            - CANCELATION
                            - DUNNING
                            - PAYMENT_OFFSET
                            - PAYMENT_CONFIRMED
                            - PAYMENT_CANCELED
                            - MANUAL_RECREATION
                        fileSize:
                          type: integer
                          format: int64
                        mimeType:
                          type: string
                        kind:
                          type: string
                          enum:
                            - invoice
                            - invoice_attachment
                            - invoice_payments
                            - imported_invoice
                      type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    properties:
                      pagination:
                        properties:
                          currentPage:
                            type: integer
                            minimum: 1
                          firstPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          from:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          lastPage:
                            type: integer
                          lastPageUrl:
                            type: string
                            format: uri
                          nextPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          perPage:
                            type: integer
                            example: 50
                          previousPageUrl:
                            type:
                              - string
                              - 'null'
                            format: uri
                          to:
                            type:
                              - integer
                              - 'null'
                            example: 50
                          totalItems:
                            type: integer
                        type: object
                    type: object
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 6fa6ff32d1f63e5d77e0047570be0030
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/actions:
    get:
      tags:
        - document-invoices
      summary: Get actions
      description: Get invoice actions
      operationId: documents_list_actions_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: forList
          in: query
          description: filter list actions
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    example:
                      archive: Archive
                      cancel: Cancel
                      delete: Delete
                    additionalProperties:
                      description: description of the action
                      type: string
                    propertyNames:
                      enum:
                        - paymentAdd
                        - archive
                        - cancel
                        - cancelPermanently
                        - clone
                        - collectInvoice
                        - convertCNDN
                        - convertCNI
                        - convertDNI
                        - convertIC
                        - convertDN
                        - convertT
                        - convertCN
                        - convert
                        - convertTemplateToContractNote
                        - convertTemplateToCreditNote
                        - convertTemplateToDeliveryNote
                        - convertTI
                        - convertTemplateToQuote
                        - convertToTemplate
                        - createFinal
                        - createInstalments
                        - createPartial
                        - createOnAccount
                        - customerPortalUrl
                        - delete
                        - dissolve
                        - downloadPdf
                        - downloadPaymentConfirmation
                        - dunningPrint
                        - dunningSent
                        - dunningDate
                        - setDunningAmounts
                        - edit
                        - activity
                        - info
                        - email
                        - markApproved
                        - markDeclined
                        - markSent
                        - massDownloadZip
                        - massDunningPrint
                        - massDunningSent
                        - massPrint
                        - massSent
                        - offsetCreditNotes
                        - offsetInvoices
                        - offsetReceipts
                        - offsetSupplierCreditNotes
                        - plannedMail
                        - print
                        - regeneratePdf
                        - resync
                        - restore
                        - save
                        - sendPaymentConfirmation
                        - sendAbaNet
                        - sendDeepSign
                        - sign
                        - signSupplierCreditNote
                        - sync
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 66e7004c366931541983e1f9eedc3ac5
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/dunning-preview:
    post:
      tags:
        - document-invoices
      summary: Create dunning preview
      description: Create a PDF preview for a dunning
      operationId: documents_create_dunning_preview
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create a PDF preview for a dunning
        required: true
        content:
          application/json:
            schema:
              title: CreateDunningPdfPreviewRequest
              required:
                - dunningLevel
              properties:
                dunningLevel:
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
              type: object
      responses:
        '201':
          description: Created a preview PDF
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Created Preview Resource
                    description: Created PDF preview
                    properties:
                      previewUrl:
                        type: string
                        format: uri
                      downloadUrl:
                        type: string
                        format: uri
                      expiresAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 201
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: da94c9c1a86eaff6ce08ec6a22a7a660
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/dunnings:
    get:
      tags:
        - document-invoices
      summary: Get Dunnings
      description: Lists all active dunnings of a document
      operationId: documents_list_dunnings
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      title: Invoice Collection Item Resource
                      description: Resource used in collections
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        id:
                          type: number
                          format: int64
                          deprecated: true
                        currencyCode:
                          type:
                            - string
                            - 'null'
                          format: iso-4217
                          maxLength: 3
                          minLength: 3
                        currencyCodeRecognized:
                          description: when importing invoices and detecting the currency, this field contains the detected value
                          type:
                            - string
                            - 'null'
                          format: iso-4217
                          maxLength: 3
                          minLength: 3
                        title:
                          type:
                            - string
                            - 'null'
                        type:
                          type: string
                          enum:
                            - invoice
                        subtype:
                          type:
                            - string
                            - 'null'
                          enum:
                            - partial
                            - final
                            - on_account
                            - instalment
                            - dunning
                        reference:
                          type: string
                        status:
                          type: string
                          enum:
                            - draft
                            - open
                            - sending
                            - send-failed
                            - sent
                            - viewed
                            - approved
                            - declined
                            - partial
                            - paid
                            - in-payment
                            - collected
                            - planned
                            - pending
                            - archived
                            - cancelled
                            - converted
                            - due
                            - reminder
                            - first-dunning
                            - second-dunning
                            - final-dunning
                            - inactive
                            - active
                            - inbox
                            - expired
                            - done
                            - assign
                            - awaiting-payment
                            - error
                        sentStatus:
                          type: string
                          enum:
                            - OPEN
                            - SENDING
                            - ERROR
                            - SENT
                        customField1:
                          type:
                            - string
                            - 'null'
                        customField2:
                          type:
                            - string
                            - 'null'
                        customField3:
                          type:
                            - string
                            - 'null'
                        customField4:
                          type:
                            - string
                            - 'null'
                        invoiceDate:
                          type:
                            - string
                            - 'null'
                          format: date
                        deliveryDate:
                          type:
                            - string
                            - 'null'
                          format: date
                        dueDate:
                          type:
                            - string
                            - 'null'
                          format: date
                        receiver:
                          properties:
                            addressUuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                            companyUuid:
                              type: string
                              format: uuid
                            customerNumber:
                              type:
                                - string
                                - 'null'
                            name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                              format: email
                            personUuid:
                              type:
                                - string
                                - 'null'
                              format: uuid
                        documentTotal:
                          type: number
                          format: float
                        nextDunningDate:
                          type:
                            - string
                            - 'null'
                          format: date
                        customDunningDate:
                          type:
                            - string
                            - 'null'
                          format: date
                        dunningLevel:
                          type: string
                          enum:
                            - REMINDER
                            - FIRST_DUNNING
                            - FINAL_DUNNING
                            - NO_DUNNING
                        invoiceNumber:
                          description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                          type: string
                          deprecated: true
                        importedInvoiceNumber:
                          description: The recognized invoiceNumber of the imported document
                          type:
                            - string
                            - 'null'
                        systemInvoiceNumber:
                          description: The invoiceNumber generated by AbaNinja
                          type: string
                        isArchived:
                          type: boolean
                        isCancelled:
                          type: boolean
                        isImported:
                          type: boolean
                        openAmount:
                          type: number
                          format: float
                        updatedAt:
                          type: string
                          format: date-time
                        isTemplate:
                          type: boolean
                      type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: f03419e7c01e18b5fe495ac542484858
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/archive:
    patch:
      tags:
        - document-invoices
      summary: Execute archive bulk action
      description: Marks the document as archived
      operationId: documents_bulk_archive_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: array
                      items: {}
                      maxItems: 0
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 997a4ab335ebf2f8e6c949f0e89b8959
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/collectInvoice:
    patch:
      tags:
        - document-invoices
      summary: Execute collectInvoice bulk action
      description: Creates a collective invoice out of the selected items
      operationId: documents_bulk_collect_invoice_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: bd898195fb417fb24f664667ec39308e
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/markSent:
    patch:
      tags:
        - document-invoices
      summary: Execute markSent bulk action
      description: Triggers the mark sent action for each document
      operationId: documents_bulk_mark_sent_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: array
                      items: {}
                      maxItems: 0
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 15a53f6fad0938faefaa4527c4013e61
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDownloadZip:
    patch:
      tags:
        - document-invoices
      summary: Execute massDownloadZip bulk action
      description: Zips and downloads each document. The result is sent to the inbox
      operationId: documents_bulk_mass_download_zip_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: string
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: b219f23419c1d956d6f6c4be3ec5be60
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDunningPrint:
    patch:
      tags:
        - document-invoices
      summary: Execute massDunningPrint bulk action
      description: Triggers the print dunning action for each document
      operationId: documents_bulk_mass_dunning_print_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      properties:
                        type:
                          type: string
                          enum:
                            - invoice
                            - receipt
                            - credit_note
                            - recurring_invoice
                            - quote
                            - contract_note
                            - delivery_note
                            - supplier_credit_note
                        id:
                          type: integer
                          deprecated: true
                        uuid:
                          type: string
                          format: uuid
                        document:
                          properties:
                            url:
                              type: string
                              format: uri
                            preview_url:
                              type: string
                              format: uri
                          type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 14cb5f4cdf980f903d1c2dcdece79bb6
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDunningSent:
    patch:
      tags:
        - document-invoices
      summary: Execute massDunningSent bulk action
      description: Triggers the send dunning action for each document
      operationId: documents_bulk_mass_dunning_sent_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      properties:
                        type:
                          type: string
                          enum:
                            - invoice
                            - receipt
                            - credit_note
                            - recurring_invoice
                            - quote
                            - contract_note
                            - delivery_note
                            - supplier_credit_note
                        id:
                          type: integer
                          deprecated: true
                        uuid:
                          type: string
                          format: uuid
                        document:
                          properties:
                            url:
                              type: string
                              format: uri
                            preview_url:
                              type: string
                              format: uri
                          type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 01436644d3e31ef4e525db0d165d58f9
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massPrint:
    patch:
      tags:
        - document-invoices
      summary: Execute massPrint bulk action
      description: Triggers the print action for each document
      operationId: documents_bulk_mass_print_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      properties:
                        type:
                          type: string
                          enum:
                            - invoice
                            - receipt
                            - credit_note
                            - recurring_invoice
                            - quote
                            - contract_note
                            - delivery_note
                            - supplier_credit_note
                        id:
                          type: integer
                          deprecated: true
                        uuid:
                          type: string
                          format: uuid
                        printUrl:
                          type: string
                          format: uri
                        document:
                          properties:
                            url:
                              type: string
                              format: uri
                            preview_url:
                              type: string
                              format: uri
                          type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 218e514b971420e8b48c1591caa7d1a2
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massSent:
    patch:
      tags:
        - document-invoices
      summary: Execute massSent bulk action
      description: Triggers the send action for each document
      operationId: documents_bulk_mass_sent_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: array
                      items: {}
                      maxItems: 0
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 42a1ebc75935d36bee650f96a88ea3e1
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/bulk-actions/plannedMail:
    patch:
      tags:
        - document-invoices
      summary: Execute plannedMail bulk action
      description: Triggers the plan mail action for each document
      operationId: documents_bulk_planned_mail_invoices
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                documentUuids:
                  type: array
                  items:
                    type: string
                    format: uuid
              type: object
      responses:
        '200':
          description: Successfully bulk executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: array
                      items: {}
                      maxItems: 0
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 1c652b7f187c9b8f069bb1f6e0175b34
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/import/{invoiceUuid}:
    patch:
      tags:
        - document-invoices
      summary: Update imported invoice
      description: Update imported invoice from PDF
      operationId: documents_update_import
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoiceUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update imported invoice
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/import-invoice.update.schema.json
              description: A Schema for updating an imported invoice in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      documentData:
                        type: object
                        description: Additional Data for the invoice document
                        properties:
                          currencyCode:
                            type: string
                            pattern: ^[A-Z]{3}$
                          receiver:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                            description: Invoice Receiver for AbaNinja Invoice Json
                            type: object
                            $defs:
                              personAddress:
                                type: object
                                properties:
                                  addressUuid:
                                    type: string
                                    format: uuid
                                  personUuid:
                                    type: string
                                    format: uuid
                                  deliveryAddressUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                required:
                                  - addressUuid
                                  - personUuid
                              companyAddress:
                                type: object
                                properties:
                                  addressUuid:
                                    type: string
                                    format: uuid
                                  companyUuid:
                                    type: string
                                    format: uuid
                                  contactPersonUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                    description: UUID of contact person inside company
                                  deliveryAddressUuid:
                                    type:
                                      - 'null'
                                      - string
                                    format: uuid
                                  additionalReceivers:
                                    type: array
                                    maxItems: 5
                                    items:
                                      type: object
                                      properties:
                                        personUuid:
                                          type: string
                                          format: uuid
                                          description: UUID of contact person inside given company
                                      required:
                                        - personUuid
                                      additionalProperties: false
                                required:
                                  - addressUuid
                                  - companyUuid
                              additionalCompanyReceiver:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                              customerNumberReceiver:
                                type: object
                                properties:
                                  customerNumber:
                                    type: string
                                required:
                                  - customerNumber
                            properties:
                              addressUuid:
                                type: string
                                format: uuid
                              personUuid:
                                type: string
                                format: uuid
                              deliveryAddressUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                              companyUuid:
                                type: string
                                format: uuid
                              contactPersonUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                                description: UUID of contact person inside company
                              additionalReceivers:
                                type: array
                                maxItems: 5
                                items:
                                  type: object
                                  properties:
                                    personUuid:
                                      type: string
                                      format: uuid
                                      description: UUID of contact person inside given company
                                  required:
                                    - personUuid
                                  additionalProperties: false
                              customerNumber:
                                type: string
                            required:
                              - addressUuid
                              - personUuid
                              - companyUuid
                              - customerNumber
                          invoiceNumber:
                            type:
                              - 'null'
                              - string
                          invoiceDate:
                            type: string
                            format: date
                          dueDate:
                            type: string
                            format: date
                          deliveryDate:
                            type:
                              - 'null'
                              - string
                            format: date
                          paymentInstructions:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                            title: Payment Instructions
                            description: Payment Instruction Schema for AbaNinja Invoice Json
                            $defs:
                              ibanInstruction:
                                title: IBAN
                                type: object
                                properties:
                                  iban:
                                    type: string
                                    pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                  bic:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                    description: SCOR Reference
                                required:
                                  - iban
                                if:
                                  properties:
                                    iban:
                                      not:
                                        pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                                then:
                                  required:
                                    - bic
                              qrIbanInstruction:
                                title: QR-IBAN
                                type: object
                                properties:
                                  qrIban:
                                    type: string
                                    pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: ^[0-9]{2,27}$
                                    description: QRR Reference
                                required:
                                  - qrIban
                              bankAccountReference:
                                title: Bank Account UUID
                                type: object
                                properties:
                                  bankAccountUuid:
                                    type: string
                                    format: uuid
                                    description: Identifier of the bank account
                                  reference:
                                    type:
                                      - 'null'
                                      - string
                                    pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                    description: QRR or SCOR Reference
                                required:
                                  - bankAccountUuid
                            properties:
                              iban:
                                type: string
                                pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                              bic:
                                type:
                                  - 'null'
                                  - string
                                pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                              reference:
                                type:
                                  - 'null'
                                  - string
                                pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                description: QRR or SCOR Reference
                              qrIban:
                                type: string
                                pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                              bankAccountUuid:
                                type: string
                                format: uuid
                                description: Identifier of the bank account
                            required:
                              - iban
                              - qrIban
                              - bankAccountUuid
                          documentTotal:
                            type: number
                            description: Total Amount incl. VAT
                          taxPositions:
                            type: array
                            items:
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                              description: A Schema for tax positions for imported invoices
                              type: object
                              properties:
                                id:
                                  type:
                                    - integer
                                    - 'null'
                                  exclusiveMinimum: 0
                                  deprecated: true
                                  description: identifier of the object. "uuid" should be used instead
                                uuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                accountNumber:
                                  type: integer
                                  minimum: 1000
                                  maximum: 999999999999
                                  deprecated: true
                                  description: The booking account number. Use bookingAccountUuid instead.
                                bookingAccountUuid:
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                isTaxIncluded:
                                  type: boolean
                                  default: false
                                  description: controls if amount already includes tax or not
                                amount:
                                  type: number
                                taxRate:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                                  deprecated: true
                                  description: Tax Rate to apply. Use "taxRateUuid" instead
                                taxRateUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                              required:
                                - amount
                            minItems: 1
                          reference:
                            type:
                              - string
                            maxLength: 255
                          publicNotes:
                            type:
                              - 'null'
                              - string
                          hasCustomPaymentSlip:
                            type: boolean
                            default: false
                            description: >-
                              if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja
                              (false)
                        required:
                          - currencyCode
                          - receiver
                          - invoiceDate
                          - dueDate
                          - paymentInstructions
                          - documentTotal
                          - taxPositions
                    required:
                      - documentData
                  maxItems: 1
                  minItems: 1
              required:
                - documents
              $defs:
                singleDocument:
                  type: object
                  properties:
                    documentData:
                      type: object
                      description: Additional Data for the invoice document
                      properties:
                        currencyCode:
                          type: string
                          pattern: ^[A-Z]{3}$
                        receiver:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json
                          description: Invoice Receiver for AbaNinja Invoice Json
                          type: object
                          $defs:
                            personAddress:
                              type: object
                              properties:
                                addressUuid:
                                  type: string
                                  format: uuid
                                personUuid:
                                  type: string
                                  format: uuid
                                deliveryAddressUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                              required:
                                - addressUuid
                                - personUuid
                            companyAddress:
                              type: object
                              properties:
                                addressUuid:
                                  type: string
                                  format: uuid
                                companyUuid:
                                  type: string
                                  format: uuid
                                contactPersonUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                  description: UUID of contact person inside company
                                deliveryAddressUuid:
                                  type:
                                    - 'null'
                                    - string
                                  format: uuid
                                additionalReceivers:
                                  type: array
                                  maxItems: 5
                                  items:
                                    type: object
                                    properties:
                                      personUuid:
                                        type: string
                                        format: uuid
                                        description: UUID of contact person inside given company
                                    required:
                                      - personUuid
                                    additionalProperties: false
                              required:
                                - addressUuid
                                - companyUuid
                            additionalCompanyReceiver:
                              type: object
                              properties:
                                personUuid:
                                  type: string
                                  format: uuid
                                  description: UUID of contact person inside given company
                              required:
                                - personUuid
                              additionalProperties: false
                            customerNumberReceiver:
                              type: object
                              properties:
                                customerNumber:
                                  type: string
                              required:
                                - customerNumber
                          properties:
                            addressUuid:
                              type: string
                              format: uuid
                            personUuid:
                              type: string
                              format: uuid
                            deliveryAddressUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                            companyUuid:
                              type: string
                              format: uuid
                            contactPersonUuid:
                              type:
                                - 'null'
                                - string
                              format: uuid
                              description: UUID of contact person inside company
                            additionalReceivers:
                              type: array
                              maxItems: 5
                              items:
                                type: object
                                properties:
                                  personUuid:
                                    type: string
                                    format: uuid
                                    description: UUID of contact person inside given company
                                required:
                                  - personUuid
                                additionalProperties: false
                            customerNumber:
                              type: string
                          required:
                            - addressUuid
                            - personUuid
                            - companyUuid
                            - customerNumber
                        invoiceNumber:
                          type:
                            - 'null'
                            - string
                        invoiceDate:
                          type: string
                          format: date
                        dueDate:
                          type: string
                          format: date
                        deliveryDate:
                          type:
                            - 'null'
                            - string
                          format: date
                        paymentInstructions:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json
                          title: Payment Instructions
                          description: Payment Instruction Schema for AbaNinja Invoice Json
                          $defs:
                            ibanInstruction:
                              title: IBAN
                              type: object
                              properties:
                                iban:
                                  type: string
                                  pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                                bic:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^RF[0-9]{2}[A-Za-z0-9]{1,21}$
                                  description: SCOR Reference
                              required:
                                - iban
                              if:
                                properties:
                                  iban:
                                    not:
                                      pattern: ^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$
                              then:
                                required:
                                  - bic
                            qrIbanInstruction:
                              title: QR-IBAN
                              type: object
                              properties:
                                qrIban:
                                  type: string
                                  pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: ^[0-9]{2,27}$
                                  description: QRR Reference
                              required:
                                - qrIban
                            bankAccountReference:
                              title: Bank Account UUID
                              type: object
                              properties:
                                bankAccountUuid:
                                  type: string
                                  format: uuid
                                  description: Identifier of the bank account
                                reference:
                                  type:
                                    - 'null'
                                    - string
                                  pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                                  description: QRR or SCOR Reference
                              required:
                                - bankAccountUuid
                          properties:
                            iban:
                              type: string
                              pattern: ^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}
                            bic:
                              type:
                                - 'null'
                                - string
                              pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
                            reference:
                              type:
                                - 'null'
                                - string
                              pattern: (^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)
                              description: QRR or SCOR Reference
                            qrIban:
                              type: string
                              pattern: ^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$
                            bankAccountUuid:
                              type: string
                              format: uuid
                              description: Identifier of the bank account
                          required:
                            - iban
                            - qrIban
                            - bankAccountUuid
                        documentTotal:
                          type: number
                          description: Total Amount incl. VAT
                        taxPositions:
                          type: array
                          items:
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json
                            description: A Schema for tax positions for imported invoices
                            type: object
                            properties:
                              id:
                                type:
                                  - integer
                                  - 'null'
                                exclusiveMinimum: 0
                                deprecated: true
                                description: identifier of the object. "uuid" should be used instead
                              uuid:
                                type:
                                  - string
                                  - 'null'
                                format: uuid
                              accountNumber:
                                type: integer
                                minimum: 1000
                                maximum: 999999999999
                                deprecated: true
                                description: The booking account number. Use bookingAccountUuid instead.
                              bookingAccountUuid:
                                type:
                                  - string
                                  - 'null'
                                format: uuid
                              isTaxIncluded:
                                type: boolean
                                default: false
                                description: controls if amount already includes tax or not
                              amount:
                                type: number
                              taxRate:
                                type: number
                                minimum: 0
                                maximum: 100
                                deprecated: true
                                description: Tax Rate to apply. Use "taxRateUuid" instead
                              taxRateUuid:
                                type:
                                  - 'null'
                                  - string
                                format: uuid
                            required:
                              - amount
                          minItems: 1
                        reference:
                          type:
                            - string
                          maxLength: 255
                        publicNotes:
                          type:
                            - 'null'
                            - string
                        hasCustomPaymentSlip:
                          type: boolean
                          default: false
                          description: >-
                            if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja
                            (false)
                      required:
                        - currencyCode
                        - receiver
                        - invoiceDate
                        - dueDate
                        - paymentInstructions
                        - documentTotal
                        - taxPositions
                  required:
                    - documentData
      responses:
        '200':
          description: Imported invoice updated
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          title: Imported Invoice Resource
                          properties:
                            documentUrl:
                              type:
                                - string
                                - 'null'
                              format: uri
                            documentData:
                              properties:
                                uuid:
                                  type: string
                                  format: uuid
                                currencyCode:
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                currencyCodeRecognized:
                                  description: >-
                                    when importing invoices and detecting the currency, this field contains the detected
                                    value
                                  type:
                                    - string
                                    - 'null'
                                  format: iso-4217
                                  maxLength: 3
                                  minLength: 3
                                reference:
                                  type: string
                                publicNotes:
                                  type:
                                    - string
                                    - 'null'
                                receiver:
                                  properties:
                                    addressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    companyUuid:
                                      type: string
                                      format: uuid
                                    networkUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    networkKey:
                                      type:
                                        - string
                                        - 'null'
                                    networkName:
                                      type:
                                        - string
                                        - 'null'
                                    deliveryAddressUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    contactPersonUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                    additionalReceivers:
                                      type: array
                                      items:
                                        properties:
                                          personUuid:
                                            type: string
                                            format: uuid
                                        type: object
                                    receiverInformation:
                                      title: Receiver Information Resource
                                      description: Receiver information resource
                                      properties:
                                        customerNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        companyName:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        nameWithSalutation:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        careOfAddress:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        address:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        extension:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        houseNumber:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        zipCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        city:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        countryCode:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                        email:
                                          type:
                                            - string
                                            - 'null'
                                          format: email
                                          readOnly: true
                                        language:
                                          type:
                                            - string
                                            - 'null'
                                          readOnly: true
                                          enum:
                                            - de
                                            - en
                                            - fr
                                            - it
                                        deliveryAddress:
                                          properties:
                                            companyName:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            name:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            nameWithSalutation:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            careOfAddress:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            address:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            extension:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            houseNumber:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            zipCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            city:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                            countryCode:
                                              type:
                                                - string
                                                - 'null'
                                              readOnly: true
                                          type: object
                                          readOnly: true
                                        additionalReceivers:
                                          type: array
                                          items:
                                            properties:
                                              fullName:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                              email:
                                                type:
                                                  - string
                                                  - 'null'
                                                readOnly: true
                                            type: object
                                          readOnly: true
                                      type: object
                                    personUuid:
                                      type:
                                        - string
                                        - 'null'
                                      format: uuid
                                invoiceNumber:
                                  description: Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber
                                  type: string
                                  deprecated: true
                                importedInvoiceNumber:
                                  description: The recognized invoiceNumber of the imported document
                                  type:
                                    - string
                                    - 'null'
                                systemInvoiceNumber:
                                  description: The invoiceNumber generated by AbaNinja
                                  type: string
                                invoiceDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dueDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                deliveryDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                nextDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                customDunningDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                dunningLevel:
                                  type: string
                                  enum:
                                    - REMINDER
                                    - FIRST_DUNNING
                                    - FINAL_DUNNING
                                    - NO_DUNNING
                                sentStatus:
                                  type: string
                                  enum:
                                    - OPEN
                                    - SENDING
                                    - ERROR
                                    - SENT
                                status:
                                  type: string
                                  enum:
                                    - draft
                                    - open
                                    - sending
                                    - send-failed
                                    - sent
                                    - viewed
                                    - approved
                                    - declined
                                    - partial
                                    - paid
                                    - in-payment
                                    - collected
                                    - planned
                                    - pending
                                    - archived
                                    - cancelled
                                    - converted
                                    - due
                                    - reminder
                                    - first-dunning
                                    - second-dunning
                                    - final-dunning
                                    - inactive
                                    - active
                                    - inbox
                                    - expired
                                    - done
                                    - assign
                                    - awaiting-payment
                                    - error
                                paymentInstructions:
                                  properties:
                                    bankAccountUuid:
                                      type: string
                                      format: uuid
                                    iban:
                                      type: string
                                    bic:
                                      type:
                                        - string
                                        - 'null'
                                    qrIban:
                                      type: string
                                    reference:
                                      type:
                                        - string
                                        - 'null'
                                documentTotal:
                                  type: number
                                  format: float
                                taxPositions:
                                  type: array
                                  items:
                                    title: Tax Position Resource
                                    properties:
                                      uuid:
                                        type: string
                                        format: uuid
                                      id:
                                        type: number
                                        format: int64
                                        deprecated: true
                                      accountNumber:
                                        type:
                                          - number
                                          - 'null'
                                        format: int64
                                        deprecated: true
                                      bookingAccountUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      isTaxIncluded:
                                        type: boolean
                                      amount:
                                        type: number
                                        format: float
                                      taxRate:
                                        type: number
                                        format: float
                                        deprecated: true
                                      vatUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                        deprecated: true
                                      taxRateUuid:
                                        type:
                                          - string
                                          - 'null'
                                        format: uuid
                                      vat:
                                        properties:
                                          percentage:
                                            type: number
                                            format: float
                                          amount:
                                            type:
                                              - number
                                              - 'null'
                                            format: float
                                        type: object
                                    type: object
                                isTemplate:
                                  type: boolean
                                openAmount:
                                  type: number
                                  format: float
                                type:
                                  type: string
                                  enum:
                                    - invoice
                                subtype:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - partial
                                    - final
                                    - on_account
                                    - instalment
                                    - dunning
                                abanetSendAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                abanetConfirmedAt:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                wasRecognitionLimitReached:
                                  type: boolean
                                hasCustomPaymentSlip:
                                  description: >-
                                    if the invoice has a custom payment slip (true) or if it will be generated by
                                    AbaNinja (false)
                                  type: boolean
                              type: object
                          type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 8b093251e6f795a2c9eea3c4654a74a7
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/archive:
    patch:
      tags:
        - document-invoices
      summary: Execute archive action
      description: Archives the document
      operationId: documents_update_archive_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 663588a0e9b605f975f7c06fad85c1e3
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/cancel:
    patch:
      tags:
        - document-invoices
      summary: Execute cancel action
      description: Cancels and moves the document back to draft
      operationId: documents_update_cancel_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 3486047b02134ea6de9eb49efd267467
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/cancelPermanently:
    patch:
      tags:
        - document-invoices
      summary: Execute cancelPermanently action
      description: Cancels the document permanently. It cannot be edited afterwards
      operationId: documents_update_cancelPermanently_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 870aae031c0f44f6ff30520f17cefb35
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/clone:
    patch:
      tags:
        - document-invoices
      summary: Execute clone action
      description: Creates a copy of the document
      operationId: documents_update_clone_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: c3ab8cdce79d8bfe4f3711eaf9a036ef
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertDN:
    patch:
      tags:
        - document-invoices
      summary: Execute convertDN action
      description: Creates a delivery note out of an invoice
      operationId: documents_update_convertDN
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: f8364a3288eccd05a3079a7374ec92f8
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertIC:
    patch:
      tags:
        - document-invoices
      summary: Execute convertIC action
      description: Creates a credit note out of an invoice
      operationId: documents_update_convertIC
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 6184deef3d65f64c4877902b020c39f8
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertT:
    patch:
      tags:
        - document-invoices
      summary: Execute convertT action
      description: Creates a template out of an invoice
      operationId: documents_update_convertT
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 807340c402941fd2e8eab88016ee2d21
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertTI:
    patch:
      tags:
        - document-invoices
      summary: Execute convertTI action
      description: Creates an invoice out of a template
      operationId: documents_update_convertTI
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 438f824700679f2190a1497578824c03
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertToTemplate:
    patch:
      tags:
        - document-invoices
      summary: Execute convertToTemplate action
      description: Creates a template out of a document
      operationId: documents_update_convertToTemplate_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      isTemplate:
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 87cfcf25b8b562d95104ee0cb4c97a58
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/customerPortalUrl:
    patch:
      tags:
        - document-invoices
      summary: Execute customerPortalUrl action
      description: Gets the customer portal link
      operationId: documents_update_customerPortalUrl
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      customerPortalUrl:
                        type: string
                        format: uri
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 0f3ce353b7da6688991bdc2f9959e4f9
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/delete:
    patch:
      tags:
        - document-invoices
      summary: Execute delete action
      description: Deletes a document
      operationId: documents_update_delete_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 38d676479c7a9dde054de80be270bf04
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/downloadPaymentConfirmation:
    patch:
      tags:
        - document-invoices
      summary: Execute downloadPaymentConfirmation action
      description: Gets the download uri for the document's payment confirmation
      operationId: documents_update_downloadPaymentConfirmation
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      downloadUrl:
                        type: string
                        format: uri
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 0e00c0dfdd2e82285544004c5c9e9ded
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/downloadPdf:
    patch:
      tags:
        - document-invoices
      summary: Execute downloadPdf action
      description: Gets the download uri for the document's pdf
      operationId: documents_update_downloadPdf_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      downloadUrl:
                        type: string
                        format: uri
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 56bc5f6af6a1ad379454dbf0df77b73d
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningDate:
    patch:
      tags:
        - document-invoices
      summary: Execute dunningDate action
      description: Sets the custom dunning date
      operationId: documents_update_dunningDate
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: Set Custom Dunning Date Request
              required:
                - customDunningDate
              properties:
                customDunningDate:
                  type:
                    - string
                    - 'null'
                  format: date
              type: object
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: b99d8d59092591b74e513d413d39afeb
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningPrint:
    patch:
      tags:
        - document-invoices
      summary: Execute dunningPrint action
      description: Prints the dunning letter for the invoice
      operationId: documents_update_dunningPrint
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      printUrl:
                        type: string
                        format: uri
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: e04aa1c7102efedf8d34dba5793f83c4
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningSent:
    patch:
      tags:
        - document-invoices
      summary: Execute dunningSent action
      description: Sends the dunning letter for the invoice
      operationId: documents_update_dunningSent
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      document:
                        properties:
                          url:
                            type: string
                            format: uri
                          preview_url:
                            type: string
                            format: uri
                        type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 92878dde0284b794a1dc05cbc98b47c8
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/email:
    patch:
      tags:
        - document-invoices
      summary: Execute email action
      description: Sends the document via email
      operationId: documents_update_email_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 2433fb158d93b4c498bab24301e4c888
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/markSent:
    patch:
      tags:
        - document-invoices
      summary: Execute markSent action
      description: Marks the invoice as sent
      operationId: documents_update_markSent_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 04a12d2b30be9421a7f60307fd7e4488
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/plannedMail:
    patch:
      tags:
        - document-invoices
      summary: Execute plannedMail action
      description: Schedules the email for sending the document
      operationId: documents_update_plannedMail_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 36e82e2d01cadc3a8bccfafcdf48ddbd
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/print:
    patch:
      tags:
        - document-invoices
      summary: Execute print action
      description: Creates the PDF for printing
      operationId: documents_update_print_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                      printUrl:
                        type: string
                        format: uri
                      document:
                        properties:
                          url:
                            type: string
                            format: uri
                          preview_url:
                            type: string
                            format: uri
                        type: object
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 1d407671477d931cd02bee780eb74755
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/regeneratePdf:
    patch:
      tags:
        - document-invoices
      summary: Execute regeneratePdf action
      description: Regenerates the documents PDF
      operationId: documents_update_regeneratePdf_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Regenerate PDF Action Resource
                    type: object
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      name:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      archivedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      archivedReason:
                        type:
                          - string
                          - 'null'
                        enum:
                          - SENT_NEW_DOCUMENT
                          - CANCELATION
                          - DUNNING
                          - PAYMENT_OFFSET
                          - PAYMENT_CONFIRMED
                          - PAYMENT_CANCELED
                          - MANUAL_RECREATION
                      fileSize:
                        type: integer
                        format: int64
                      mimeType:
                        type: string
                      kind:
                        type: string
                        enum:
                          - invoice
                      fileUrl:
                        type:
                          - string
                          - 'null'
                        format: uri
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 67cd13b5f58df1ddacaf34fb5c991cc1
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/restore:
    patch:
      tags:
        - document-invoices
      summary: Execute restore action
      description: Restores an archived document
      operationId: documents_update_restore_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: a5f6683fb32ed87ad5b647e25945c95f
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/resync:
    patch:
      tags:
        - document-invoices
      summary: Execute resync action
      description: Resyncs the document to Abacus
      operationId: documents_update_resync_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 4bf66bb1ea29aff18c739b17e67bc75d
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sendAbaNet:
    patch:
      tags:
        - document-invoices
      summary: Execute sendAbaNet action
      description: Sends the invoice via AbaNet
      operationId: documents_update_sendAbaNet
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      type:
                        type: string
                        enum:
                          - invoice
                          - receipt
                          - credit_note
                          - recurring_invoice
                          - quote
                          - contract_note
                          - delivery_note
                          - supplier_credit_note
                      id:
                        type: integer
                        deprecated: true
                      uuid:
                        type: string
                        format: uuid
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 4cccc2f37b8bd1c44fa40d9bda226328
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sendPaymentConfirmation:
    patch:
      tags:
        - document-invoices
      summary: Execute sendPaymentConfirmation action
      description: Sends the payment confirmation
      operationId: documents_update_sendPaymentConfirmation
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 1d6f0597684a337ea861bf349627f8e4
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/setDunningAmounts:
    patch:
      tags:
        - document-invoices
      summary: Execute setDunningAmounts action
      description: Sets the dunning amounts for the invoice
      operationId: documents_update_setDunningAmounts
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: Set Dunning Amounts Request
              required: []
              properties:
                customDunningAmount1:
                  description: >-
                    Amount for first reminder. Must be omitted if reminder was already sent. If null the account
                    settings will be used.
                  type:
                    - number
                    - 'null'
                  minimum: 0
                customDunningAmount2:
                  description: >-
                    Amount for second reminder. Must be greater or equal than the first reminder amount. Must be omitted
                    if reminder was already sent. If null the account settings will be used.
                  type:
                    - number
                    - 'null'
                  minimum: 0
                customDunningAmount3:
                  description: >-
                    Amount for third reminder. Must be greater or equal than the second reminder amount. If null the
                    account settings will be used.
                  type:
                    - number
                    - 'null'
                  minimum: 0
              type: object
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request due to decreasing amounts or attempt to set an amount for a level already sent
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 63f8e6ff979662f86f5532432314afd5
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sync:
    patch:
      tags:
        - document-invoices
      summary: Execute sync action
      description: Syncs the document to Abacus
      operationId: documents_update_sync_2
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully executed action
          content:
            application/json:
              schema:
                properties:
                  data: {}
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '400':
          description: Bad request or validation error
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 861d0384badcbc91775cd25a8b7a7076
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/comments/{commentUuid}:
    get:
      tags:
        - document-invoices
      summary: Get comment
      description: fetches a single comment of a document
      operationId: documents_get_comments_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: commentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Document Comment Resource
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      authorUserUuid:
                        type:
                          - string
                          - 'null'
                        format: uuid
                      createdAt:
                        type: string
                        format: date-time
                      userName:
                        type: string
                      comment:
                        type: string
                      type:
                        description: Defines if it is only for internal use or if customers can see the comments
                        type: string
                        enum:
                          - intern
                          - extern
                      isDeletable:
                        description: if the current user can delete the comment
                        type: boolean
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 60ff2b8a2b7765a049d9abe35b28a96f
      x-required-scopes:
        - customers
    delete:
      tags:
        - document-invoices
      summary: Delete comment
      description: deletes a comment of a document, which cannot be restored anymore afterwards.
      operationId: documents_delete_comments_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: commentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Successful response
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 8ffac14216176568f6e2bb1b4bef3360
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/files/{fileUuid}:
    get:
      tags:
        - document-invoices
      summary: Get File
      description: Returns a file
      operationId: documents_get_files_4
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: documentUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: fileUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                properties:
                  data:
                    title: Document File Detail Resource
                    properties:
                      uuid:
                        type: string
                        format: uuid
                      name:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      archivedAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      archivedReason:
                        type:
                          - string
                          - 'null'
                        enum:
                          - SENT_NEW_DOCUMENT
                          - CANCELATION
                          - DUNNING
                          - PAYMENT_OFFSET
                          - PAYMENT_CONFIRMED
                          - PAYMENT_CANCELED
                          - MANUAL_RECREATION
                      fileSize:
                        type: integer
                        format: int64
                      mimeType:
                        type: string
                      kind:
                        type: string
                        enum:
                          - invoice
                          - invoice_attachment
                          - invoice_payments
                          - imported_invoice
                      fileUrl:
                        type:
                          - string
                          - 'null'
                        format: uri
                    type: object
                  message:
                    title: message
                    type: string
                  status:
                    example: 200
                  meta:
                    title: meta
                    type:
                      - object
                      - 'null'
                required:
                  - data
                  - message
                  - status
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                properties:
                  detail:
                    title: details
                  type:
                    title: type
                    type: string
                  requestUuid:
                    title: requestUuid
                    type: string
                    format: uuid
                  path:
                    title: path
                    type: string
                  message:
                    title: message
                    type:
                      - string
                      - 'null'
                  status:
                    title: status
                    description: HTTP status code
                    type: integer
                required:
                  - detail
                  - type
                  - message
                  - status
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 7d437f6465c7b2a47debc52a72a5d6d0
      x-required-scopes:
        - customers
components:
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Create tokens in Settings > API Token.
