openapi: 3.1.0
info:
  title: AbaNinja Documents API - Delivery Notes
  version: 3.0.0
  x-domain-id: documents
servers:
  - url: https://api.abaninja.ch
    description: The AbaNinja API server
tags:
  - name: document-delivery-notes
    description: Manage delivery notes
    x-displayName: Delivery Notes
security:
  - ApiToken: []
paths:
  /accounts/{accountUuid}/documents/v2/delivery-notes:
    get:
      tags:
        - document-delivery-notes
      summary: Get delivery notes
      description: Get delivery notes
      operationId: documents_list_delivery_notes
      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:
                          title: Delivery Note 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
                            customField1:
                              type:
                                - string
                                - 'null'
                            customField2:
                              type:
                                - string
                                - 'null'
                            customField3:
                              type:
                                - string
                                - 'null'
                            customField4:
                              type:
                                - string
                                - 'null'
                            deliveryNoteDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryNoteNumber:
                              type: string
                            isArchived:
                              type: boolean
                            isCancelled:
                              type: boolean
                            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
                            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
                            title:
                              type:
                                - string
                                - 'null'
                            updatedAt:
                              type: string
                              format: date-time
                            isTemplate:
                              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
      security:
        - ApiToken:
            - https://api.abaninja.ch/auth/customers
      x-legacy-operation-id: 1438e5773c6363e26cc28ba03ab1fc0b
      x-required-scopes:
        - customers
    post:
      tags:
        - document-delivery-notes
      summary: Create delivery note
      description: Create delivery note
      operationId: documents_create_delivery_notes
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Create delivery notes
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/delivery-note.schema.json
              title: Delivery notes
              description: A Schema for creating delivery notes in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      isTemplate:
                        const: true
                      deliveryNoteDate:
                        type: string
                        format: date
                      deliveryDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      pricesIncludeVat:
                        type: boolean
                        description: Controls if prices includes vat or not. If omitted the accounts default setting is used.
                      positions:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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: group
                            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: >-
                                Price, which will be used when converting the delivery note to another document like an
                                invoice
                            discount:
                              description: >-
                                Discount, which will be used when converting the delivery note to another document like
                                an invoice
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the delivery
                                note to another document like an invoice.
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                              description: >-
                                VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note to
                                another document like an invoice.
                            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:
                              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: >-
                                      Price, which will be used when converting the delivery note to another document
                                      like an invoice
                                  discount:
                                    description: >-
                                      Discount, which will be used when converting the delivery note to another document
                                      like an invoice
                                    $schema: https://json-schema.org/draft/2020-12/schema
                                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                      delivery note to another document like an invoice.
                                  vat:
                                    type:
                                      - 'null'
                                      - object
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                        maximum: 100
                                    required:
                                      - percentage
                                    description: >-
                                      VAT to use. Is precedented by "vatUuid". Used only when converting the delivery
                                      note to another document like an invoice.
                                  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
                                  - productDescription
                              minItems: 1
                            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: >-
                                    Price, which will be used when converting the delivery note to another document like
                                    an invoice
                                discount:
                                  description: >-
                                    Discount, which will be used when converting the delivery note to another document
                                    like an invoice
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                    delivery note to another document like an invoice.
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                  description: >-
                                    VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                    to another document like an invoice.
                                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
                                - 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
                            dividerPosition:
                              type: object
                              properties:
                                kind:
                                  const: divider
                              required:
                                - kind
                            groupPosition:
                              type: object
                              properties:
                                kind:
                                  const: group
                                title:
                                  type: string
                                  maximum: 255
                                items:
                                  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: >-
                                          Price, which will be used when converting the delivery note to another
                                          document like an invoice
                                      discount:
                                        description: >-
                                          Discount, which will be used when converting the delivery note to another
                                          document like an invoice
                                        $schema: https://json-schema.org/draft/2020-12/schema
                                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                          delivery note to another document like an invoice.
                                      vat:
                                        type:
                                          - 'null'
                                          - object
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                            maximum: 100
                                        required:
                                          - percentage
                                        description: >-
                                          VAT to use. Is precedented by "vatUuid". Used only when converting the
                                          delivery note to another document like an invoice.
                                      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
                                      - productDescription
                                  minItems: 1
                                showCollapsed:
                                  type: boolean
                                  default: true
                              required:
                                - title
                                - kind
                                - items
                          required:
                            - kind
                            - productUuid
                            - productDescription
                            - title
                            - text
                            - items
                        minItems: 1
                      documentDiscount:
                        description: >-
                          Discount, which only will be used when converting the delivery note to another document like
                          an invoice
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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:
                      - deliveryNoteDate
                      - positions
                      - currencyCode
                      - isTemplate
                      - receiver
                  minItems: 1
              required:
                - documents
              $defs:
                singleDeliveryNote:
                  type: object
                  properties:
                    isTemplate:
                      const: true
                    deliveryNoteDate:
                      type: string
                      format: date
                    deliveryDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    pricesIncludeVat:
                      type: boolean
                      description: Controls if prices includes vat or not. If omitted the accounts default setting is used.
                    positions:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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: group
                          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: >-
                              Price, which will be used when converting the delivery note to another document like an
                              invoice
                          discount:
                            description: >-
                              Discount, which will be used when converting the delivery note to another document like an
                              invoice
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the delivery
                              note to another document like an invoice.
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                            description: >-
                              VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note to
                              another document like an invoice.
                          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:
                            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: >-
                                    Price, which will be used when converting the delivery note to another document like
                                    an invoice
                                discount:
                                  description: >-
                                    Discount, which will be used when converting the delivery note to another document
                                    like an invoice
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                    delivery note to another document like an invoice.
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                  description: >-
                                    VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                    to another document like an invoice.
                                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
                                - productDescription
                            minItems: 1
                          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: >-
                                  Price, which will be used when converting the delivery note to another document like
                                  an invoice
                              discount:
                                description: >-
                                  Discount, which will be used when converting the delivery note to another document
                                  like an invoice
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                  delivery note to another document like an invoice.
                              vat:
                                type:
                                  - 'null'
                                  - object
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                required:
                                  - percentage
                                description: >-
                                  VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                  to another document like an invoice.
                              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
                              - 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
                          dividerPosition:
                            type: object
                            properties:
                              kind:
                                const: divider
                            required:
                              - kind
                          groupPosition:
                            type: object
                            properties:
                              kind:
                                const: group
                              title:
                                type: string
                                maximum: 255
                              items:
                                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: >-
                                        Price, which will be used when converting the delivery note to another document
                                        like an invoice
                                    discount:
                                      description: >-
                                        Discount, which will be used when converting the delivery note to another
                                        document like an invoice
                                      $schema: https://json-schema.org/draft/2020-12/schema
                                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                        delivery note to another document like an invoice.
                                    vat:
                                      type:
                                        - 'null'
                                        - object
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                          maximum: 100
                                      required:
                                        - percentage
                                      description: >-
                                        VAT to use. Is precedented by "vatUuid". Used only when converting the delivery
                                        note to another document like an invoice.
                                    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
                                    - productDescription
                                minItems: 1
                              showCollapsed:
                                type: boolean
                                default: true
                            required:
                              - title
                              - kind
                              - items
                        required:
                          - kind
                          - productUuid
                          - productDescription
                          - title
                          - text
                          - items
                      minItems: 1
                    documentDiscount:
                      description: >-
                        Discount, which only will be used when converting the delivery note to another document like an
                        invoice
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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:
                    - deliveryNoteDate
                    - positions
                    - currencyCode
                    - isTemplate
                    - receiver
      responses:
        '201':
          description: Delivery note created
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          title: Delivery Note 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
                            deliveryNoteDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            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
                            deliveryNoteNumber:
                              type: string
                            type:
                              type: string
                              enum:
                                - delivery_note
                            documentDiscount:
                              description: >-
                                Discount, which will be used when converting the delivery note to another document like
                                an invoice
                              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: 7da60322aa209b143e5a26078a43b05c
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{deliveryNoteUuid}:
    get:
      tags:
        - document-delivery-notes
      summary: Get delivery note
      description: Get a single delivery note
      operationId: documents_get_delivery_notes
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: deliveryNoteUuid
          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:
                          title: Delivery Note 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
                            deliveryNoteDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            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
                            deliveryNoteNumber:
                              type: string
                            type:
                              type: string
                              enum:
                                - delivery_note
                            documentDiscount:
                              description: >-
                                Discount, which will be used when converting the delivery note to another document like
                                an invoice
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  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
        '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: 1ac7e32b908780789b3c8908825959ca
      x-required-scopes:
        - customers
    patch:
      tags:
        - document-delivery-notes
      summary: Update delivery note
      description: Update delivery note
      operationId: documents_update_delivery_notes
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: deliveryNoteUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Update delivery note
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              $id: https://api.abaninja.ch/schemas/2.0.0/delivery-note.schema.json
              title: Delivery notes
              description: A Schema for creating delivery notes in AbaNinja over API
              type: object
              properties:
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      isTemplate:
                        const: true
                      deliveryNoteDate:
                        type: string
                        format: date
                      deliveryDate:
                        type:
                          - 'null'
                          - string
                        format: date
                      pricesIncludeVat:
                        type: boolean
                        description: Controls if prices includes vat or not. If omitted the accounts default setting is used.
                      positions:
                        type: array
                        items:
                          $schema: https://json-schema.org/draft/2020-12/schema
                          $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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: group
                            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: >-
                                Price, which will be used when converting the delivery note to another document like an
                                invoice
                            discount:
                              description: >-
                                Discount, which will be used when converting the delivery note to another document like
                                an invoice
                              $schema: https://json-schema.org/draft/2020-12/schema
                              $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the delivery
                                note to another document like an invoice.
                            vat:
                              type:
                                - 'null'
                                - object
                              properties:
                                percentage:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - percentage
                              description: >-
                                VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note to
                                another document like an invoice.
                            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:
                              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: >-
                                      Price, which will be used when converting the delivery note to another document
                                      like an invoice
                                  discount:
                                    description: >-
                                      Discount, which will be used when converting the delivery note to another document
                                      like an invoice
                                    $schema: https://json-schema.org/draft/2020-12/schema
                                    $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                      delivery note to another document like an invoice.
                                  vat:
                                    type:
                                      - 'null'
                                      - object
                                    properties:
                                      percentage:
                                        type: number
                                        minimum: 0
                                        maximum: 100
                                    required:
                                      - percentage
                                    description: >-
                                      VAT to use. Is precedented by "vatUuid". Used only when converting the delivery
                                      note to another document like an invoice.
                                  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
                                  - productDescription
                              minItems: 1
                            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: >-
                                    Price, which will be used when converting the delivery note to another document like
                                    an invoice
                                discount:
                                  description: >-
                                    Discount, which will be used when converting the delivery note to another document
                                    like an invoice
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                    delivery note to another document like an invoice.
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                  description: >-
                                    VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                    to another document like an invoice.
                                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
                                - 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
                            dividerPosition:
                              type: object
                              properties:
                                kind:
                                  const: divider
                              required:
                                - kind
                            groupPosition:
                              type: object
                              properties:
                                kind:
                                  const: group
                                title:
                                  type: string
                                  maximum: 255
                                items:
                                  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: >-
                                          Price, which will be used when converting the delivery note to another
                                          document like an invoice
                                      discount:
                                        description: >-
                                          Discount, which will be used when converting the delivery note to another
                                          document like an invoice
                                        $schema: https://json-schema.org/draft/2020-12/schema
                                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                          delivery note to another document like an invoice.
                                      vat:
                                        type:
                                          - 'null'
                                          - object
                                        properties:
                                          percentage:
                                            type: number
                                            minimum: 0
                                            maximum: 100
                                        required:
                                          - percentage
                                        description: >-
                                          VAT to use. Is precedented by "vatUuid". Used only when converting the
                                          delivery note to another document like an invoice.
                                      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
                                      - productDescription
                                  minItems: 1
                                showCollapsed:
                                  type: boolean
                                  default: true
                              required:
                                - title
                                - kind
                                - items
                          required:
                            - kind
                            - productUuid
                            - productDescription
                            - title
                            - text
                            - items
                        minItems: 1
                      documentDiscount:
                        description: >-
                          Discount, which only will be used when converting the delivery note to another document like
                          an invoice
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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:
                      - deliveryNoteDate
                      - positions
                      - currencyCode
                      - isTemplate
                      - receiver
                  minItems: 1
              required:
                - documents
              $defs:
                singleDeliveryNote:
                  type: object
                  properties:
                    isTemplate:
                      const: true
                    deliveryNoteDate:
                      type: string
                      format: date
                    deliveryDate:
                      type:
                        - 'null'
                        - string
                      format: date
                    pricesIncludeVat:
                      type: boolean
                      description: Controls if prices includes vat or not. If omitted the accounts default setting is used.
                    positions:
                      type: array
                      items:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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: group
                          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: >-
                              Price, which will be used when converting the delivery note to another document like an
                              invoice
                          discount:
                            description: >-
                              Discount, which will be used when converting the delivery note to another document like an
                              invoice
                            $schema: https://json-schema.org/draft/2020-12/schema
                            $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the delivery
                              note to another document like an invoice.
                          vat:
                            type:
                              - 'null'
                              - object
                            properties:
                              percentage:
                                type: number
                                minimum: 0
                                maximum: 100
                            required:
                              - percentage
                            description: >-
                              VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note to
                              another document like an invoice.
                          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:
                            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: >-
                                    Price, which will be used when converting the delivery note to another document like
                                    an invoice
                                discount:
                                  description: >-
                                    Discount, which will be used when converting the delivery note to another document
                                    like an invoice
                                  $schema: https://json-schema.org/draft/2020-12/schema
                                  $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                    delivery note to another document like an invoice.
                                vat:
                                  type:
                                    - 'null'
                                    - object
                                  properties:
                                    percentage:
                                      type: number
                                      minimum: 0
                                      maximum: 100
                                  required:
                                    - percentage
                                  description: >-
                                    VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                    to another document like an invoice.
                                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
                                - productDescription
                            minItems: 1
                          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: >-
                                  Price, which will be used when converting the delivery note to another document like
                                  an invoice
                              discount:
                                description: >-
                                  Discount, which will be used when converting the delivery note to another document
                                  like an invoice
                                $schema: https://json-schema.org/draft/2020-12/schema
                                $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                  delivery note to another document like an invoice.
                              vat:
                                type:
                                  - 'null'
                                  - object
                                properties:
                                  percentage:
                                    type: number
                                    minimum: 0
                                    maximum: 100
                                required:
                                  - percentage
                                description: >-
                                  VAT to use. Is precedented by "vatUuid". Used only when converting the delivery note
                                  to another document like an invoice.
                              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
                              - 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
                          dividerPosition:
                            type: object
                            properties:
                              kind:
                                const: divider
                            required:
                              - kind
                          groupPosition:
                            type: object
                            properties:
                              kind:
                                const: group
                              title:
                                type: string
                                maximum: 255
                              items:
                                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: >-
                                        Price, which will be used when converting the delivery note to another document
                                        like an invoice
                                    discount:
                                      description: >-
                                        Discount, which will be used when converting the delivery note to another
                                        document like an invoice
                                      $schema: https://json-schema.org/draft/2020-12/schema
                                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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". Used only when converting the
                                        delivery note to another document like an invoice.
                                    vat:
                                      type:
                                        - 'null'
                                        - object
                                      properties:
                                        percentage:
                                          type: number
                                          minimum: 0
                                          maximum: 100
                                      required:
                                        - percentage
                                      description: >-
                                        VAT to use. Is precedented by "vatUuid". Used only when converting the delivery
                                        note to another document like an invoice.
                                    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
                                    - productDescription
                                minItems: 1
                              showCollapsed:
                                type: boolean
                                default: true
                            required:
                              - title
                              - kind
                              - items
                        required:
                          - kind
                          - productUuid
                          - productDescription
                          - title
                          - text
                          - items
                      minItems: 1
                    documentDiscount:
                      description: >-
                        Discount, which only will be used when converting the delivery note to another document like an
                        invoice
                      $schema: https://json-schema.org/draft/2020-12/schema
                      $id: https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.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:
                    - deliveryNoteDate
                    - positions
                    - currencyCode
                    - isTemplate
                    - receiver
      responses:
        '200':
          description: Delivery note updated
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      documents:
                        type: array
                        items:
                          title: Delivery Note 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
                            deliveryNoteDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            deliveryDate:
                              type:
                                - string
                                - 'null'
                              format: date
                            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
                            deliveryNoteNumber:
                              type: string
                            type:
                              type: string
                              enum:
                                - delivery_note
                            documentDiscount:
                              description: >-
                                Discount, which will be used when converting the delivery note to another document like
                                an invoice
                              properties:
                                amount:
                                  type: number
                                  format: float
                                percentage:
                                  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
        '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: 892eb85d36362f2cd12fd629be1d6f60
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions:
    get:
      tags:
        - document-delivery-notes
      summary: Get bulk actions
      description: Get delivery note bulk actions
      operationId: documents_list_bulk_actions_3
      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: e123f8667ec9f086949ded528e403d7b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{deliveryNoteUuid}/actions:
    get:
      tags:
        - document-delivery-notes
      summary: Get actions
      description: Get delivery note actions
      operationId: documents_list_actions_3
      parameters:
        - name: accountUuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: deliveryNoteUuid
          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: 70264a0226eb1bc5efebb51665ea8cd8
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/comments:
    get:
      tags:
        - document-delivery-notes
      summary: Get comment collection
      description: fetches comments of a document via pagination
      operationId: documents_list_comments_3
      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: d18eb8dd504c1571ec784e7998bcbe5f
      x-required-scopes:
        - customers
    post:
      tags:
        - document-delivery-notes
      summary: Create comment
      description: creates a new comment on a document either for internal or external use
      operationId: documents_create_comments_3
      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: 9209effa08b9e7e3a4240700742c8eb7
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/files:
    get:
      tags:
        - document-delivery-notes
      summary: Get Files
      description: Returns a list of files
      operationId: documents_list_files_3
      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: 9f80d84e95dd95fff5a99921dd29f47c
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/archive:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute archive bulk action
      description: Marks the document as archived
      operationId: documents_bulk_archive_delivery_notes
      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: eaa505933512cf1a6436a3fca207119e
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/collectInvoice:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute collectInvoice bulk action
      description: Creates a collective invoice out of the selected items
      operationId: documents_bulk_collect_invoice_delivery_notes
      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: 8d540243f673767389902dde7c3d481c
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/markSent:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute markSent bulk action
      description: Triggers the mark sent action for each document
      operationId: documents_bulk_mark_sent_delivery_notes
      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: ee177c8191210e7c48aa0e23ba941224
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massDownloadZip:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute massDownloadZip bulk action
      description: Zips and downloads each document. The result is sent to the inbox
      operationId: documents_bulk_mass_download_zip_delivery_notes
      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: 5562375bacde3f171ad8b3561ce43369
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massPrint:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute massPrint bulk action
      description: Triggers the print action for each document
      operationId: documents_bulk_mass_print_delivery_notes
      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: 1a1f8d5730f0c56c1eb53810ad96f05b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massSent:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute massSent bulk action
      description: Triggers the send action for each document
      operationId: documents_bulk_mass_sent_delivery_notes
      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: e1d8d6c7863dc40f097267d0b3118f71
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/plannedMail:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute plannedMail bulk action
      description: Triggers the plan mail action for each document
      operationId: documents_bulk_planned_mail_delivery_notes
      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: 144db6b1700d8516da9a2d68aa5eb2e1
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/archive:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute archive action
      description: Archives the document
      operationId: documents_update_archive_3
      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: 9604886119348d47c793d6029645fb01
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/cancel:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute cancel action
      description: Cancels and moves the document back to draft
      operationId: documents_update_cancel_3
      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: 9eec65fb9fe532a4a7ffa65f0ac4b8a8
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/cancelPermanently:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute cancelPermanently action
      description: Cancels the document permanently. It cannot be edited afterwards
      operationId: documents_update_cancelPermanently_3
      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: 3df47a0b38185ee313f68832abf1741b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/clone:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute clone action
      description: Creates a copy of the document
      operationId: documents_update_clone_3
      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: 41f1d9a3775fa02854fa295820ed0c1d
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertDNI:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute convertDNI action
      description: Creates an invoice out of a delivery note
      operationId: documents_update_convertDNI
      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: 4e5cde5d3aa689cb108ad8acbe4724ec
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertTemplateToDeliveryNote:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute convertTemplateToDeliveryNote action
      description: Creates a delivery note out of a template
      operationId: documents_update_convertTemplateToDeliveryNote
      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: acffe954fa67286b531e276cf6c53c93
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertToTemplate:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute convertToTemplate action
      description: Creates a template out of a document
      operationId: documents_update_convertToTemplate_3
      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: 458d90ab2109753eab99a6883653e939
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/delete:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute delete action
      description: Deletes a document
      operationId: documents_update_delete_3
      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: f005b7623c57aca143ffd16c5bdd771d
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/downloadPdf:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute downloadPdf action
      description: Gets the download uri for the document's pdf
      operationId: documents_update_downloadPdf_3
      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: a9f8fb8f7d5bea9a5a21e3c795f1bf5f
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/email:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute email action
      description: Sends the document via email
      operationId: documents_update_email_3
      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: 8dc0252cbc9be58162bcad2bad5501f2
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/markSent:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute markSent action
      description: Marks the invoice as sent
      operationId: documents_update_markSent_3
      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: ef4434d1b13fd6d879428f73438af260
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/plannedMail:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute plannedMail action
      description: Schedules the email for sending the document
      operationId: documents_update_plannedMail_3
      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: 24daa376f8dc897e0d587f634cdbc54f
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/print:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute print action
      description: Creates the PDF for printing
      operationId: documents_update_print_3
      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: b3277a46262e46006829fb60ccf2595b
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/restore:
    patch:
      tags:
        - document-delivery-notes
      summary: Execute restore action
      description: Restores an archived document
      operationId: documents_update_restore_3
      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: 99634e4d2866f5fcb86b61feb56bfddf
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/comments/{commentUuid}:
    get:
      tags:
        - document-delivery-notes
      summary: Get comment
      description: fetches a single comment of a document
      operationId: documents_get_comments_3
      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: 5b9b9676dd4983dc2e3d77809c396dd5
      x-required-scopes:
        - customers
    delete:
      tags:
        - document-delivery-notes
      summary: Delete comment
      description: deletes a comment of a document, which cannot be restored anymore afterwards.
      operationId: documents_delete_comments_3
      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: 1d7bb970ded9f45618099a9620eeecf1
      x-required-scopes:
        - customers
  /accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/files/{fileUuid}:
    get:
      tags:
        - document-delivery-notes
      summary: Get File
      description: Returns a file
      operationId: documents_get_files_3
      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: 48aa66d129666da319e5e38be5b87436
      x-required-scopes:
        - customers
components:
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Create tokens in Settings > API Token.
