openapi: 3.0.1
info:
  title: 'Data Store Service: API Specification'
  description: The Data Store REST Service is providing REST api endpoints to stored
    documents, tasks, connections and application files.
  version: 1.24.0-CR3
servers:
- description: ''
  url: https://api.uat.btx.fr.banqup.com/datastore/documents
- description: ''
  url: https://api.uat.btx.eu.banqup.com/datastore/documents
tags:
- name: Spaces
  description: |-
    Spaces are virtual environments (work spaces) where all relevant resources of an entity are managed.  Spaces can also facilitate document exchange and communication among entities, depending on the space type.
    The role of spaces is to gather all relevant data of an entity into one accessible setting.  Such data can include: invoices, connections, cards, clients, payments, users, installed apps etc.  The capabilities offered by a space depends on the space type and the active subscription.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Files
  description: A file refers to the digital container that stores the data of one
    or more documents.  Files are the medium through which electronic documents are
    stored, transmitted, and accessed.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Documents
  description: |-
    A document in e-invoicing refers to a formal, structured piece of information that contains details  related to invoicing: e.g financial data, payment details, tax information etc. or any other information  relevant to the company's operations, services, or interactions with clients and partners.
    Every Banqup document is associated with a unique UUID that is stored in the Banqup database as documentId.  The UUID is generated when a new file is received/uploaded into Banqup and is necessary when performing  document actions via the Banqup APIs.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Connections
  description: 'Connections are business and persons in the private address book of
    a space and they represent the actors involved  in document exchange, such as:
    customers, suppliers, accountants, partners, groups.'
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payments
  description: A payment is a generic term for the business event of transferring
    funds from one party to another.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payment Accounts
  description: "Payment accounts are bank or financial accounts used for managing
    payments, deposits, withdrawals, and transfers. \nThe Payment Accounts of a space
    are all bank or financial account the business represented by the space interacts
    with via e-invoicing or payments."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payment Information
  description: "Payment Information representing some sort of evidence related to
    a Payment.\nThis evidence could be in different forms :\n  - PaymentTransaction
    : information related to a payment of which the transaction (initiation) \n  \
    \                       was started on platform.\n  - BookedPaymentMovement :
    information imported from your own account indicating a payment movement was booked.
    \n  - PlannedPaymentMovement : information imported from your own account indicating
    an amount was reserved \n                         for a future payment.\n  - ManualPaymentInformation
    : information about a payment that was manually entered by a user of the platform.\n\
    \  - CounterpartyPaymentInformation : information added to your space about a
    payment which was based on the \n                         PaymentInformation the
    counter party of the payment indicated on BTX platform."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Internal Payments
  description: "This is a set of internal API call only intended to be used by BTX
    Payment Service or Aggregation Service. They are restricted to ensure that updates
    on payments, payment information and links to documents (BalanceOffset)  are done
    in consistent way.  \nThe higher level public APIs for adding payment, payment
    information and linking payments to documents  will be provided by the BTX Payment
    Service or Aggregation Service."
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal
  description: This is a set of pure internal API.  It contains for example callback
    endpoints that get registered to receive messages.
  x-BTX:
    unDocumented: 'true'
    internal: 'true'
paths:
  /documentTasks/v1/tasks/approve:
    post:
      tags:
      - Documents
      summary: ⚠️Approve documents
      description: Approve documents with provided IDs on the given space
      operationId: approveDocuments
      requestBody:
        description: Document approval request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/complete:
    post:
      tags:
      - Documents
      summary: ⚠️Complete documents
      description: Complete documents with provided IDs on the given space
      operationId: completeDocuments
      requestBody:
        description: Complete document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/dispute:
    post:
      tags:
      - Documents
      summary: ⚠️Dispute documents
      description: Dispute documents with provided IDs on the given space
      operationId: disputeDocuments
      requestBody:
        description: Dispute document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/markAsPaid:
    post:
      tags:
      - Documents
      summary: ⚠️Mark documents as paid
      description: Mark documents with provided IDs on the given space as paid
      operationId: markDocumentAsPaid
      requestBody:
        description: Mark as paid request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/markAsRefused:
    post:
      tags:
      - Documents
      summary: ⚠️Mark documents as refused
      description: Mark documents with provided IDs on the given space as refused
      operationId: markDocumentsAsRefused
      requestBody:
        description: Mark as refused document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkAsRefusedRequest'
            example:
              spaceId: 00000001-0000-0000-0000-000000000000
              documents:
              - 50000001-0000-0000-0000-000000000000
              - 50000002-0000-0000-0000-000000000000
              data:
                reason: OTHER
                otherReason: other
                additionalComment: comment
                sharedPaymentStatusEmails:
                - me@mail.com
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/markAsResolved:
    post:
      tags:
      - Documents
      summary: ⚠️Mark documents as resolved
      description: Mark documents with provided IDs on the given space as resolved.
      operationId: markDocumentsAsResolved
      requestBody:
        description: Mark as resolved document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkAsResolvedRequest'
            example:
              spaceId: 00000001-0000-0000-0000-000000000000
              documents:
              - 50000001-0000-0000-0000-000000000000
              - 50000002-0000-0000-0000-000000000000
              data:
                additionalComment: something
                sharedPaymentStatusEmails:
                - me@mail.com
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/markAsUnpaid:
    post:
      tags:
      - Documents
      summary: ⚠️Mark documents as unpaid
      description: Mark documents with provided IDs on the given space as unpaid.
      operationId: markDocumentAsUnpaid
      requestBody:
        description: Mark as unpaid document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/markAsWontBePaid:
    post:
      tags:
      - Documents
      summary: ⚠️Mark documents as won't be paid
      description: Mark documents with provided IDs on the given space as won't be
        paid.
      operationId: markDocumentsAsWontBePaid
      requestBody:
        description: Mark as won't be paid document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkAsWontBePaidRequest'
            example:
              spaceId: 00000001-0000-0000-0000-000000000000
              documents:
              - 50000001-0000-0000-0000-000000000000
              - 50000002-0000-0000-0000-000000000000
              data:
                additionalComment: something
                sharedPaymentStatusEmails:
                - me@mail.com
                reason: OTHER
                otherReason: by mistake
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/partiallyApprove:
    post:
      tags:
      - Documents
      summary: ⚠️Partially approve documents
      description: Partially approve documents with provided IDs on the given space
      operationId: partiallyApproveDocuments
      requestBody:
        description: Partial document approval request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/refuse:
    post:
      tags:
      - Documents
      summary: ⚠️Refuse documents
      description: Refuse documents with provided IDs on the given space
      operationId: refuseDocuments
      requestBody:
        description: Refuse document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/reject:
    post:
      tags:
      - Documents
      summary: ⚠️Reject documents
      description: Reject documents with provided IDs on the given space
      operationId: rejectDocuments
      requestBody:
        description: Document reject request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /documentTasks/v1/tasks/suspend:
    post:
      tags:
      - Documents
      summary: ⚠️Suspend documents
      description: Suspend documents with provided IDs on the given space
      operationId: suspendDocuments
      requestBody:
        description: Suspend document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsActionRequest'
            example:
              spaceId: 7b9ec726-934b-4c1c-badc-3d14d62efc84
              documents:
              - 6b9ec726-934b-4c1c-badc-3d14d62efc840
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentsActionResult'
              example:
                success:
                - doc1
                - doc2
                failure:
                - doc3
                - doc4
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/attachments:
    get:
      tags:
      - Documents
      summary: Get list of document attachments
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of document attachments by documentId on the given space, with
        the option to filter out the result, and support pagination. <br/> Scope:
        space_read"
      operationId: getAllDocumentAttachments
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The id of document
        required: true
        schema:
          type: string
          format: uuid
      - name: tags
        in: query
        description: Filter by tags. Can be an array to filter by all tags (AND) -
          e.g. ?tags=first_tag&tags=second_tag. Or it could be a comma-separated list
          to filter by any of the values (OR) - e.g. ?tags=first_tag,second_tag.
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag
        - third_tag
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentAttachmentResult'
              examples:
                Document Attachments:
                  description: Document Attachments
                  value:
                    documentAttachments:
                    - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      documentId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      filename: doc-1.pdf
                      description: attachment for document DOC-1
                      retentionTime: 2129-01-14T19:58:47+00:00
                      status: AWAITING_UPLOAD
                      fileSize: 1024
                      fileType: pdf
                      contentType: application/pdf
                      uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                      tags:
                      - tag1
                      - tag2
                      metadata:
                        virus: hidden
                      createdAt: 2024-06-11T10:15:00Z
                      updatedAt: 2024-06-11T12:45:00Z
                    totalElements: 1
                    currentPage: 0
                    pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found - spaceId and documentId must be valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document attachment
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create attachment of the given document <br/> Scope: space_write"
      operationId: createDocumentAttachment
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The id of document
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Attachment data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentAttachmentRequest'
            examples:
              Attachment:
                description: Attachment
                value:
                  filename: doc-1.pdf
                  description: attachment for document DOC-1
                  retentionTime: 2129-01-14T19:58:47+02:00
                  fileSize: 1024
                  fileType: pdf
                  contentType: application/pdf
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    virus: hidden
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentAttachmentResult'
              examples:
                Attachment:
                  description: Attachment
                  value:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    documentId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    filename: doc-1.pdf
                    description: attachment for document DOC-1
                    retentionTime: 2129-01-14T19:58:47Z
                    fileSize: 1024
                    fileType: pdf
                    contentType: application/pdf
                    uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                    tags:
                    - tag1
                    - tag2
                    metadata:
                      virus: hidden
                    status: AWAITING_UPLOAD
                    createdAt: 2024-06-11T10:15:00Z
                    updatedAt: 2024-06-11T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found - spaceId and documentId must be valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/attachments/{documentAttachmentId}:
    get:
      tags:
      - Documents
      summary: Get document attachment info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document's attachment information by its ID on the given space <br/>
        Scope: space_read"
      operationId: getDocumentAttachment
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentAttachmentId
        in: path
        description: The document attachment's identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentAttachmentResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                documentId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                filename: doc-1.pdf
                description: attachment for document DOC-1
                retentionTime: 2129-01-14T19:58:47Z
                fileSize: 1024
                fileType: pdf
                contentType: application/pdf
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                tags:
                - tag1
                - tag2
                metadata:
                  virus: hidden
                status: AWAITING_UPLOAD
                createdAt: 2024-06-11T10:15:00Z
                updatedAt: 2024-06-11T12:45:00Z
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document attachment
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document attachment by its ID on the given space. <br/> Scope:
        space_write"
      operationId: deleteDocumentAttachment
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentAttachmentId
        in: path
        description: The document attachment's identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document attachment
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update attachment of the given document <br/> Scope: space_write"
      operationId: updateDocumentAttachment
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The id of document
        required: true
        schema:
          type: string
          format: uuid
      - name: documentAttachmentId
        in: path
        description: The id of document attachment
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Attachment data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentAttachmentRequest'
            examples:
              Attachment:
                description: Attachment
                value:
                  filename: doc-1.pdf
                  description: attachment for document DOC-1
                  retentionTime: 2129-01-14T19:58:47+02:00
                  fileSize: 1024
                  fileType: pdf
                  status: PROCESSING
                  contentType: application/pdf
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    virus: hidden
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentAttachmentResult'
              examples:
                Attachment:
                  description: Attachment
                  value:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    documentId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    filename: doc-1.pdf
                    description: attachment for document DOC-1
                    retentionTime: 2129-01-14T19:58:47Z
                    fileSize: 1024
                    fileType: pdf
                    contentType: application/pdf
                    uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                    tags:
                    - tag1
                    - tag2
                    metadata:
                      virus: hidden
                    status: AWAITING_UPLOAD
                    createdAt: 2024-06-11T10:15:00Z
                    updatedAt: 2024-06-11T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found - spaceId and documentId must be valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/attachments/{documentAttachmentId}/content:
    get:
      tags:
      - Documents
      summary: Retrieve document attachment content
      description: 'Retrieve document attachment content by its ID on the given space
        <br/> Scope: space_read'
      operationId: getDocumentAttachmentContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentAttachmentId
        in: path
        description: The document attachment identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
              examples:
                PDF Example:
                  summary: Example of a document attachment content
                  description: PDF Example
                  value: VGhpcyBpcyBhIGJpbmFyeSBleGFtcGxlIHJlcHJlc2VudGluZyBkb2N1bWVudC4=
        '302':
          description: Found
          headers:
            Location:
              description: Redirect URL
              style: simple
              schema:
                type: string
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/representations:
    get:
      tags:
      - Documents
      summary: Get list of document representations
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of document representations on the given space,\n\twith the
        option to filter out the result. The API supports pagination.\n <br/> Scope:
        space_read"
      operationId: getAllDocumentRepresentations
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: mainRepresentation
        in: query
        description: Whether the document is main or not
        schema:
          type: boolean
      - name: original
        in: query
        description: Whether the document is original or not
        schema:
          type: boolean
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentRepresentationResult'
              example:
                document_representations:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  documentId: 00000001-0000-0000-0000-000000000001
                  retentionTime: 2023-10-04T14:20:31.502921Z
                  type: legal_xml
                  filename: legal_xml.xml
                  contentType: application/xml
                  size: 20
                  main: false
                  metadata:
                    virus: hidden
                  original: false
                  uploadUrl: http://path/to/file.xml
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document representation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create document representation on the given space <br/> Scope: space_write"
      operationId: createDocumentRepresentation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRepresentationRequest'
            example:
              fileSize: 10
              retentionTime: 2023-10-04T14:20:31.502921Z
              type: legal_xml
              filename: legal_xml.xml
              contentType: application/xml
              main: false
              md5Hash: 938c2cc0dcc05f2b68c4287040cfcf71
              original: true
              metadata:
                virus: hidden
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentRepresentationResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                documentId: 00000001-0000-0000-0000-000000000001
                retentionTime: 2023-10-04T14:20:31.502921Z
                type: legal_xml
                filename: legal_xml.xml
                contentType: application/xml
                size: 20
                main: false
                metadata:
                  virus: hidden
                uploadUrl: http://path/to/file.xml
                md5Hash: 938c2cc0dcc05f2b68c4287040cfcf71
                original: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/representations/{documentRepresentationId}:
    get:
      tags:
      - Documents
      summary: Get document representation info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document representation information by its ID on the given space
        <br/> Scope: space_read"
      operationId: getDocumentRepresentation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentRepresentationId
        in: path
        description: The document representation identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok. Document representation info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentRepresentationResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                documentId: 00000001-0000-0000-0000-000000000001
                retentionTime: 2023-10-04T14:20:31.502921Z
                type: legal_xml
                filename: legal_xml.xml
                contentType: application/xml
                size: 20
                main: false
                metadata:
                  virus: hidden
                uploadUrl: http://path/to/file.xml
                md5Hash: 938c2cc0dcc05f2b68c4287040cfcf71
                original: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '404':
          description: Not Found. Document uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document representation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document representation by its ID on the given space <br/> Scope:
        space_write"
      operationId: deleteDocumentRepresentation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentRepresentationId
        in: path
        description: The document representation identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document representation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document representation by its ID on the given space <br/> Scope:
        space_write"
      operationId: updateDocumentRepresentation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentRepresentationId
        in: path
        description: The document representation identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document representation to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRepresentationRequest'
            example:
              retentionTime: 2023-10-04T14:20:31.502921Z
              type: legal_xml
              fileSize: 10
              filename: legal_xml.xml
              contentType: application/xml
              md5Hash: 938c2cc0dcc05f2b68c4287040cfcf71
              original: true
              metadata:
                virus: hidden
        required: true
      responses:
        '200':
          description: Update document representation successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentRepresentationResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                documentId: 00000001-0000-0000-0000-000000000001
                retentionTime: 2023-10-04T14:20:31.502921Z
                type: legal_xml
                filename: legal_xml.xml
                contentType: application/xml
                size: 20
                main: false
                metadata:
                  virus: hidden
                uploadUrl: http://path/to/file.xml
                md5Hash: 938c2cc0dcc05f2b68c4287040cfcf71
                original: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/representations/{documentRepresentationId}/content:
    get:
      tags:
      - Documents
      summary: Retrieve document content
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve document content by its ID on the given space <br/> Scope:
        space_read"
      operationId: getDocumentRepresentationContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentRepresentationId
        in: path
        description: The document representation identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
              examples:
                PDF Example:
                  summary: Example of a document content
                  description: PDF Example
                  value: VGhpcyBpcyBhIGJpbmFyeSBleGFtcGxlIHJlcHJlc2VudGluZyBkb2N1bWVudC4=
        '302':
          description: Found
          headers:
            Location:
              description: Redirect URL
              style: simple
              schema:
                type: string
          content:
            text/plain:
              examples:
                Redirection Example:
                  summary: Example of a redirection response
                  description: Redirection Example
                  value: http://localhost/file.pdf
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Documents
      summary: Write content to document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Set the content of document by its ID on the given space <br/> Scope:
        space_write"
      operationId: setDocumentRepresentationContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: documentRepresentationId
        in: path
        description: The document representation identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          '*/*':
            schema:
              type: object
      responses:
        '200':
          description: Ok.
        '400':
          description: Storage service does not allow direct uploading of binary content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}:complete:
    post:
      tags:
      - Documents
      summary: Mark document as completed
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Mark document on the given space as completed <br/> Scope: space_write"
      operationId: completeDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents:
    get:
      tags:
      - Documents
      summary: ⚠️Get list of documents
      description: "\tGet list of documents on the given space, with options to filter
        out the result.\n\tThe API supports pagination and sorting.\n"
      operationId: getAllDocuments
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: metadata
        in: query
        schema:
          type: array
          items:
            type: string
      - name: category
        in: query
        description: Document category to filter.
        schema:
          $ref: '#/components/schemas/DocumentCategory'
        example: PURCHASE_ORDER
      - name: status
        in: query
        schema:
          type: array
          items:
            type: string
      - name: status[ql]
        in: query
        description: Status query language DSL
        schema:
          type: string
        examples:
          example without parentheses:
            description: example without parentheses
            value: document=RECEIVED OR document=AWAITING_VALIDATION OR document=VALIDATED
              OR pay[exists]=true OR pay[notIn]=PARTIALLY_PAID,FULLY_PAID
          example with parentheses:
            description: example with parentheses
            value: (document=FULLY_APPROVED OR document=SENT) AND (pay=FULLY_PAID
              OR pay=PARTIALLY_PAID)
      - name: folder
        in: query
        description: Document folder.
        schema:
          $ref: '#/components/schemas/Folder'
        example: PURCHASES
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentResult'
              example:
                documents:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  description: Sample Document
                  source: Sample Source
                  supplier:
                    id: 00000001-0000-0000-0000-000000000001
                  customer:
                    id: 00000001-0000-0000-0000-000000000002
                  status:
                    pay: FULLY_PAID
                  category: INVOICE
                  metadata:
                    virus: hidden
                  tags:
                  - new
                  tasks:
                  - extensionName: com.unifiedpost.btx.data:approve
                    status: approve
                  retentionTime: 2023-10-04T14:20:31.502921Z
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
                totalElements: 100
                currentPage: 2
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document
      description: Create document on the given space
      operationId: createDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Document to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequest'
            example:
              waitForComplete: false
              description: This is the invoice for your new phone
              source: choruspro
              metadata:
                documentNumber: DN001
                issueDate: 2024-01-01
                dueDate: 2024-01-02
                documentType: invoice
                currencyCode: EUR
                netAmount: '200.00'
                vatAmount: '30.00'
                grossAmount: '230.00'
                openBalance: '230.00'
                vatDetails:
                - vatCode: AE
                  vatPercentage: '0'
                  netAmount: '100.00'
                  vatAmount: '10.00'
                - vatCode: AE
                  vatPercentage: '20.00'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                - vatCode: AE
                  vatPercentage: '0.9'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                paymentReference:
                  value: 001/4037/32870
                  type: STRUCTURED
                  scheme: OGM_VCS
                uploadId: '123456789'
                delivery:
                  deliveryDate: 2024-01-01
              tags:
              - new
              retentionTime: 2029-01-14T19:58:47+02:00
              supplier: 56079d21-a756-49fb-9286-9859c354aa69
              status:
                accept: ACCEPTED
              category: INVOICE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/{folder}/documents:
    get:
      tags:
      - Documents
      summary: ⚠️Get list of documents in folder
      description: "\tGet list of documents in the given folder, with options to filter
        out the result.\n\tThe API supports pagination and sorting.\n"
      operationId: getAllDocumentsInFolder
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      - name: metadata
        in: query
        schema:
          type: array
          items:
            type: string
      - name: category
        in: query
        description: Document category to filter. Can be multiple values separated
          by comma, or just one value
        explode: false
        schema:
          type: array
          items:
            type: string
        example: PURCHASE_ORDER,RECEIPT
      - name: status
        in: query
        schema:
          type: array
          items:
            type: string
      - name: status[ql]
        in: query
        description: Status query language DSL
        schema:
          type: string
        examples:
          example without parentheses:
            description: example without parentheses
            value: document=RECEIVED OR document=AWAITING_VALIDATION OR document=VALIDATED
              OR pay[exists]=true OR pay[notIn]=PARTIALLY_PAID,FULLY_PAID
          example with parentheses:
            description: example with parentheses
            value: (document=FULLY_APPROVED OR document=SENT) AND (pay=FULLY_PAID
              OR pay=PARTIALLY_PAID)
      - name: tags
        in: query
        description: tags
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag,third_tag
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentResult'
              example:
                documents:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  description: Sample Document
                  source: Sample Source
                  supplier:
                    id: 00000001-0000-0000-0000-000000000001
                  customer:
                    id: 00000001-0000-0000-0000-000000000002
                  status:
                    pay: FULLY_PAID
                  category: INVOICE
                  metadata:
                    virus: hidden
                  tags:
                  - new
                  tasks:
                  - extensionName: com.unifiedpost.btx.data:approve
                    status: approve
                  retentionTime: 2023-10-04T14:20:31.502921Z
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
                totalElements: 100
                currentPage: 2
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document in folder
      description: Create document in the given folder. It can optionally contain
        line items.
      operationId: createDocumentWithFolder
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      requestBody:
        description: Document to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequest'
            examples:
              Document:
                description: Document
                value:
                  waitForComplete: false
                  description: This is the invoice for your new phone
                  source: choruspro
                  metadata:
                    documentNumber: DN001
                    issueDate: 2024-01-01
                    dueDate: 2024-01-02
                    documentType: invoice
                    currencyCode: EUR
                    netAmount: '200.00'
                    vatAmount: '30.00'
                    grossAmount: '230.00'
                    openBalance: '230.00'
                    vatDetails:
                    - vatCode: AE
                      vatPercentage: '0'
                      netAmount: '100.00'
                      vatAmount: '10.00'
                    - vatCode: AE
                      vatPercentage: '20.00'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    - vatCode: AE
                      vatPercentage: '0.9'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    uploadId: '123456789'
                    delivery:
                      deliveryDate: 2024-01-01
                  tags:
                  - new
                  retentionTime: 2029-01-14T19:58:47+02:00
                  supplier: 56079d21-a756-49fb-9286-9859c354aa69
                  status:
                    accept: ACCEPTED
                  category: INVOICE
              Document containing lines:
                description: Document containing lines
                value:
                  waitForComplete: false
                  description: This is the invoice for your new phone
                  source: choruspro
                  metadata:
                    documentNumber: DN001
                    issueDate: 2024-01-01
                    dueDate: 2024-01-02
                    documentType: invoice
                    currencyCode: EUR
                    netAmount: '200.00'
                    vatAmount: '30.00'
                    grossAmount: '230.00'
                    openBalance: '230.00'
                    vatDetails:
                    - vatCode: AE
                      vatPercentage: '0'
                      netAmount: '100.00'
                      vatAmount: '10.00'
                    - vatCode: AE
                      vatPercentage: '20.00'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    - vatCode: AE
                      vatPercentage: '0.9'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    uploadId: '123456789'
                    delivery:
                      deliveryDate: 2024-01-01
                  tags:
                  - new
                  retentionTime: 2029-01-14T19:58:47+02:00
                  supplier: 56079d21-a756-49fb-9286-9859c354aa69
                  status:
                    accept: ACCEPTED
                  category: INVOICE
                  lines:
                  - identifier: identifier 1
                    description: Line item 1
                    itemId: item1
                    itemCategory: category
                    productIdentifiers:
                      commodityCode: '123456'
                    quantity: 2
                    unit: PCS
                    startDate: 2024-01-23
                    endDate: 2024-06-23
                    discounts:
                      value: '20.0'
                    charges:
                      value: '76.67'
                    unitPrice: '40.278192'
                    netAmount: '80.56'
                    grossAmount: '96.67'
                    vatAmount: '16.11'
                    currency: USD
                    vatRate: '0.2'
                    vatCode: VAT
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              examples:
                Document:
                  description: Document
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    supplier:
                      id: 00000001-0000-0000-0000-000000000001
                    customer:
                      id: 00000001-0000-0000-0000-000000000002
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      virus: hidden
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    createdAt: 2023-10-04T14:20:31.502921Z
                    updatedAt: 2023-10-04T14:20:31.502921Z
                Document containing lines:
                  description: Document containing lines
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    supplier:
                      id: 00000001-0000-0000-0000-000000000001
                    customer:
                      id: 00000001-0000-0000-0000-000000000002
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      virus: hidden
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    lines:
                    - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                      sequence: 1
                      identifier: identifier 1
                      description: Line item 1
                      itemId: item1
                      itemCategory: category
                      productIdentifiers:
                        commodityCode: '123456'
                      quantity: 2
                      unit: PCS
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      discounts:
                        value: '20.0'
                      charges:
                        value: '76.67'
                      unitPrice: '40.278192'
                      netAmount: '80.56'
                      grossAmount: '96.67'
                      vatAmount: '16.11'
                      currency: USD
                      vatRate: '0.2'
                      vatCode: VAT
                    createdAt: 2023-10-04T14:20:31.502921Z
                    updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}:
    get:
      tags:
      - Documents
      summary: ⚠️Get document info
      description: Get document information by its ID on the given space
      operationId: getDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok. Document info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '404':
          description: Not Found. Document uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document
      description: Delete document by its ID on the given space. Will cascade delete
        associated balance offsets.
      operationId: deleteDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document
      description: Update document by its ID on the given space by sending json with
        the changes
      operationId: updateDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRequest'
            example:
              metadata:
                documentNumber: DN001
                issueDate: 2024-01-01
                dueDate: 2024-01-02
                documentType: invoice
                currencyCode: EUR
                netAmount: '200.00'
                vatAmount: '30.00'
                grossAmount: '230.00'
                openBalance: '230.00'
                vatDetails:
                - vatCode: AE
                  vatPercentage: '0'
                  netAmount: '100.00'
                  vatAmount: '10.00'
                - vatCode: AE
                  vatPercentage: '20.00'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                - vatCode: AE
                  vatPercentage: '0.9'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                paymentReference:
                  value: 001/4037/32870
                  type: STRUCTURED
                  scheme: OGM_VCS
                uploadId: '123456789'
                delivery:
                  deliveryDate: 2024-01-01
              tags:
              - seen
              retentionTime: 2029-01-14T19:58:47+02:00
              supplier: 56079d21-a756-49fb-9286-9859c354aa69
              customer: 56079d21-a756-49fb-9286-9859c354aa69
              status:
                accept: UNACCEPTED
              category: INVOICE
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/{folder}/documents/{documentId}:
    get:
      tags:
      - Documents
      summary: ⚠️Get document info in folder
      description: Get document information by its ID in the given folder
      operationId: getDocumentByFolder
      parameters:
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: includeLines
        in: query
        description: Should include lines in the result? Default is false
        schema:
          type: boolean
      responses:
        '200':
          description: Ok. Document info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              examples:
                Document:
                  description: Document
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    supplier:
                      id: 00000001-0000-0000-0000-000000000001
                    customer:
                      id: 00000001-0000-0000-0000-000000000002
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      virus: hidden
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    createdAt: 2023-10-04T14:20:31.502921Z
                    updatedAt: 2023-10-04T14:20:31.502921Z
                Document contains lines:
                  description: Document contains lines
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    supplier:
                      id: 00000001-0000-0000-0000-000000000001
                    customer:
                      id: 00000001-0000-0000-0000-000000000002
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      virus: hidden
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    lines:
                    - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                      sequence: 1
                      identifier: identifier 1
                      description: Line item 1
                      itemId: item1
                      itemCategory: category
                      productIdentifiers:
                        commodityCode: '123456'
                      quantity: 2
                      unit: PCS
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      discounts:
                        value: '20.0'
                      charges:
                        value: '76.67'
                      unitPrice: '40.278192'
                      netAmount: '80.56'
                      grossAmount: '96.67'
                      vatAmount: '16.11'
                      currency: USD
                      vatRate: '0.2'
                      vatCode: VAT
                    createdAt: 2023-10-04T14:20:31.502921Z
                    updatedAt: 2023-10-04T14:20:31.502921Z
        '404':
          description: Not Found. Document uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document in folder
      description: Delete document by its ID in the given folder. Will cascade delete
        associated balance offsets.
      operationId: deleteDocumentByFolder
      parameters:
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document in folder
      description: Update document by its ID in the given folder by sending json with
        the changes
      operationId: updateDocumentByFolder
      parameters:
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRequest'
            example:
              metadata:
                documentNumber: DN001
                issueDate: 2024-01-01
                dueDate: 2024-01-02
                documentType: invoice
                currencyCode: EUR
                netAmount: '200.00'
                vatAmount: '30.00'
                grossAmount: '230.00'
                openBalance: '230.00'
                vatDetails:
                - vatCode: AE
                  vatPercentage: '0'
                  netAmount: '100.00'
                  vatAmount: '10.00'
                - vatCode: AE
                  vatPercentage: '20.00'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                - vatCode: AE
                  vatPercentage: '0.9'
                  netAmount: '100.00'
                  vatAmount: '20.00'
                paymentReference:
                  value: 001/4037/32870
                  type: STRUCTURED
                  scheme: OGM_VCS
                uploadId: '123456789'
                delivery:
                  deliveryDate: 2024-01-01
              tags:
              - seen
              retentionTime: 2029-01-14T19:58:47+02:00
              supplier: 56079d21-a756-49fb-9286-9859c354aa69
              customer: 56079d21-a756-49fb-9286-9859c354aa69
              status:
                accept: UNACCEPTED
              category: INVOICE
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID, Folder or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents:count:
    get:
      tags:
      - Documents
      summary: ⚠️Get count of documents
      description: Get count of documents on the given space
      operationId: getDocumentCount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        description: Document category to filter.
        required: true
        schema:
          $ref: '#/components/schemas/DocumentCategory'
        example: PURCHASE_ORDER
      - name: status
        in: query
        required: true
        schema:
          type: string
          description: List of document statuses to filter, comma separated
          example: accept,pay
      - name: folder
        in: query
        description: Document folder to filter
        required: true
        schema:
          $ref: '#/components/schemas/Folder'
        example: PURCHASES
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllStatusCountResult'
              example:
                counts:
                - statuses:
                  - accept:UNACCEPTED
                  - pay:FULLY_PAID
                  count: 5
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/{folder}/documents:count:
    get:
      tags:
      - Documents
      summary: ⚠️Count documents in folder
      description: Get count of documents in the given folder
      operationId: getDocumentCountInFolder
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
          - files
      - name: category
        in: query
        description: Document category to filter
        required: true
        schema:
          $ref: '#/components/schemas/DocumentCategory'
        example: PURCHASE_ORDER
      - name: status
        in: query
        required: true
        schema:
          type: string
          description: List of document statuses to filter, comma separated
          example: accept,payment
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllStatusCountResult'
              example:
                counts:
                - statuses:
                  - accept:UNACCEPTED
                  - pay:FULLY_PAID
                  count: 5
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/files:
    get:
      tags:
      - Documents
      summary: Get files that linked to document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get files that linked to document by its ID on the given space <br/>
        Scope: space_read"
      operationId: getFilesLinkedToDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: metadata
        in: query
        description: Filter files by metadata key=value pairs.
        schema:
          type: string
        example: metadata=folder=PURCHASES&metadata=documentCategory=INVOICE
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilesResult'
              example:
                files:
                - id: ec6f8949-c34c-4f4e-a642-040711ad3e8e
                  description: the file for document DOC-1
                  metadata:
                    folder: PURCHASES
                    delivery:
                      peppol:
                        inboundDeliveryId: 01K3SVFC3GGPKESGWYY5NEDP5J
                    documentCategory: CREDIT_NOTE
                - id: 6c81cea8-494e-4f61-9161-1aa6799e9242
                  description: the file for document DOC-2
                  metadata:
                    folder: PURCHASES
                    delivery:
                      peppol:
                        inboundDeliveryId: 01K3T63M0ZZ9DY3WED97BH6PV4
                    documentCategory: INVOICE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Link files to document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Link files to document <br/> Scope: space_write"
      operationId: linkFilesToDocument
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of file IDs needs to be linked
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileList'
            example:
              files:
              - 74d06624-9368-45dc-a6ed-79fe6c1ed587
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileList'
              example:
                files:
                - 74d06624-9368-45dc-a6ed-79fe6c1ed587
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}:jsonpatch:
    patch:
      tags:
      - Documents
      summary: ⚠️Update document with JSON patch
      description: Update document by its ID on the given space by sending JSON patch
      operationId: jsonpatchDocument
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: Document data to update
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/{folder}/documents/{documentId}:jsonpatch:
    patch:
      tags:
      - Documents
      summary: ⚠️Update document in folder via JSON patch
      description: Update document by its ID in the given folder by sending JSON patch
      operationId: jsonpatchDocumentByFolder
      parameters:
      - name: folder
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/Folder'
      - name: spaceId
        in: path
        required: true
        schema:
          type: string
      - name: documentId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        description: Document data to update
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                supplier:
                  id: 00000001-0000-0000-0000-000000000001
                customer:
                  id: 00000001-0000-0000-0000-000000000002
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  virus: hidden
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                retentionTime: 2023-10-04T14:20:31.502921Z
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID, Folder or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/files:
    get:
      tags:
      - Files
      summary: Get all files
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get all files in the space <br/> Scope: space_read"
      operationId: getAllFiles
      parameters:
      - name: filter
        in: query
        schema:
          $ref: '#/components/schemas/FileSingleParams'
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: metadata
        in: query
        description: File metadata key value
        schema:
          type: array
          items:
            type: string
        example: metadata=key=value&metadata=key1=value1
      - name: tags
        in: query
        description: Filter by tags
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag,third_tag
      - name: ql
        in: query
        description: BTX Query Language filter expression.
        schema:
          type: string
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - updatedAt
          - updatedAt.asc
          - updatedAt.desc
          - filename
          - filename.asc
          - filename.desc
          - creatorType
          - creatorType.asc
          - creatorType.desc
          - status
          - status.asc
          - status.desc
          - fileType
          - fileType.asc
          - fileType.desc
          - metadata.folder
          - metadata.folder.asc
          - metadata.folder.desc
          - metadata.documentCategory
          - metadata.documentCategory.asc
          - metadata.documentCategory.desc
        example: createdAt.asc
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllFilesResult'
              examples:
                Top-Level Files:
                  description: Top-Level Files
                  value:
                    files:
                    - id: 00000003-0000-0000-0000-000000000000
                      filename: legal_xml.xml
                      description: the file for document DOC-1
                      creatorSubject: 00000001-0001-0001-0001-000000000000
                      creatorType: user
                      retentionTime: 2029-01-14T19:58:47Z
                      status: PROCESSING
                      fileSize: 1024
                      fileType: xml
                      contentType: application/xml
                      uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                      source: com.unifiedpost.btx.connectors:peppol
                      children: []
                      tags:
                      - tag1
                      - tag2
                      metadata:
                        virus: hidden
                      createdAt: 2024-06-11T10:15:00Z
                      updatedAt: 2024-06-11T12:45:00Z
                    totalElements: 1
                    currentPage: 0
                    pageSize: 20
                List Files with Children:
                  description: List Files with Children
                  value:
                    files:
                    - id: 00000003-0000-0000-0000-000000000000
                      filename: legal_xml.xml
                      description: the file for document DOC-1
                      creatorSubject: 00000001-0001-0001-0001-000000000000
                      creatorType: user
                      retentionTime: 2029-01-14T19:58:47Z
                      status: PROCESSING
                      fileSize: 1024
                      fileType: xml
                      contentType: application/xml
                      uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                      source: com.unifiedpost.btx.connectors:peppol
                      parentFileId: 00000001-0004-0000-0000-000000000000
                      children:
                      - id: 00000003-1111-0000-0000-000000000000
                        filename: child file
                        description: the child file
                        creatorSubject: 00000001-0001-0001-0001-000000000000
                        creatorType: user
                        retentionTime: 2029-01-14T19:58:47Z
                        status: PROCESSED
                        fileSize: 1024
                        fileType: application/xml
                        contentType: application/xml
                        uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=...
                        source: email
                        parentFileId: 00000003-0000-0000-0000-000000000000
                        children: []
                        tags:
                        - tag1
                        metadata: {}
                        createdAt: 2024-06-12T10:15:00Z
                        updatedAt: 2024-06-12T12:45:00Z
                      tags:
                      - tag1
                      - tag2
                      metadata:
                        virus: hidden
                      createdAt: 2024-06-11T10:15:00Z
                      updatedAt: 2024-06-11T12:45:00Z
                    totalElements: 1
                    currentPage: 0
                    pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Files
      summary: Create file in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create file in the space <br/> Scope: space_write"
      operationId: createSpaceFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: File data to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileRequest'
            examples:
              Create File Request:
                description: Create File Request
                value:
                  filename: legal_xml.xml
                  description: the file for document DOC-1
                  creatorSubject: 00000001-0001-0001-0001-000000000000
                  creatorType: user
                  retentionTime: 2129-01-14T19:58:47+00:00
                  fileSize: 1024
                  fileType: xml
                  contentType: application/xml
                  source: com.unifiedpost.btx.connectors:peppol
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    virus: hidden
              Create Child File Request:
                description: Create Child File Request
                value:
                  filename: legal_xml.xml
                  description: the file for document DOC-1
                  creatorSubject: 00000001-0001-0001-0001-000000000000
                  creatorType: user
                  retentionTime: 2129-01-14T19:58:47+00:00
                  fileSize: 1024
                  fileType: xml
                  contentType: application/xml
                  source: com.unifiedpost.btx.connectors:peppol
                  parentFileId: 00000001-0004-0000-0000-000000000000
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    virus: hidden
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResult'
              examples:
                Top-Level File Result:
                  description: Top-Level File Result
                  value:
                    id: 00000003-0000-0000-0000-000000000000
                    filename: legal_xml.xml
                    description: the file for document DOC-1
                    creatorSubject: 00000001-0001-0001-0001-000000000000
                    creatorType: user
                    retentionTime: 2129-01-14T19:58:47Z
                    status: PROCESSING
                    fileSize: 1024
                    fileType: xml
                    contentType: application/xml
                    uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                    source: com.unifiedpost.btx.connectors:peppol
                    children: []
                    tags:
                    - tag1
                    - tag2
                    metadata:
                      virus: hidden
                    createdAt: 2024-06-11T10:15:00Z
                    updatedAt: 2024-06-11T12:45:00Z
                Child File Result:
                  description: Child File Result
                  value:
                    id: 00000003-0000-0000-0000-000000000000
                    filename: legal_xml.xml
                    description: the file for document DOC-1
                    creatorSubject: 00000001-0001-0001-0001-000000000000
                    creatorType: user
                    retentionTime: 2129-01-14T19:58:47Z
                    status: PROCESSING
                    fileSize: 1024
                    fileType: xml
                    contentType: application/xml
                    uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                    source: com.unifiedpost.btx.connectors:peppol
                    parentFileId: 00000001-0004-0000-0000-000000000000
                    children:
                    - id: 00000003-1111-0000-0000-000000000000
                      filename: child file
                      description: the child file
                      creatorSubject: 00000001-0001-0001-0001-000000000000
                      creatorType: user
                      retentionTime: 2029-01-14T19:58:47Z
                      status: PROCESSED
                      fileSize: 1024
                      fileType: application/xml
                      contentType: application/xml
                      uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=...
                      source: email
                      parentFileId: 00000003-0000-0000-0000-000000000000
                      children: []
                      tags:
                      - tag1
                      metadata: {}
                      createdAt: 2024-06-12T10:15:00Z
                      updatedAt: 2024-06-12T12:45:00Z
                    tags:
                    - tag1
                    - tag2
                    metadata:
                      virus: hidden
                    createdAt: 2024-06-11T10:15:00Z
                    updatedAt: 2024-06-11T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/files/{fileId}:
    get:
      tags:
      - Files
      summary: Get file info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get file information by its ID on the given space <br/> Scope: space_read"
      operationId: getSpaceFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: include
        in: query
        description: What extra data to include in the response.
        schema:
          type: string
        example: children
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: legal_xml.xml
                description: the file for document DOC-1
                creatorSubject: 00000001-0001-0001-0001-000000000000
                creatorType: user
                retentionTime: 2129-01-14T19:58:47Z
                status: PROCESSING
                fileSize: 1024
                fileType: xml
                contentType: application/xml
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: com.unifiedpost.btx.connectors:peppol
                children: []
                tags:
                - tag1
                - tag2
                metadata:
                  virus: hidden
                createdAt: 2024-06-11T10:15:00Z
                updatedAt: 2024-06-11T12:45:00Z
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Files
      summary: Delete file info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete file information by its ID on the given space <br/> Scope: space_write"
      operationId: deleteSpaceFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: OK
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Files
      summary: Update file in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update file in the space <br/> Scope: space_write"
      operationId: updateSpaceFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: File data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFileRequest'
            example:
              filename: legal_xml.xml
              description: the file for document DOC-1
              creatorSubject: 00000001-0001-0001-0001-000000000000
              creatorType: user
              retentionTime: 2129-01-14T19:58:47+00:00
              status: AWAITING_USER_ACTION
              fileSize: 1024
              fileType: xml
              contentType: application/xml
              source: com.unifiedpost.btx.connectors:peppol
              parentFileId: b8536327-4c29-4280-9da2-aa190e8484b7
              tags:
              - tag1
              - tag2
              metadata:
                virus: hidden
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: legal_xml.xml
                description: the file for document DOC-1
                creatorSubject: 00000001-0001-0001-0001-000000000000
                creatorType: user
                retentionTime: 2129-01-14T19:58:47Z
                status: PROCESSING
                fileSize: 1024
                fileType: xml
                contentType: application/xml
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: com.unifiedpost.btx.connectors:peppol
                children: []
                tags:
                - tag1
                - tag2
                metadata:
                  virus: hidden
                createdAt: 2024-06-11T10:15:00Z
                updatedAt: 2024-06-11T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/files/{fileId}/documents:
    get:
      tags:
      - Files
      summary: Get document that linked to file
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document file information by its ID on the given space <br/> Scope:
        space_read"
      operationId: getDocumentLinkedToFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLinkedDocumentsResult'
              example:
                documents:
                - id: d5330d4e-0d3d-4a32-b256-bdf97f9a68cb
                  description: Sample Document
                - id: 40af7dca-5556-4cf2-8aed-20a165e3071f
                  description: Another sample document
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Files
      summary: Link documents to file
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Link documents to file in the space <br/> Scope: space_write"
      operationId: linkDocumentsToFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of document IDs needs to be linked
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentList'
            example:
              documents:
              - 1853a6f9-24f4-4bbc-b743-02453a3949b8
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentList'
              example:
                documents:
                - 1853a6f9-24f4-4bbc-b743-02453a3949b8
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/files/{fileId}/content:
    get:
      tags:
      - Files
      summary: Get file content
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get file content by its ID on the given space <br/> Scope: space_read"
      operationId: getSpaceFileContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '302':
          description: Found
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/files/{fileId}/documents/{documentId}:
    delete:
      tags:
      - Files
      summary: Unlink a document from a file
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove the link between a specific document and a file in the space
        <br/> Scope: space_write"
      operationId: unlinkDocumentFromFile
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: fileId
        in: path
        description: The file identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier to unlink from the file
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/{folder}/documents/{documentId}/lines:
    get:
      tags:
      - Documents
      summary: ⚠️Get line items
      description: Retrieve document line items
      operationId: getLineItems
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllLineItemsResult'
              example:
                lines:
                - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                  sequence: 1
                  identifier: identifier 1
                  description: Line item 1
                  itemId: item1
                  itemCategory: category
                  productIdentifiers:
                    commodityCode: '123456'
                  quantity: 2
                  unit: PCS
                  startDate: 2024-01-23
                  endDate: 2024-06-23
                  discounts:
                    value: '20.0'
                  charges:
                    value: '76.67'
                  unitPrice: '40.278192'
                  netAmount: '80.56'
                  grossAmount: '96.67'
                  vatAmount: '16.11'
                  currency: USD
                  vatRate: '0.2'
                  vatCode: VAT
                totalElements: 42
                currentPage: 1
                pageSize: 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create line item(s)
      description: Create line item(s) in the document. New line items are added to
        the existing ones
      operationId: createLineItems
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
          - statements
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Line items to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineItemListRequest'
            example:
              lines:
              - identifier: identifier 1
                description: Line item 1
                itemId: item1
                itemCategory: category
                productIdentifiers:
                  commodityCode: '123456'
                quantity: 2
                unit: PCS
                startDate: 2024-01-23
                endDate: 2024-06-23
                discounts:
                  value: '20.0'
                charges:
                  value: '76.67'
                unitPrice: '40.278192'
                netAmount: '80.56'
                grossAmount: '96.67'
                vatAmount: '16.11'
                currency: USD
                vatRate: '0.2'
                vatCode: VAT
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemListResult'
              example:
                lines:
                - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                  sequence: 1
                  identifier: identifier 1
                  description: Line item 1
                  itemId: item1
                  itemCategory: category
                  productIdentifiers:
                    commodityCode: '123456'
                  quantity: 2
                  unit: PCS
                  startDate: 2024-01-23
                  endDate: 2024-06-23
                  discounts:
                    value: '20.0'
                  charges:
                    value: '76.67'
                  unitPrice: '40.278192'
                  netAmount: '80.56'
                  grossAmount: '96.67'
                  vatAmount: '16.11'
                  currency: USD
                  vatRate: '0.2'
                  vatCode: VAT
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/{folder}/documents/{documentId}/lines/{lineId}:
    get:
      tags:
      - Documents
      summary: ⚠️Get line item
      description: Get line item detail
      operationId: getLineItem
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete line item
      description: Delete line item
      operationId: deleteLineItem
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update line item
      description: Update line item
      operationId: updateLineItem
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: The folder of document
        required: true
        schema:
          type: string
          enum:
          - purchases
          - sales
          - drafts
          - inbox
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      requestBody:
        description: Line items to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLineItemRequest'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/tasks:
    get:
      tags:
      - Documents
      summary: ⚠️Get document tasks
      description: Get list of document tasks on the given document in the given space.
        The API supports pagination.
      operationId: getAllTasks
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllTaskResult'
              example:
                tasks:
                - extensionName: com.unifiedpost.com:approve
                  status: approve
                  context:
                    test: ok
                - extensionName: com.unifiedpost.com:reject
                  status: reject
                  context:
                    test: ok
                totalElements: 100
                currentPage: 2
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document task
      description: Create document task on the given document in the given space.
      operationId: createTask
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Task to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRequest'
            example:
              extensionName: com.unifiedpost.btx.data:validate+approve
              context:
                test: ok
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult'
              example:
                extensionName: com.unifiedpost.btx.data:approve
                status: approve
                context:
                  test: ok
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/tasks/{extensionName}:
    get:
      tags:
      - Documents
      summary: ⚠️Get document task info
      description: Get document task information by extension name on the given document
        in the given space.
      operationId: getTaskInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionName
        in: path
        description: The task name
        required: true
        schema:
          type: string
        example: com.unifiedpost.btx.data:approve
      responses:
        '200':
          description: Ok. Task info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult'
              example:
                extensionName: com.unifiedpost.btx.data:approve
                status: approve
                context:
                  test: ok
        '404':
          description: Not Found. Document/space uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document task
      description: Delete a document task by extension name on the given document
        in the given space.
      operationId: deleteTask
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionName
        in: path
        description: The extension name
        required: true
        schema:
          type: string
        example: com.unifiedpost.btx.data:approve
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document task
      description: Update document task by extension name on the given document in
        the given space.
      operationId: updateTask
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionName
        in: path
        description: The extension name
        required: true
        schema:
          type: string
        example: com.unifiedpost.btx.data:approve
      requestBody:
        description: Task data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
            example:
              status: in progress
        required: true
      responses:
        '200':
          description: Update task successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult'
              example:
                extensionName: com.unifiedpost.btx.data:approve
                status: approve
                context:
                  test: ok
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Document/space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/relations:
    get:
      tags:
      - Documents
      summary: Get list of document relations
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of document relations on the given space, with the option to
        filter out the result. <br/> Scope: space_read"
      operationId: getAllDocumentRelations
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: list
        in: query
        description: Filter specific relation
        schema:
          type: string
          enum:
          - parents
          - children
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllDocumentRelationsResult'
              example:
                documentRelations:
                  parents:
                  - id: a17ba374-e2cf-4858-8b0a-6c42a3165125
                    document:
                      id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      description: Sample Invoice 1
                      folder: SALES
                      category: INVOICE
                      documentNumber: INV-001
                  - id: 9aa597ce-803b-4d85-ac0a-1bff4432573c
                    document:
                      id: 0a0eaf40-58e0-4164-a915-66bc591b24a0
                      description: Sample Invoice 2
                      folder: SALES
                      category: INVOICE
                      documentNumber: INV-002
                  children:
                  - id: 88f803f1-6523-488d-97d2-cb4f262ee9d5
                    document:
                      id: a51bdf43-b4d0-4e70-bd6a-309c1071ee37
                      description: Sample Delivery Note
                      folder: SALES
                      category: CREDIT_NOTE
                      documentNumber: DN-003
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document relations
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create document relations for given document <br/> Scope: space_write"
      operationId: createDocumentRelations
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document relations to create. Requires at list one of 'parent'
          or 'children' list.
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/CreateDocumentRelationsRequest'
            examples:
              Document relations:
                description: Document relations
                value:
                  parents:
                  - 249edc81-f652-4117-bfe3-b5aa18688cc1
                  - 3432c22-f652-4117-bfe3-b5aa18a3742a2
                  children:
                  - 4f006378-3e55-4cba-8bd1-5e0e78ab468e
                  - 5cf7f2aa-a3b6-4dc5-88b9-707ce2d2988f
        required: true
      responses:
        '200':
          description: At least one succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDocumentRelationsResult'
              examples:
                Partial success:
                  description: Partial success
                  value:
                    success:
                    - 249edc81-f652-4117-bfe3-b5aa18688cc1
                    - 4f006378-3e55-4cba-8bd1-5e0e78ab468e
                    - 5cf7f2aa-a3b6-4dc5-88b9-707ce2d2988f
                    failure:
                    - 3432c22-f652-4117-bfe3-b5aa18a3742a2
        '400':
          description: Bad request body or all relation creations failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/documents/{documentId}/relations/{relationId}:
    delete:
      tags:
      - Documents
      summary: Delete document relation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document relation by id on the given space <br/> Scope: space_write"
      operationId: deleteDocumentRelation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: relationId
        in: path
        description: The document relation identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /pay/v1/spaces/{spaceId}/documents/{documentId}/balanceOffsets:
    get:
      tags:
      - Documents
      summary: Get balance offsets of a document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get balance offsets of a document on the given space <br/> Scope: space_read"
      operationId: getDocumentBalanceOffsets
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentBalanceOffsetResultList'
              example:
                balanceOffsets:
                - id: e4ff010d-e7cd-4247-a71d-86dab3b6c59d
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  amount:
                    value: '20.25'
                    currency: EUR
                  offsetType: FULL
                  aggregationStatus: AUTO_CONFIRMED
                  createdAt: 2023-10-30T15:25:11Z
                  updatedAt: 2023-10-30T15:25:11Z
                  documentId: 10000000-0000-0000-0000-000000000000
                  metadata:
                    rule: PAYREF_EXACT
                    smartLink: 'true'
                  payment:
                    id: e5352e62-e833-4194-833e-526d3d9318ed
                    reference: Invoice BTX-00129
                    status:
                      global: initiated
                      paymentProcess: started
                    endToEndId: 0a2e9932-a660-4354-82a9-b5c0897f5887
                    levelOfCertainty: AUTHORISED
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Document not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /pay/v1/spaces/{spaceId}/documents:balanceOffsets:
    post:
      tags:
      - Documents
      summary: Retrieve document list balance offsets
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve the balance offsets of a list of documents in the given space,
        ordered by document id. <br/> Scope: space_read"
      operationId: retrieveDocumentListBalanceOffsets
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of relevant document identifiers
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentListBalanceOffsetRequest'
            example:
              documents:
              - 72da25ee-b2b8-4862-803d-fe00befa0951
              - 2ad154be-b6ac-49ac-a6a8-b20f3189e186
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentBalanceOffsetResultList'
              example:
                balanceOffsets:
                - id: e4ff010d-e7cd-4247-a71d-86dab3b6c59d
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  amount:
                    value: '20.25'
                    currency: EUR
                  offsetType: FULL
                  aggregationStatus: AUTO_CONFIRMED
                  createdAt: 2024-09-11T08:30:45Z
                  updatedAt: 2024-09-11T08:30:45Z
                  documentId: 72da25ee-b2b8-4862-803d-fe00befa0951
                  metadata:
                    rule: PAYREF_EXACT
                    smartLink: 'true'
                  payment:
                    id: e5352e62-e833-4194-833e-526d3d9318ed
                    reference: Invoice BTX-00129
                    status:
                      global: initiated
                      paymentProcess: started
                    endToEndId: 0a2e9932-a660-4354-82a9-b5c0897f5887
                    levelOfCertainty: AUTHORISED
                - id: 73e3de10-e800-4036-861e-0ac44788da54
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  amount:
                    value: '47.11'
                    currency: EUR
                  offsetType: FULL
                  aggregationStatus: AUTO_CONFIRMED
                  createdAt: 2024-09-12T15:25:11Z
                  updatedAt: 2024-09-12T15:25:11Z
                  documentId: 2ad154be-b6ac-49ac-a6a8-b20f3189e186
                  metadata:
                    rule: PAYREF_EXACT
                    smartLink: 'true'
                  payment:
                    id: e5352e62-e833-4194-833e-526d3d9318ed
                    reference: Invoice BTX-00129
                    status:
                      global: initiated
                      paymentProcess: started
                    endToEndId: 0a2e9932-a660-4354-82a9-b5c0897f5887
                    levelOfCertainty: AUTHORISED
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/documents:paydetails:
    post:
      tags:
      - Documents
      summary: Get documents payment details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get documents payment details by the IDs on the given space <br/> Scope:
        space_read"
      operationId: getDocumentPaymentDetails
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Document Payment Details to request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentPaymentDetailsRequest'
            example:
              documents:
              - 00000004-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentPaymentDetailsResultList'
              example:
                documents:
                - id: 00000001-0000-0000-0000-000000000000
                  metadata:
                    documentNumber: DN001
                    issueDate: 2024-01-01
                    dueDate: 2024-01-02
                    documentType: invoice
                    currencyCode: EUR
                    netAmount: '200.00'
                    vatAmount: '30.00'
                    grossAmount: '230.00'
                    openBalance: '230.00'
                    vatDetails:
                    - vatCode: AE
                      vatPercentage: '0'
                      netAmount: '100.00'
                      vatAmount: '10.00'
                    - vatCode: AE
                      vatPercentage: '20.00'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    - vatCode: AE
                      vatPercentage: '0.9'
                      netAmount: '100.00'
                      vatAmount: '20.00'
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    uploadId: '123456789'
                    delivery:
                      deliveryDate: 2024-01-01
                  status:
                    pay: FULLY_PAID
                  tasks:
                  - extensionName: com.unifiedpost.btx.data:approve
                    status: approve
                  supplier:
                    id: 06141394-72eb-4eed-bfa5-84caf4b78470
                    name: The Supplier
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  category: INVOICE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/relations:
    get:
      tags:
      - Connections
      summary: Get list of connection relations
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of connection relations on the given space. The API supports
        pagination.\n <br/> Scope: space_read"
      operationId: getAllConnectionRelations
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllConnectionRelationResult'
              example:
                connection_relations:
                - id: 00000011-0000-0000-0000-000000000000
                  connection:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/api/v1/spaces/space_1
                    globalIdentifiers:
                      fr:siret: '12345678901234'
                      nl:kvk: '87654321'
                      be:vat: '123456789'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      logo: https://somelinks.com/logo.jpg
                      website: https://mycompanywebsite.com
                      notes: some notes
                      industry: Agriculture, Forestry And Fishing
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                  role: role2
                  createdAt: 2023-06-01T15:25:10Z
                  updatedAt: 2023-06-02T15:25:10Z
                - id: 00000012-0000-0000-0000-000000000000
                  connection:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/api/v1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      logo: https://somelinks.com/logo.jpg
                      website: https://mycompanywebsite.com
                      notes: some notes
                      industry: Agriculture, Forestry And Fishing
                    firstName: John
                    lastName: Doe
                  role: role1
                  createdAt: 2023-06-01T15:25:10Z
                  updatedAt: 2023-06-02T15:25:10Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create connection relation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create connection relation on the given space <br/> Scope: space_write"
      operationId: createConnectionRelation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection Relation to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionRelationRequest'
            example:
              role: CTO
              relatedConnectionId: 00000004-0000-0000-0000-000000000000
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionRelationResult'
              examples:
                Business Connection Relation:
                  description: Business Connection Relation
                  value:
                    id: 00000011-0000-0000-0000-000000000000
                    connection:
                      type: business
                      id: 00000001-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        fr:siret: '12345678901234'
                        nl:kvk: '87654321'
                        be:vat: '123456789'
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Nitzsche Lodge
                          house: '80728'
                          postalCode: '3110'
                          city: Fernandahaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      legalName: Unifiedpost Group
                      tradeName: unifiedpost
                      businessType: ENTERPRISE
                    role: role2
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
                Person Connection Relation:
                  description: Person Connection Relation
                  value:
                    id: 00000012-0000-0000-0000-000000000000
                    connection:
                      type: person
                      id: 00000002-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Milo Crossroad
                          house: '7850'
                          postalCode: '3100'
                          city: Kubhaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      firstName: John
                      lastName: Doe
                    role: role1
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found. Connection relation uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/relations/{relationId}:
    get:
      tags:
      - Connections
      summary: Get connection relation info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get connection relation information by its ID on the given space <br/>
        Scope: space_read"
      operationId: getConnectionRelation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: relationId
        in: path
        description: The connection relation identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok. Connection relation info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionRelationResult'
              examples:
                Business Connection Relation:
                  description: Business Connection Relation
                  value:
                    id: 00000011-0000-0000-0000-000000000000
                    connection:
                      type: business
                      id: 00000001-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        fr:siret: '12345678901234'
                        nl:kvk: '87654321'
                        be:vat: '123456789'
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Nitzsche Lodge
                          house: '80728'
                          postalCode: '3110'
                          city: Fernandahaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      legalName: Unifiedpost Group
                      tradeName: unifiedpost
                      businessType: ENTERPRISE
                    role: role2
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
                Person Connection Relation:
                  description: Person Connection Relation
                  value:
                    id: 00000012-0000-0000-0000-000000000000
                    connection:
                      type: person
                      id: 00000002-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Milo Crossroad
                          house: '7850'
                          postalCode: '3100'
                          city: Kubhaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      firstName: John
                      lastName: Doe
                    role: role1
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
        '404':
          description: Not Found. Connection relation uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Connections
      summary: Delete connection relation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete connection relation by its ID on the given space <br/> Scope:
        space_write"
      operationId: deleteConnectionRelation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: relationId
        in: path
        description: The connection relation identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Connections
      summary: Update connection relation
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection relation by its ID on the given space <br/> Scope:
        space_write"
      operationId: updateConnectionRelation
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: relationId
        in: path
        description: The connection relation identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection relation data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConnectionRelationRequest'
            example:
              role: CTO
              relatedConnectionId: 00000004-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: Update connection relation successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionRelationResult'
              examples:
                Business Connection Relation:
                  description: Business Connection Relation
                  value:
                    id: 00000011-0000-0000-0000-000000000000
                    connection:
                      type: business
                      id: 00000001-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        fr:siret: '12345678901234'
                        nl:kvk: '87654321'
                        be:vat: '123456789'
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Nitzsche Lodge
                          house: '80728'
                          postalCode: '3110'
                          city: Fernandahaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      legalName: Unifiedpost Group
                      tradeName: unifiedpost
                      businessType: ENTERPRISE
                    role: role2
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
                Person Connection Relation:
                  description: Person Connection Relation
                  value:
                    id: 00000012-0000-0000-0000-000000000000
                    connection:
                      type: person
                      id: 00000002-0000-0000-0000-000000000000
                      spaceUrl: https://entity.store/api/v1/spaces/space_1
                      globalIdentifiers:
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                      localIdentifier: '001'
                      assignedAccountId: '001'
                      alias: UP
                      connectionStatus: CONNECTED
                      relationType: CUSTOMER
                      addresses:
                        main:
                          streetName: Milo Crossroad
                          house: '7850'
                          postalCode: '3100'
                          city: Kubhaven
                          country: Belgium
                          countryCode: BE
                      tags:
                      - favorite
                      - liked
                      active: true
                      metadata:
                        channels:
                          main: delivery_on_platform
                          secondary: email
                        department: Accounting
                        logo: https://somelinks.com/logo.jpg
                        website: https://mycompanywebsite.com
                        notes: some notes
                        industry: Agriculture, Forestry And Fishing
                      firstName: John
                      lastName: Doe
                    role: role1
                    createdAt: 2023-06-01T15:25:10Z
                    updatedAt: 2023-06-02T15:25:10Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found. Connection relation uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/connectors:
    post:
      tags:
      - Connections
      summary: Add selected connector
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Add the selected connector which user chooses on the connection (customer/supplier)
        <br/> Scope: space_write"
      operationId: addSelectedConnector
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Connector to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorRequest'
            examples:
              Email connector:
                description: Email connector
                value:
                  name: email
                  settings:
                    emailAddress: john.doe@example.com
                  active: true
              Peppol connector:
                description: Peppol connector
                value:
                  extensionId: 00000001-0001-0000-0000-000000000001
                  name: cross-peppol
                  namespace: com.unifiedpost.btx.connectors
                  settings:
                    peppolAccessPoint: access-point
                    peppolID: '12345'
                  active: true
        required: true
      responses:
        '201':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionDetailsResult'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections:
    get:
      tags:
      - Connections
      summary: Get list of connections
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of connections on the given space with optional filtering
        by identifiers.\n\tThe API supports pagination and sorting.\n <br/> Scope:
        space_read"
      operationId: getAllConnections
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: identifierValue
        in: query
        description: Connection identifier (e.g. VAT number)
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Connection identifier (e.g. VAT number)
        schema:
          type: string
      - name: name
        in: query
        description: Connection name for searching
        schema:
          type: string
      - name: relationTypes
        in: query
        description: Relation Types for searching. Can be multiple values separated
          by comma, or just one value.
        schema:
          type: string
      - name: tags
        in: query
        description: Filter by tags. Can be an array to filter by all tags (AND) -
          e.g. ?tags=first_tag&tags=second_tag. Or it could be a comma-separated list
          to filter by any of the values (OR) - e.g. ?tags=first_tag,second_tag.
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag
        - third_tag
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - name
          - name.asc
          - name.desc
          - type
          - type.asc
          - type.desc
          - assignedAccountId
          - assignedAccountId.asc
          - assignedAccountId.desc
          - businessType
          - businessType.asc
          - businessType.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllConnectionsResult'
              example:
                connections:
                - type: business
                  id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  localIdentifier: Local123
                  assignedAccountId: Local123
                  alias: Sample Connection
                  connectionStatus: CONNECTED
                  relationType: SUPPLIER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - tag1
                  - tag2
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  legalName: Sample Business
                  tradeName: Trade Business
                  businessType: ENTERPRISE
                - type: person
                  id: 12345678-90ab-cdef-1234-567890abcdef
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  localIdentifier: '001'
                  assignedAccountId: '001'
                  alias: Sample Person
                  connectionStatus: CONNECTED
                  relationType: CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - tag3
                  - tag4
                  active: false
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  firstName: John
                  lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create connection
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create connection on the given space <br/> Scope: space_write"
      operationId: createConnection
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionRequest'
            examples:
              PersonConnection:
                description: PersonConnection
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationType: CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  firstName: John
                  lastName: Doe
              BusinessConnection:
                description: BusinessConnection
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siren: '530514157'
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:en: '0400282475'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  localIdentifier: '001'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationType: CUSTOMER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionDetailsResultWithPaymentAccounts'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}:
    get:
      tags:
      - Connections
      summary: Get connection info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get connection information by its ID on the given space <br/> Scope:
        space_read"
      operationId: getConnection
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok. Connection info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionDetailsResult'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    firstName: John
                    lastName: Doe
        '404':
          description: Not Found. Connection uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Connections
      summary: Delete connection
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete connection by its ID on the given space <br/> Scope: space_write"
      operationId: deleteConnection
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: Ok.
        '404':
          description: UUID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Connections
      summary: Update connection
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection by its ID on the given space <br/> Scope: space_write"
      operationId: updateConnection
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Connection data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConnectionRequest'
            examples:
              Update Person Connection Request:
                description: Update Person Connection Request
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: Johnny
                  connectionStatus: CONNECTED
                  relationType: CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  firstName: Joan
                  lastName: Doe
              Update Business Connection Request:
                description: Update Business Connection Request
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  localIdentifier: '001'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationType: SUPPLIER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '200':
          description: Update connection successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionDetailsResult'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    localIdentifier: '001'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationType: CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/paymentAccounts:
    get:
      tags:
      - Connections
      summary: Get payment accounts for connection owned by space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of payment accounts for connection owned by space <br/> Scope:
        space_read"
      operationId: getAllConnectionPaymentAccounts
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllPaymentAccountsResult'
              example:
                paymentAccounts:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  identifier: BE19519469892112
                  scheme: IBAN
                  country: BE
                  currency: EUR
                  bank:
                    identifier: ABNABE2AIDJ
                    scheme: BIC
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  connections:
                  - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                    type: person
                    name: John Doe
                    alias: Johnny
                    defaultPaymentAccount: true
                  address:
                    country: BE
                    townName: Gent
                    addressType: BIZZ
                    streetName: Kortrijksesteenweg
                    buildingNumber: '1146'
                    postCode: '9051'
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create payment account for connection owned by space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create the payment account for connection owned by space <br/> Scope:
        space_write"
      operationId: createConnectionPaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Payment account to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionPaymentAccountRequest'
            example:
              identifier: BE19519469892112
              scheme: IBAN
              bank:
                identifier: ABNABE2AIDJ
                scheme: BIC
              country: BE
              currency: EUR
              ownedBySpace: true
              active: true
              isDefault: true
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                identifier: BE19519469892112
                scheme: IBAN
                country: BE
                currency: EUR
                bank:
                  identifier: ABNABE2AIDJ
                  scheme: BIC
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                ownedBySpace: true
                active: true
                ownerName: UP RO
                connections:
                - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                  type: person
                  name: John Doe
                  alias: Johnny
                  defaultPaymentAccount: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/paymentAccounts/{paymentAccountId}:
    patch:
      tags:
      - Connections
      summary: Update payment account in context of connection
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Allow to set the default flag and ownerName of connection payment account
        <br/> Scope: space_write"
      operationId: updateConnectionPaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: paymentAccountId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Default payment account data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConnectionPaymentAccountRequest'
            examples:
              Update default payment account Request:
                description: Update default payment account Request
                value:
                  ownerName: New owner
                  isDefault: true
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionPaymentAccountListItem'
              example: "{\n\"id\" : \"0ca2797b-6365-4bf2-a490-247075e3cede\",\n\"\
                identifier\" : \"BE19519469892112\",\n\"scheme\" : \"IBAN\",\n\"country\"\
                \ : \"BE\",\n\"currency\" : \"EUR\",\n\"bank\" : {\n\t\"scheme\" :
                \"BIC\",\n\t\"identifier\" : \"ABNABE2AIDJ\"\n}\n\"spaceId\" : \"\
                56079d21-a756-49fb-9286-9859c354aa69\",\n\"ownedBySpace\" : true,\n\
                \"active\" : true,\n\"ownerName\" : \"UP RO\",\n\"address\": {\n\t\
                \"country\": \"BE\",\n\t\"townName\": \"Gent\",\n\t\"addressType\"\
                : \"BIZZ\",\n\t\"streetName\": \"Kortrijksesteenweg\",\n\t\"buildingNumber\"\
                : \"1146\",\n\t\"postCode\": \"9051\"\n},\n\"isDefault\": true\n}"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/taxInfo:
    get:
      tags:
      - Connections
      summary: Get tax information
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve the tax information associated with the given connection <br/>
        Scope: space_read"
      operationId: getTaxInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: includeTaxRegistrations
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                b2cIndicator: true
                customerClassification: '1'
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create tax information
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Store Valitax specific Connection information <br/> Scope: space_write"
      operationId: createConnectionTaxInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax Information to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxInfoRequest'
            example:
              corporateId: corporate456
              b2cIndicator: true
              customerClassification: '1'
              smallEnterprise: true
              businessUnit: HEAD_OFFICE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                b2cIndicator: true
                customerClassification: '1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Connections
      summary: Delete tax information
      description: |-
        <div class='my-preview'><span>Preview: The API is in development or testing phases and the interface could still change slightly.</span></div> <br/> Delete tax information associated for the connection in the given space. Will cascade delete tax registrations.
         <br/> Scope: space_write
      operationId: deleteTaxInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Connections
      summary: Update tax information
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update tax information <br/> Scope: space_write"
      operationId: updateTaxInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax information to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxInfoRequest'
            example:
              corporateId: corporate456
              b2cIndicator: true
              customerClassification: '1'
              smallEnterprise: true
              businessUnit: HEAD_OFFICE
        required: true
      responses:
        '200':
          description: Tax information updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                b2cIndicator: true
                customerClassification: '1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/taxRegistrations:
    post:
      tags:
      - Connections
      summary: Create tax registration
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create connection's VAT registration <br/> Scope: space_write"
      operationId: createTaxRegistration
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax Information to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxRegistrationRequest'
            example:
              taxId: DE44444444
              country: US
              type: Corporate
              voluntaryTax: true
              oss: false
              startDate: 2024-01-23
              endDate: 2025-01-23
              vatGroup:
                name: Retail company 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxRegistrationResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                taxId: DE44444444
                country: US
                type: Corporate
                voluntaryTax: true
                oss: false
                startDate: 2024-01-23
                endDate: 2025-01-23
                vatGroup:
                  name: Retail company 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/connections/{connectionId}/taxRegistrations/{taxRegistrationId}:
    delete:
      tags:
      - Connections
      summary: Delete tax registration of a connection
      description: |-
        <div class='my-preview'><span>Preview: The API is in development or testing phases and the interface could still change slightly.</span></div> <br/> Delete tax registration by ID.
         <br/> Scope: space_write
      operationId: deleteTaxRegistration
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: taxRegistrationId
        in: path
        description: The tax registration identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Connections
      summary: Update tax registration
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection's VAT registration <br/> Scope: space_write"
      operationId: updateTaxRegistration
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: taxRegistrationId
        in: path
        description: The tax registration identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax Registration to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxRegistrationRequest'
            example:
              taxId: DE44444444
              country: US
              type: Corporate
              voluntaryTax: true
              oss: false
              startDate: 2024-01-23
              endDate: 2025-01-23
              vatGroup:
                name: Retail company 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '200':
          description: Update tax registration successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxRegistrationResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                taxId: DE44444444
                country: US
                type: Corporate
                voluntaryTax: true
                oss: false
                startDate: 2024-01-23
                endDate: 2025-01-23
                vatGroup:
                  name: Retail company 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:assignConnections:
    post:
      tags:
      - Payment Accounts
      summary: Assign connection(s) to payment account
      description: 'Assign one or more connections to a payment account <br/> Scope:
        space_write'
      operationId: paymentAccountAssignConnections
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of connection ids to assign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionsList'
            example:
              connections:
              - 57977521-12cb-4863-91cf-8c171b40a789
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllPaymentAccountsResult'
              example:
                paymentAccounts:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  identifier: BE19519469892112
                  scheme: IBAN
                  country: BE
                  currency: EUR
                  bank:
                    identifier: ABNABE2AIDJ
                    scheme: BIC
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  connections:
                  - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                    type: person
                    name: John Doe
                    alias: Johnny
                    defaultPaymentAccount: true
                  address:
                    country: BE
                    townName: Gent
                    addressType: BIZZ
                    streetName: Kortrijksesteenweg
                    buildingNumber: '1146'
                    postCode: '9051'
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:unassignConnections:
    post:
      tags:
      - Payment Accounts
      summary: Unassign connection(s) from payment account
      description: 'Unassign one or more connections from a payment account <br/>
        Scope: space_write'
      operationId: paymentAccountUnassignConnections
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of connection ids to unassign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionsList'
            example:
              connections:
              - 57977521-12cb-4863-91cf-8c171b40a789
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllPaymentAccountsResult'
              example:
                paymentAccounts:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  identifier: BE19519469892112
                  scheme: IBAN
                  country: BE
                  currency: EUR
                  bank:
                    identifier: ABNABE2AIDJ
                    scheme: BIC
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  connections:
                  - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                    type: person
                    name: John Doe
                    alias: Johnny
                    defaultPaymentAccount: true
                  address:
                    country: BE
                    townName: Gent
                    addressType: BIZZ
                    streetName: Kortrijksesteenweg
                    buildingNumber: '1146'
                    postCode: '9051'
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/paymentAccounts:
    get:
      tags:
      - Payment Accounts
      summary: Get payment accounts on the given space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of payment accounts on the given space <br/> Scope: space_read"
      operationId: getAllPaymentAccounts
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: entityPaymentAccountId
        in: query
        description: The payment account id in Entity Store
        schema:
          type: string
          format: uuid
        example: 863f2e78-69d4-4aab-abc7-f65334ea61ac
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllPaymentAccountsResult'
              example:
                paymentAccounts:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  identifier: BE19519469892112
                  scheme: IBAN
                  country: BE
                  currency: EUR
                  bank:
                    identifier: ABNABE2AIDJ
                    scheme: BIC
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  connections:
                  - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                    type: person
                    name: John Doe
                    alias: Johnny
                    defaultPaymentAccount: true
                  address:
                    country: BE
                    townName: Gent
                    addressType: BIZZ
                    streetName: Kortrijksesteenweg
                    buildingNumber: '1146'
                    postCode: '9051'
                  createdAt: 2023-10-04T14:20:31.502921Z
                  updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Payment Accounts
      summary: Create payment account owned by space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create a payment account owned by space <br/> Scope: space_write"
      operationId: createPaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Payment account to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAccountRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                identifier: BE19519469892112
                scheme: IBAN
                country: BE
                currency: EUR
                bank:
                  identifier: ABNABE2AIDJ
                  scheme: BIC
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                ownedBySpace: true
                active: true
                ownerName: UP RO
                connections:
                - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                  type: person
                  name: John Doe
                  alias: Johnny
                  defaultPaymentAccount: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/paymentAccounts/{paymentAccountId}:
    get:
      tags:
      - Payment Accounts
      summary: Get payment account
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get payment account by its ID owned by the given space <br/> Scope:
        space_read"
      operationId: getPaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                identifier: BE19519469892112
                scheme: IBAN
                country: BE
                currency: EUR
                bank:
                  identifier: ABNABE2AIDJ
                  scheme: BIC
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                ownedBySpace: true
                active: true
                ownerName: UP RO
                connections:
                - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                  type: person
                  name: John Doe
                  alias: Johnny
                  defaultPaymentAccount: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Payment Accounts
      summary: Update payment account
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update payment account by its ID owned by the given space <br/> Scope:
        space_write"
      operationId: updatePaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Payment Account data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentAccountRequest'
        required: true
      responses:
        '200':
          description: Update payment account successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                identifier: BE19519469892112
                scheme: IBAN
                country: BE
                currency: EUR
                bank:
                  identifier: ABNABE2AIDJ
                  scheme: BIC
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                ownedBySpace: true
                active: true
                ownerName: UP RO
                connections:
                - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                  type: person
                  name: John Doe
                  alias: Johnny
                  defaultPaymentAccount: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Payment Accounts
      summary: Delete payment account
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete payment account by its ID owned by the given space <br/> Scope:
        space_write"
      operationId: deletePaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: The payment account was successfully deleted.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Payment Accounts
      summary: Patch payment account
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Patch payment account by its ID owned by the given space <br/> Scope:
        space_write"
      operationId: patchPaymentAccount
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: paymentAccountId
        in: path
        description: The payment account uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Payment Account data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePaymentAccountRequest'
        required: true
      responses:
        '200':
          description: Update payment account successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAccountResult'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                identifier: BE19519469892112
                scheme: IBAN
                country: BE
                currency: EUR
                bank:
                  identifier: ABNABE2AIDJ
                  scheme: BIC
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                ownedBySpace: true
                active: true
                ownerName: UP RO
                connections:
                - id: 3b0291e3-2a54-487f-8563-57391ef8535e
                  type: person
                  name: John Doe
                  alias: Johnny
                  defaultPaymentAccount: true
                createdAt: 2023-10-04T14:20:31.502921Z
                updatedAt: 2023-10-04T14:20:31.502921Z
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:
    get:
      tags:
      - Spaces
      summary: Get space locked setting value
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get space locked setting value <br/> Scope: space_read"
      operationId: getSpaceLockedSettingValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
        '404':
          description: Space locked setting not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Spaces
      summary: Update space locked setting value
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update space locked setting value <br/> Scope: space_write"
      operationId: updateSpaceLockedSettingValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSpaceLockedSettingRequest'
            example:
              value: '10'
              lockId: 3bf1fba7-0bdd-4a50-b53c-3abd74ba98a3
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
                lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    post:
      tags:
      - Spaces
      summary: Create space locked setting
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create space locked setting <br/> Scope: space_write"
      operationId: createSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting value to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceLockedSettingRequest'
            example:
              value: '1'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingResult'
              example:
                id: e7fca31b-0961-4cb1-9a6a-c17ca42df19e
                spaceId: 367b32b8-3c9f-49a2-b7e7-2224b1247fe7
                settingKey: referenceNumber
                settingValue: '1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Spaces
      summary: Delete space locked setting
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete space locked setting <br/> Scope: space_write"
      operationId: deleteSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:getValueAndLock:
    post:
      tags:
      - Spaces
      summary: Get space locked setting value and lock
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get space locked setting value and lock <br/> Scope: space_write"
      operationId: getSpaceLockedSettingValueAndLock
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
                lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:deleteLock:
    post:
      tags:
      - Spaces
      summary: Remove lock for space locked setting
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove lock for space locked setting <br/> Scope: space_write"
      operationId: removeLockForSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting data to delete lock
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSpaceLockedSettingLockRequest'
            example:
              lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/{folder}/directories:
    post:
      tags:
      - Documents
      summary: Create directory
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create a directory in the given folder and space <br/> Scope: space_write"
      operationId: createDirectory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      requestBody:
        description: Directory to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectoryRequest'
            example:
              name: Fruits
              parentDirectoryId: 44d929f7-952d-4283-9010-8a63a16831b3
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryResponse'
              example:
                id: a00f8ca7-cd3b-4a2a-93c5-919a8c126ce5
                spaceId: f654868c-a30c-4286-b3be-41c58ef220a4
                name: Fruits
                folder: FILES
                parentDirectory:
                  id: 44d929f7-952d-4283-9010-8a63a16831b3
                  name: Plant
                timestamps:
                  createdAt: 2025-07-21T16:08:33Z
                  updatedAt: 2025-07-21T16:09:33Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/{folder}/directories/{directoryId}:
    get:
      tags:
      - Documents
      summary: Get directory details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get details of directory on the given space. <br/> Scope: space_read"
      operationId: getDirectoryDetails
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: directoryId
        in: path
        description: The directory identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - timestamps
        example: timestamps
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryResponse'
              example:
                id: a00f8ca7-cd3b-4a2a-93c5-919a8c126ce5
                spaceId: f654868c-a30c-4286-b3be-41c58ef220a4
                name: Fruits
                folder: FILES
                parentDirectory:
                  id: 44d929f7-952d-4283-9010-8a63a16831b3
                  name: Plant
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete directory
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete directory on the given space. <br/> Scope: space_write"
      operationId: deleteDirectory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: directoryId
        in: path
        description: The directory identifier.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update directory details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update directory details on the given space. <br/> Scope: space_write"
      operationId: updateDirectory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: directoryId
        in: path
        description: The directory identifier.
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Directory to update
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/UpdateDirectoryRequest'
            examples:
              Directory:
                description: Directory
                value:
                  name: Fruits
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryResponse'
              example:
                id: a00f8ca7-cd3b-4a2a-93c5-919a8c126ce5
                spaceId: f654868c-a30c-4286-b3be-41c58ef220a4
                name: Fruits
                folder: FILES
                parentDirectory:
                  id: 44d929f7-952d-4283-9010-8a63a16831b3
                  name: Plant
                timestamps:
                  createdAt: 2025-07-21T16:08:33Z
                  updatedAt: 2025-07-21T16:09:33Z
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/{folder}/directories/{directoryId}/content:
    get:
      tags:
      - Documents
      summary: Get directory contents
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get directories and documents in a directory <br/> Scope: space_read"
      operationId: listDirectoryContents
      parameters:
      - name: spaceId
        in: path
        description: The space identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: directoryId
        in: path
        description: The directory identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/FolderItemInclude'
        example: timestamps,metadata
      - name: name[icont]
        in: query
        description: Term used to search by item name (directories) or description
          (documents)
        schema:
          type: string
        example: Sale invoice
      - name: name
        in: query
        description: Exact name match for item name (directories) or description (documents)
        schema:
          type: string
        example: Sale invoice 2
      - name: type
        in: query
        description: "Filter by item type: either 'DOCUMENT' or 'DIRECTORY'"
        schema:
          $ref: '#/components/schemas/FolderItemType'
        example: DOCUMENT
      - name: sortBy
        in: query
        description: 'Sort results by field. Supported values: createdAt, createdAt.asc,
          createdAt.desc, updatedAt, updatedAt.asc, updatedAt.desc, name, name.asc,
          name.desc, type, type.asc, type.desc'
        schema:
          type: string
        example: name.asc
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFolderItemsResponse'
              example:
                items:
                - id: 19510e39-4936-472d-8b20-2ca14bc4edb8
                  name: Sale invoice 2
                  type: document
                  metadata:
                    documentNumber: SALE02
                  timestamps:
                    createdAt: 2025-07-21T16:08:33Z
                    updatedAt: 2025-07-21T16:09:33Z
                - id: 059c6942-05e6-4844-bb5a-20e110317ba6
                  name: UP Store
                  type: directory
                  timestamps:
                    createdAt: 2025-07-21T15:25:11Z
                    updatedAt: 2025-07-21T15:25:11Z
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v2/spaces/{spaceId}/{folder}/content:
    get:
      tags:
      - Documents
      summary: Get root directory contents
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get the top-level (root) directories and documents <br/> Scope: space_read"
      operationId: listRootDirectoryContents
      parameters:
      - name: spaceId
        in: path
        description: The space identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder of the root items (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/FolderItemInclude'
        example: timestamps,metadata
      - name: name[icont]
        in: query
        description: Term used to search by item name (directories) or description
          (documents)
        schema:
          type: string
        example: Sale invoice
      - name: name
        in: query
        description: Exact name match for item name (directories) or description (documents)
        schema:
          type: string
        example: Sale invoice 2
      - name: type
        in: query
        description: "Filter by item type: either 'DOCUMENT' or 'DIRECTORY'"
        schema:
          $ref: '#/components/schemas/FolderItemType'
        example: DOCUMENT
      - name: sortBy
        in: query
        description: 'Sort results by field. Supported values: createdAt, createdAt.asc,
          createdAt.desc, updatedAt, updatedAt.asc, updatedAt.desc, name, name.asc,
          name.desc, type, type.asc, type.desc'
        schema:
          type: string
        example: name.asc
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFolderItemsResponse'
              example:
                items:
                - id: 19510e39-4936-472d-8b20-2ca14bc4edb8
                  name: Sale invoice 2
                  type: document
                  metadata:
                    documentNumber: SALE02
                  timestamps:
                    createdAt: 2025-07-21T16:08:33Z
                    updatedAt: 2025-07-21T16:09:33Z
                - id: 059c6942-05e6-4844-bb5a-20e110317ba6
                  name: UP Store
                  type: directory
                  timestamps:
                    createdAt: 2025-07-21T15:25:11Z
                    updatedAt: 2025-07-21T15:25:11Z
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v2/spaces/{spaceId}/{folder}/directories/{directoryId}:move:
    post:
      tags:
      - Documents
      summary: Move directory
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Move a directory in another parent directory that belongs to the same
        space and the same folder. <br/> Scope: space_write"
      operationId: moveDirectory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: folder
        in: path
        description: Folder which the directory belongs to (case insensitive)
        required: true
        schema:
          $ref: '#/components/schemas/FolderLowercase'
      - name: directoryId
        in: path
        description: The directory identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Parent directory
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveDirectoryRequest'
            example:
              parentDirectoryId: 44d929f7-952d-4283-9010-8a63a16831b3
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryResponse'
              example:
                id: a00f8ca7-cd3b-4a2a-93c5-919a8c126ce5
                spaceId: f654868c-a30c-4286-b3be-41c58ef220a4
                name: Fruits
                folder: FILES
                parentDirectory:
                  id: 44d929f7-952d-4283-9010-8a63a16831b3
                  name: Plant
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}/lines:
    get:
      tags:
      - Documents
      summary: Get document lines v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve document lines v2 <br/> Scope: space_read"
      operationId: getLineItemsV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllLineItemsResultV2'
              example:
                lines:
                - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                  sequence: 1
                  data:
                    $schema: 
                      https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                    quantity: '2'
                    unit: H87
                    netAmount: '80.56'
                    currency: USD
                    metadata:
                      externalLineId: A
                      notes:
                      - code: AAA
                        text: Goods item description
                      - code: AAB
                        text: Net 60
                      buyerAccountingReference: CUST-001
                      invoiceReferences:
                      - invoiceReference: ABC002
                        invoiceType: '380'
                        issueDate: 2024-01-14
                        invoiceNumber: ABC002
                      delivery:
                        name: xxxxxx
                        address:
                          department: Service achat
                          streetName: RUE DES FLEURS
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          townName: LIBOURNE CEDEX
                          postCode: '33506'
                          country: FR
                        deliveryDate: 2024-01-10
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      allowances:
                      - netAmount: '20.0'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '76.67'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                    pricing:
                      itemNetPrice: '80.56'
                      itemGrossPrice: '96.67'
                      itemPriceQuantity: '40.278192'
                      itemPriceDiscount: '10.0'
                    vatDetails:
                      vatCategory: S
                      vatPercentage: '0.2'
                      vatAmount: '16.11'
                    productIdentifiers:
                      itemId: item1
                      itemCategory: Electronics
                      itemName: Sony WH-1000XM6
                      itemDescription: Noise-cancelling wireless headphones with Bluetooth.
                totalElements: 42
                currentPage: 1
                pageSize: 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Documents
      summary: Replace document lines v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Replace lines v2 in the document. Overwrite all the lines of a document
        <br/> Scope: space_write"
      operationId: replaceLineItemsV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Line items to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineItemListRequestV2'
            example:
              lines:
              - $schema: 
                  https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                quantity: '2'
                unit: H87
                netAmount: '80.56'
                currency: USD
                metadata:
                  externalLineId: A
                  notes:
                  - code: AAA
                    text: Goods item description
                  - code: AAB
                    text: Net 60
                  buyerAccountingReference: CUST-001
                  invoiceReferences:
                  - invoiceReference: ABC002
                    invoiceType: '380'
                    issueDate: 2024-01-14
                    invoiceNumber: ABC002
                  delivery:
                    name: xxxxxx
                    address:
                      department: Service achat
                      streetName: RUE DES FLEURS
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      townName: LIBOURNE CEDEX
                      postCode: '33506'
                      country: FR
                    deliveryDate: 2024-01-10
                  startDate: 2024-01-23
                  endDate: 2024-06-23
                  allowances:
                  - netAmount: '20.0'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '76.67'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                pricing:
                  itemNetPrice: '80.56'
                  itemGrossPrice: '96.67'
                  itemPriceQuantity: '40.278192'
                  itemPriceDiscount: '10.0'
                vatDetails:
                  vatCategory: S
                  vatPercentage: '0.2'
                  vatAmount: '16.11'
                productIdentifiers:
                  itemId: item1
                  itemCategory: Electronics
                  itemName: Sony WH-1000XM6
                  itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        required: true
      responses:
        '200':
          description: Updated document lines successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemListResultV2'
              example:
                lines:
                - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                  sequence: 1
                  data:
                    $schema: 
                      https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                    quantity: '2'
                    unit: H87
                    netAmount: '80.56'
                    currency: USD
                    metadata:
                      externalLineId: A
                      notes:
                      - code: AAA
                        text: Goods item description
                      - code: AAB
                        text: Net 60
                      buyerAccountingReference: CUST-001
                      invoiceReferences:
                      - invoiceReference: ABC002
                        invoiceType: '380'
                        issueDate: 2024-01-14
                        invoiceNumber: ABC002
                      delivery:
                        name: xxxxxx
                        address:
                          department: Service achat
                          streetName: RUE DES FLEURS
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          townName: LIBOURNE CEDEX
                          postCode: '33506'
                          country: FR
                        deliveryDate: 2024-01-10
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      allowances:
                      - netAmount: '20.0'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '76.67'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                    pricing:
                      itemNetPrice: '80.56'
                      itemGrossPrice: '96.67'
                      itemPriceQuantity: '40.278192'
                      itemPriceDiscount: '10.0'
                    vatDetails:
                      vatCategory: S
                      vatPercentage: '0.2'
                      vatAmount: '16.11'
                    productIdentifiers:
                      itemId: item1
                      itemCategory: Electronics
                      itemName: Sony WH-1000XM6
                      itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    post:
      tags:
      - Documents
      summary: Create document lines v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create lines v2 in the document. New lines are added to the existing
        ones <br/> Scope: space_write"
      operationId: createLineItemsV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Line items to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineItemListRequestV2'
            example:
              lines:
              - $schema: 
                  https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                quantity: '2'
                unit: H87
                netAmount: '80.56'
                currency: USD
                metadata:
                  externalLineId: A
                  notes:
                  - code: AAA
                    text: Goods item description
                  - code: AAB
                    text: Net 60
                  buyerAccountingReference: CUST-001
                  invoiceReferences:
                  - invoiceReference: ABC002
                    invoiceType: '380'
                    issueDate: 2024-01-14
                    invoiceNumber: ABC002
                  delivery:
                    name: xxxxxx
                    address:
                      department: Service achat
                      streetName: RUE DES FLEURS
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      townName: LIBOURNE CEDEX
                      postCode: '33506'
                      country: FR
                    deliveryDate: 2024-01-10
                  startDate: 2024-01-23
                  endDate: 2024-06-23
                  allowances:
                  - netAmount: '20.0'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '76.67'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                pricing:
                  itemNetPrice: '80.56'
                  itemGrossPrice: '96.67'
                  itemPriceQuantity: '40.278192'
                  itemPriceDiscount: '10.0'
                vatDetails:
                  vatCategory: S
                  vatPercentage: '0.2'
                  vatAmount: '16.11'
                productIdentifiers:
                  itemId: item1
                  itemCategory: Electronics
                  itemName: Sony WH-1000XM6
                  itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemListResultV2'
              example:
                lines:
                - id: 7a1cf570-db5c-4e41-992e-9890532212ae
                  sequence: 1
                  data:
                    $schema: 
                      https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                    quantity: '2'
                    unit: H87
                    netAmount: '80.56'
                    currency: USD
                    metadata:
                      externalLineId: A
                      notes:
                      - code: AAA
                        text: Goods item description
                      - code: AAB
                        text: Net 60
                      buyerAccountingReference: CUST-001
                      invoiceReferences:
                      - invoiceReference: ABC002
                        invoiceType: '380'
                        issueDate: 2024-01-14
                        invoiceNumber: ABC002
                      delivery:
                        name: xxxxxx
                        address:
                          department: Service achat
                          streetName: RUE DES FLEURS
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          townName: LIBOURNE CEDEX
                          postCode: '33506'
                          country: FR
                        deliveryDate: 2024-01-10
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      allowances:
                      - netAmount: '20.0'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '76.67'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                    pricing:
                      itemNetPrice: '80.56'
                      itemGrossPrice: '96.67'
                      itemPriceQuantity: '40.278192'
                      itemPriceDiscount: '10.0'
                    vatDetails:
                      vatCategory: S
                      vatPercentage: '0.2'
                      vatAmount: '16.11'
                    productIdentifiers:
                      itemId: item1
                      itemCategory: Electronics
                      itemName: Sony WH-1000XM6
                      itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}/lines/{lineId}:
    get:
      tags:
      - Documents
      summary: Get document line  v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document line detail v2 <br/> Scope: space_read"
      operationId: getLineItemV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemV2'
              example:
                id: 7a1cf570-db5c-4e41-992e-9890532212ae
                sequence: 1
                data:
                  quantity: '2'
                  unit: H87
                  netAmount: '80.56'
                  currency: USD
                  metadata:
                    externalLineId: A
                    notes:
                    - code: AAA
                      text: Goods item description
                    - code: AAB
                      text: Net 60
                    buyerAccountingReference: CUST-001
                    invoiceReferences:
                    - invoiceReference: ABC002
                      invoiceType: '380'
                      issueDate: 2024-01-14
                      invoiceNumber: ABC002
                    delivery:
                      name: xxxxxx
                      address:
                        department: Service achat
                        streetName: RUE DES FLEURS
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        townName: LIBOURNE CEDEX
                        postCode: '33506'
                        country: FR
                      deliveryDate: 2024-01-10
                    startDate: 2024-01-23
                    endDate: 2024-06-23
                    allowances:
                    - netAmount: '20.0'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '76.67'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                  pricing:
                    itemNetPrice: '80.56'
                    itemGrossPrice: '96.67'
                    itemPriceQuantity: '40.278192'
                    itemPriceDiscount: '10.0'
                  vatDetails:
                    vatCategory: S
                    vatPercentage: '0.2'
                    vatAmount: '16.11'
                  productIdentifiers:
                    itemId: item1
                    itemCategory: Electronics
                    itemName: Sony WH-1000XM6
                    itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document line v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document line v2 <br/> Scope: space_write"
      operationId: deleteLineItemV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document line v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document line v2 <br/> Scope: space_write"
      operationId: updateLineItemV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: lineId
        in: path
        description: The line item identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 7e76686f-f021-488d-a8e0-2c66beff4772
      requestBody:
        description: Line item to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLineItemRequestV2'
            example:
              data:
                quantity: '1'
                unit: H87
                netAmount: '40.28'
                currency: EUR
                metadata:
                  startDate: 2024-02-23
                  endDate: 2024-07-23
                pricing:
                  itemNetPrice: '40.278192'
                  itemGrossPrice: '44.31'
                vatDetails:
                  vatCategory: S
                  vatPercentage: '0.2'
                  vatAmount: '16.11'
                productIdentifiers:
                  itemId: itemA
                  itemCategory: Electronics
                  itemName: Sony WH-1000XM6
                  itemDescription: Wireless headphones.
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemV2'
              example:
                id: 7a1cf570-db5c-4e41-992e-9890532212ae
                sequence: 1
                data:
                  quantity: '2'
                  unit: H87
                  netAmount: '80.56'
                  currency: USD
                  metadata:
                    externalLineId: A
                    notes:
                    - code: AAA
                      text: Goods item description
                    - code: AAB
                      text: Net 60
                    buyerAccountingReference: CUST-001
                    invoiceReferences:
                    - invoiceReference: ABC002
                      invoiceType: '380'
                      issueDate: 2024-01-14
                      invoiceNumber: ABC002
                    delivery:
                      name: xxxxxx
                      address:
                        department: Service achat
                        streetName: RUE DES FLEURS
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        townName: LIBOURNE CEDEX
                        postCode: '33506'
                        country: FR
                      deliveryDate: 2024-01-10
                    startDate: 2024-01-23
                    endDate: 2024-06-23
                    allowances:
                    - netAmount: '20.0'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '76.67'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                  pricing:
                    itemNetPrice: '80.56'
                    itemGrossPrice: '96.67'
                    itemPriceQuantity: '40.278192'
                    itemPriceDiscount: '10.0'
                  vatDetails:
                    vatCategory: S
                    vatPercentage: '0.2'
                    vatAmount: '16.11'
                  productIdentifiers:
                    itemId: item1
                    itemCategory: Electronics
                    itemName: Sony WH-1000XM6
                    itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  ? /transaction/v2/spaces/{spaceId}/documents/{documentId}/processingData/spaceExtensions/{extensionNameSpace}/{extensionName}
  : get:
      tags:
      - Documents
      summary: Get document processing data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document’s processing data of a specific extension (connector)."
      operationId: getDocumentProcessingDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                sbdhInstanceIdentifiers:
                - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    put:
      tags:
      - Documents
      summary: Create/Update document processing data.
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/Update processing data of a specific extension (connector)."
      operationId: replaceProcessingDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: Document processing data specific to the given extension
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              sbdhInstanceIdentifiers:
              - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                sbdhInstanceIdentifiers:
                - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    patch:
      tags:
      - Documents
      summary: Update document processing data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document’s processing data of a specific extension (connector)
        with json patch operations."
      operationId: updateDocumentProcessingDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: Json-patch operations to apply to processing data
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: add
              path: /sbdhInstanceIdentifiers
              value:
              - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                sbdhInstanceIdentifiers:
                - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
  /transaction/v2/spaces/{spaceId}/documents/{documentId}/rawData:
    get:
      tags:
      - Documents
      summary: Get document raw OCR data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get the raw OCR data of the document. <br/> Scope: space_read"
      operationId: getDocumentRawDataV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok. Raw data object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                invoiceDate:
                  confidence: 0.99
                  value: 2024-01-01
                  coordinates: {}
                vatDetails:
                - vatCode:
                    confidence: 0.99
                    value: ABC
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Documents
      summary: Create/Update document raw OCR data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/Update raw OCR data of the document. <br/> Scope: space_write"
      operationId: replaceDocumentRawDataV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Raw OCR data of the document
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              invoiceDate:
                confidence: 0.99
                value: 2024-01-01
                coordinates: {}
              vatDetails:
              - vatCode:
                  confidence: 0.99
                  value: ABC
                  coordinates: {}
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                invoiceDate:
                  confidence: 0.99
                  value: 2024-01-01
                  coordinates: {}
                vatDetails:
                - vatCode:
                    confidence: 0.99
                    value: ABC
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    post:
      tags:
      - Documents
      summary: ⚠️Add document raw OCR data
      description: |
        This endpoint is no longer recommended.
        Use the @PUT endpoint instead to create or update raw OCR data.
        This endpoint only adds raw OCR data and does not support updates.
      operationId: createDocumentRawDataV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Raw OCR data of the document
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              invoiceDate:
                confidence: 0.99
                value: 2024-01-01
                coordinates: {}
              vatDetails:
              - vatCode:
                  confidence: 0.99
                  value: ABC
                  coordinates: {}
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                invoiceDate:
                  confidence: 0.99
                  value: 2024-01-01
                  coordinates: {}
                vatDetails:
                - vatCode:
                    confidence: 0.99
                    value: ABC
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Raw data already exists in document processable data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Documents
      summary: Delete document raw OCR data
      description: Delete the raw OCR data of the document
      operationId: deleteDocumentRawDataV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document raw OCR data
      description: Update the raw OCR data of the document using json-patch operations.
      operationId: updateDocumentRawDataV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Json-patch operations to apply to raw data
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /invoiceDate/value
              value: 2024-01-15
        required: true
      responses:
        '200':
          description: Ok. Raw data object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                invoiceDate:
                  confidence: 0.99
                  value: 2024-01-01
                  coordinates: {}
                vatDetails:
                - vatCode:
                    confidence: 0.99
                    value: ABC
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}/rawLines:
    get:
      tags:
      - Documents
      summary: Get document raw OCR lines
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get raw OCR lines of the document <br/> Scope: space_read"
      operationId: getDocumentRawLinesV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '200':
          description: Ok. Raw lines object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                '5':
                  unit:
                    confidence: 0.99
                    value: stuks
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Documents
      summary: Create/Update document raw OCR lines
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/Update raw OCR lines to the document <br/> Scope: space_write"
      operationId: replaceDocumentRawLinesV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Raw OCR lines data of the document
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              '5':
                unit:
                  confidence: 0.99
                  value: stuks
                  coordinates: {}
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                '5':
                  unit:
                    confidence: 0.99
                    value: stuks
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    post:
      tags:
      - Documents
      summary: ⚠️Add document raw OCR lines
      description: |
        This endpoint is no longer recommended.
        Use the @PUT endpoint instead to create or update raw OCR lines.
        This endpoint only adds raw OCR lines and does not support updates.
      operationId: createDocumentRawLinesV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Raw OCR lines data to add to document
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              '5':
                unit:
                  confidence: 0.99
                  value: stuks
                  coordinates: {}
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                '5':
                  unit:
                    confidence: 0.99
                    value: stuks
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Raw lines already exists for the document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Documents
      summary: Delete document raw OCR lines
      description: Delete raw OCR lines of the document
      operationId: deleteDocumentRawLinesV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document raw OCR lines
      description: Update raw OCR lines of the document using json-patch operations.
      operationId: updateDocumentRawLinesV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Json-patch operations to apply to raw lines
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /5/unit/confidence
              value: 0.88
        required: true
      responses:
        '200':
          description: Ok. Raw lines object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                '5':
                  unit:
                    confidence: 0.99
                    value: stuks
                    coordinates: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}:assignConnection:
    post:
      tags:
      - Documents
      summary: Assign connection to document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Assign connection to document <br/> Scope: space_write"
      operationId: assignDocumentConnection
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentConnectionRequest'
            example:
              id: 4c32d3fb-0023-470c-ae21-105274a94706
              relationType: CUSTOMER
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  $schema: 
                    https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                  documentNumber: ABC002
                  issueDate: 2024-01-31
                  invoiceType: '380'
                  currencyCode: EUR
                  dueDate: 2024-03-30
                  buyerReference: CUST-001
                  contractReference: CONTRACT001
                  purchaseOrderReference: PO123
                  paymentTerms: Net 60
                  notes:
                  - code: AAA
                    text: Goods item description
                  invoiceReferences:
                  - invoiceReference: ABC002
                    issueDate: 2024-01-14
                    invoiceType: '380'
                  supplier:
                    legalName: Monte Carlo Ltd
                    tradingName: Monte Carlo Ltd
                    address:
                      streetName: Rue des Fleurs
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      department: Service achat
                      city: LIBOURNE CEDEX
                      postalCode: '33506'
                      countryCode: FR
                    globalIdentifiers:
                      fr:siren: '349718288'
                      fr:siret: '34971828812345'
                      fr:vat: FR63349718288
                      global:email:
                      - montecarloltd@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  customer:
                    legalName: Unifiedpost Group
                    tradingName: ?????????
                    address:
                      streetName: Bloemendalelaan
                      buildingNumber: 62/3
                      buildingName: Building West
                      floor: '4'
                      room: '47'
                      city: Maldegem
                      postalCode: '9990'
                      countryCode: BE
                    globalIdentifiers:
                      be:vat: BE0412887923
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  delivery:
                    deliveryDate: 2024-01-31
                  prepaid:
                    paymentDate: 2024-08-15
                    code: '55'
                    text: 'Advance payment for order #12345'
                    paymentReference:
                      value: Prepaid invoice ABC002
                      type: UNSTRUCTURED
                  paymentMeans:
                  - code: '42'
                    text: PPayment to bank account, Belgian structured reference
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    paymentAccount:
                      identifier: FR3330002005500000157841Z25
                      scheme: IBAN
                      country: FR
                      currency: EUR
                      bank:
                        identifier: CRLYFRPP
                        scheme: BIC
                    paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    paymentMandate:
                      identifier: MANDATE-2026-00045
                      payerFinancialAccount:
                        identifier: FR7630006000011234567890189
                  allowances:
                  - netAmount: '150'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '200'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                  documentTotals:
                    netAmount: '1000'
                    vatAmount: '100'
                    grossAmount: '1100'
                    prepaidAmount: '500'
                    roundingDifference: '1100'
                    payableAmount: '600'
                    linesNetAmount: '900'
                    allowancesNetAmount: '100'
                    chargesNetAmount: '200'
                  vatDetails:
                  - vatCategory: S
                    vatPercentage: '10'
                    netAmount: '1000'
                    vatAmount: '100'
                    exemptionReason: Medical supplies are exempt from VAT
                    exemptionReasonCode: VATEX-EU-79-C
                  uploadId: '123456789'
                  vatChargeableMethod: payment_date
                  vatAlreadyDeclared: true
                  processControl:
                    businessProcess: goods
                  profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                connections:
                - id: 00000001-0000-0000-0000-000000000001
                  relationType: SUPPLIER
                - id: 00000001-0000-0000-0000-000000000002
                  relationType: CUSTOMER
                  displayName: ABC Company
                retentionTime: 2023-10-04T14:20:31.502921Z
                rawLines:
                  '5':
                    unit:
                      confidence: 0.99
                      value: stuks
                      coordinates: {}
                rawData:
                  invoiceDate:
                    confidence: 0.99
                    value: 2024-01-01
                    coordinates: {}
                  vatDetails:
                  - vatCode:
                      confidence: 0.99
                      value: ABC
                      coordinates: {}
                processingData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors:
                      peppol:
                        sbdhInstanceIdentifiers:
                        - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                validationData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors.validator:
                      dataExtraction:
                        status: COMPLETED
                        validationId: 00000001-0000-0000-0000-000000000000
                        results:
                          ocr.confidence:
                            level: ERROR
                            locations:
                            - type: field
                              path: dueDate
                              parameters:
                                confidence: 0.75
                customCategories:
                  purchases:
                  - fuel
                  - restaurant
                timestamps:
                  createdAt: 2025-07-04T14:20:31.502921Z
                  updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents:bulkUpdate:
    patch:
      tags:
      - Documents
      summary: Bulk update documents v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Bulk update documents v2 <br/> Scope: space_write"
      operationId: bulkPatchDocumentsV2
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/BulkPatchDocumentsRequest'
        required: true
      responses:
        '200':
          description: All updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDocumentsResponse'
              examples:
                Full response:
                  description: Full response
                  value:
                    type: full
                    documents:
                    - id: 51673728-4317-49d4-87b9-6ceb6a5ba115
                      spaceId: c37a2321-fa7c-45d3-a895-2c809d42adeb
                      folder: FILES
                      status:
                        accept: UNACCEPTED
                        document: RECEIVED
                      category: FILE
                      metadata:
                        supplier: Jack Doe
                      retentionTime: 2028-01-13T16:08:33Z
                    - id: f4c9a3c5-d20d-4698-bb43-40ba3236bfab
                      spaceId: c37a2321-fa7c-45d3-a895-2c809d42adeb
                      folder: SALES
                      status:
                        delivery: RECEIVED
                        pay: PARTIALLY_PAID
                        document: VALIDATED
                      category: INVOICE
                      metadata:
                        supplier: Jack Doe
                      retentionTime: 2028-01-13T16:08:33Z
                Only ids in response:
                  description: Only ids in response
                  value:
                    type: ids
                    documents:
                    - 51673728-4317-49d4-87b9-6ceb6a5ba115
                    - f4c9a3c5-d20d-4698-bb43-40ba3236bfab
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents:
    get:
      tags:
      - Documents
      summary: Get list of documents v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of documents v2 on the given space, with options to filter
        out the result.\n\tBy default, all documents that don't have status wait_for_complete
        are retrieved.\n\tThe API supports pagination and sorting.\n <br/> Scope:
        space_read"
      operationId: listDocumentsV2
      parameters:
      - name: filter
        in: query
        schema:
          $ref: '#/components/schemas/ListDocumentsQueryParamsSingle'
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: metadata
        in: query
        description: "\tMetadata filter.\n\tExample:\n\tIf document metadata is:\n\
          \t{\n\t\t\"supplier\":\"Jack Doe\",\n\t\t\"filename\": \"123.pdf\",\n\t\t\
          \"other\": {\n\t\t\t\"documentReferences\": [\n\t\t\t\t{\n\t\t\t\t\t\"referencedInvoiceDate\"\
          : \"2024-01-14\",\n\t\t\t\t\t\"referencedInvoiceType\": \"380\",\n\t\t\t\
          \t\t\"numbers\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"referencedInvoiceNumber\"\
          : \"ABC002\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t
          }\n\tTo filter by referencedInvoiceNumber=ABC002, the query param should
          be sent as:\n\t\"?metadata=other.documentReferences[].numbers[].referencedInvoiceNumber=ABC002\"\
          \n\tOf course, for simpler structures the query param is more simple.\n"
        deprecated: true
        schema:
          type: array
          items:
            type: string
        example: ?metadata=other.documentReferences[].numbers[].referencedInvoiceNumber=ABC002
      - name: status
        in: query
        deprecated: true
        schema:
          type: array
          items:
            type: string
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/DocumentInclude'
        example: lines,connections
      - name: connections[customer].id[in]
        in: query
        description: List of connection IDs with type customer
        deprecated: true
        explode: false
        schema:
          type: array
          items:
            type: string
            format: uuid
        example: ecc46f54-71f8-4951-944e-a87c3fc57c35,da753d31-2068-4584-b91f-ae012f6b7df3
      - name: connections[supplier].id[in]
        in: query
        description: List of connection IDs with type supplier
        deprecated: true
        explode: false
        schema:
          type: array
          items:
            type: string
            format: uuid
        example: ecc46f54-71f8-4951-944e-a87c3fc57c35,da753d31-2068-4584-b91f-ae012f6b7df3
      - name: balanceOffsets.aggregationStatus[in]
        in: query
        description: Any of the given aggregation statuses of associated balanceOffsets
        deprecated: true
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/AggregationStatus'
        example: USER_CONFIRMED,AUTO_CONFIRMED
      - name: ql
        in: query
        description: BTX Query Language filter expression.
        schema:
          type: string
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - category
          - category.asc
          - category.desc
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - updatedAt
          - updatedAt.asc
          - updatedAt.desc
          - grossAmount
          - grossAmount.asc
          - grossAmount.desc
          - payableAmount
          - payableAmount.asc
          - payableAmount.desc
          - netAmount
          - netAmount.asc
          - netAmount.desc
          - vatAmount
          - vatAmount.asc
          - vatAmount.desc
          - documentNumber
          - documentNumber.asc
          - documentNumber.desc
          - issueDate
          - issueDate.asc
          - issueDate.desc
          - dueDate
          - dueDate.asc
          - dueDate.desc
          - status.delivery
          - status.delivery.asc
          - status.delivery.desc
          - status.document
          - status.document.asc
          - status.document.desc
          - status.pay
          - status.pay.asc
          - status.pay.desc
          - connections[customer].displayName
          - connections[customer].displayName.asc
          - connections[customer].displayName.desc
          - connections[supplier].displayName
          - connections[supplier].displayName.asc
          - connections[supplier].displayName.desc
          - description
          - description.asc
          - description.desc
          - purchaseOrderReference
          - purchaseOrderReference.asc
          - purchaseOrderReference.desc
          - openBalance
          - openBalance.asc
          - openBalance.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDocumentsResponseV2'
              example:
                documents:
                - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  description: Sample Document
                  source: Sample Source
                  status:
                    pay: FULLY_PAID
                  category: INVOICE
                  metadata:
                    documentNumber: ABC002
                    issueDate: 2024-01-31
                    invoiceType: '380'
                    currencyCode: EUR
                    dueDate: 2024-03-30
                    buyerReference: CUST-001
                    contractReference: CONTRACT001
                    purchaseOrderReference: PO123
                    paymentTerms: Net 60
                    notes:
                    - code: AAA
                      text: Goods item description
                    invoiceReferences:
                    - invoiceReference: ABC002
                      issueDate: 2024-01-14
                      invoiceType: '380'
                    supplier:
                      legalName: Monte Carlo Ltd
                      tradeName: Monte Carlo Ltd
                      address:
                        department: Service achat
                        streetName: RUE DES FLEURS
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        townName: LIBOURNE CEDEX
                        postCode: '33506'
                        country: FR
                      globalIdentifiers:
                        fr:siren: '349718288'
                        fr:siret: '34971828812345'
                        fr:vat: FR63349718288
                        global:phoneNumber:
                        - '+3221234567'
                        global:email:
                        - contact@supplier.be
                    customer:
                      legalName: Central Argo Trading
                      tradeName: Central Argo Trading
                      address:
                        streetName: Bloemendalelaan
                        buildingNumber: 62/3
                        buildingName: Building West
                        floor: '4'
                        room: '47'
                        townName: Maldegem
                        postCode: '9990'
                        country: BE
                      globalIdentifiers:
                        be:vat: BE0412887923
                        global:phoneNumber:
                        - '+3237890123'
                        global:email:
                        - contact@customer.be
                    delivery:
                      deliveryDate: 2024-01-31
                    prepaid:
                      paymentDate: 2024-08-15
                      code: '55'
                      text: 'Advance payment for order #12345'
                      paymentReference:
                        value: Prepaid invoice ABC002
                        type: UNSTRUCTURED
                    paymentMeans:
                    - code: '42'
                      text: Payment to bank account, Belgian structured reference
                      paymentReference:
                        value: 001/4037/32870
                        type: STRUCTURED
                        scheme: OGM_VCS
                      paymentAccount:
                        identifier: FR3330002005500000157841Z25
                        scheme: IBAN
                        country: FR
                        currency: EUR
                        bank:
                          identifier: CRLYFRPP
                          scheme: BIC
                      paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    allowances:
                    - netAmount: '150'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '200'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                    documentTotals:
                      netAmount: '1000'
                      vatAmount: '100'
                      grossAmount: '1100'
                      prepaidAmount: '500'
                      roundingDifference: '1100'
                      payableAmount: '600'
                      linesNetAmount: '900'
                      allowancesNetAmount: '100'
                      chargesNetAmount: '200'
                    vatDetails:
                    - vatCategory: S
                      vatPercentage: '10'
                      netAmount: '1000'
                      vatAmount: '100'
                      exemptionReason: Medical supplies are exempt from VAT
                      exemptionReasonCode: VATEX-EU-79-C
                    uploadId: '123456789'
                    vatChargeableMethod: payment_date
                    vatAlreadyDeclared: true
                    processControl:
                      businessProcess: goods
                    profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                  tags:
                  - new
                  tasks:
                  - extensionName: com.unifiedpost.btx.data:approve
                    status: approve
                  retentionTime: 2023-10-04T14:20:31.502921Z
                  customCategories:
                    purchases:
                    - fuel
                    - restaurant
                    labels:
                    - foo
                    - bar
                totalElements: 100
                currentPage: 2
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create document v2 on the given space <br/> Scope: space_write"
      operationId: createDocumentV2
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Document to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequestV2'
            examples:
              Document:
                description: Document
                value:
                  description: Sample invoice for choruspro
                  source: choruspro
                  metadata:
                    documentNumber: ABC002
                    issueDate: 2024-01-31
                    invoiceType: '380'
                    currencyCode: EUR
                    dueDate: 2024-03-30
                    buyerReference: CUST-001
                    contractReference: CONTRACT001
                    purchaseOrderReference: PO123
                    paymentTerms: Net 60
                    notes:
                    - code: AAA
                      text: Goods item description
                    invoiceReferences:
                    - invoiceReference: ABC002
                      issueDate: 2024-01-14
                      invoiceType: '380'
                    supplier:
                      legalName: Monte Carlo Ltd
                      tradeName: Monte Carlo Ltd
                      address:
                        department: Service achat
                        streetName: RUE DES FLEURS
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        townName: LIBOURNE CEDEX
                        postCode: '33506'
                        country: FR
                      globalIdentifiers:
                        fr:siren: '349718288'
                        fr:siret: '34971828812345'
                        fr:vat: FR63349718288
                        global:phoneNumber:
                        - '+3221234567'
                        global:email:
                        - contact@supplier.be
                    customer:
                      legalName: Central Argo Trading
                      tradeName: Central Argo Trading
                      address:
                        streetName: Bloemendalelaan
                        buildingNumber: 62/3
                        buildingName: Building West
                        floor: '4'
                        room: '47'
                        townName: Maldegem
                        postCode: '9990'
                        country: BE
                      globalIdentifiers:
                        be:vat: BE0412887923
                        global:phoneNumber:
                        - '+3237890123'
                        global:email:
                        - contact@customer.be
                    delivery:
                      deliveryDate: 2024-01-31
                    prepaid:
                      paymentDate: 2024-08-15
                      code: '55'
                      text: 'Advance payment for order #12345'
                      paymentReference:
                        value: Prepaid invoice ABC002
                        type: UNSTRUCTURED
                    paymentMeans:
                    - code: '42'
                      text: PPayment to bank account, Belgian structured reference
                      paymentReference:
                        value: 001/4037/32870
                        type: STRUCTURED
                        scheme: OGM_VCS
                      paymentAccount:
                        identifier: FR3330002005500000157841Z25
                        scheme: IBAN
                        country: FR
                        currency: EUR
                        bank:
                          identifier: CRLYFRPP
                          scheme: BIC
                      paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    allowances:
                    - netAmount: '150'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '200'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                    documentTotals:
                      netAmount: '1000'
                      vatAmount: '100'
                      grossAmount: '1100'
                      prepaidAmount: '500'
                      roundingDifference: '1100'
                      payableAmount: '600'
                      linesNetAmount: '900'
                      allowancesNetAmount: '100'
                      chargesNetAmount: '200'
                    vatDetails:
                    - vatCategory: S
                      vatPercentage: '10'
                      netAmount: '1000'
                      vatAmount: '100'
                      exemptionReason: Medical supplies are exempt from VAT
                      exemptionReasonCode: VATEX-EU-79-C
                    uploadId: '123456789'
                    vatChargeableMethod: payment_date
                    vatAlreadyDeclared: true
                    processControl:
                      businessProcess: goods
                    profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                  retentionTime: 2029-01-14T19:58:47+02:00
                  status:
                    accept: ACCEPTED
                  category: INVOICE
                  folder: INBOX
                  connections:
                  - id: 00000001-0000-0000-0000-000000000001
                    relationType: SUPPLIER
                  - id: 00000001-0000-0000-0000-000000000002
                    relationType: CUSTOMER
                  parentDirectoryId: 44d929f7-952d-4283-9010-8a63a16831b3
                  customCategories:
                    purchases:
                    - fuel
                    - restaurant
              Document containing lines:
                description: Document containing lines
                value:
                  description: Sample invoice for choruspro
                  source: choruspro
                  metadata:
                    documentNumber: ABC002
                    issueDate: 2024-01-31
                    invoiceType: '380'
                    currencyCode: EUR
                    dueDate: 2024-03-30
                    buyerReference: CUST-001
                    contractReference: CONTRACT001
                    purchaseOrderReference: PO123
                    paymentTerms: Net 60
                    notes:
                    - code: AAA
                      text: Goods item description
                    invoiceReferences:
                    - invoiceReference: ABC002
                      issueDate: 2024-01-14
                      invoiceType: '380'
                    supplier:
                      legalName: Monte Carlo Ltd
                      tradeName: Monte Carlo Ltd
                      address:
                        department: Service achat
                        streetName: RUE DES FLEURS
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        townName: LIBOURNE CEDEX
                        postCode: '33506'
                        country: FR
                      globalIdentifiers:
                        fr:siren: '349718288'
                        fr:siret: '34971828812345'
                        fr:vat: FR63349718288
                        global:phoneNumber:
                        - '+3221234567'
                        global:email:
                        - contact@supplier.be
                    customer:
                      legalName: Central Argo Trading
                      tradeName: Central Argo Trading
                      address:
                        streetName: Bloemendalelaan
                        buildingNumber: 62/3
                        buildingName: Building West
                        floor: '4'
                        room: '47'
                        townName: Maldegem
                        postCode: '9990'
                        country: BE
                      globalIdentifiers:
                        be:vat: BE0412887923
                        global:phoneNumber:
                        - '+3237890123'
                        global:email:
                        - contact@customer.be
                    delivery:
                      deliveryDate: 2024-01-31
                    prepaid:
                      paymentDate: 2024-08-15
                      code: '55'
                      text: 'Advance payment for order #12345'
                      paymentReference:
                        value: Prepaid invoice ABC002
                        type: UNSTRUCTURED
                    paymentMeans:
                    - code: '42'
                      text: PPayment to bank account, Belgian structured reference
                      paymentReference:
                        value: 001/4037/32870
                        type: STRUCTURED
                        scheme: OGM_VCS
                      paymentAccount:
                        identifier: FR3330002005500000157841Z25
                        scheme: IBAN
                        country: FR
                        currency: EUR
                        bank:
                          identifier: CRLYFRPP
                          scheme: BIC
                      paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    allowances:
                    - netAmount: '150'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '200'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                    documentTotals:
                      netAmount: '1000'
                      vatAmount: '100'
                      grossAmount: '1100'
                      prepaidAmount: '500'
                      roundingDifference: '1100'
                      payableAmount: '600'
                    vatDetails:
                    - vatCategory: S
                      vatPercentage: '10'
                      netAmount: '1000'
                      vatAmount: '100'
                      exemptionReason: Medical supplies are exempt from VAT
                      exemptionReasonCode: VATEX-EU-79-C
                    uploadId: '123456789'
                    vatChargeableMethod: payment_date
                    vatAlreadyDeclared: true
                    processControl:
                      businessProcess: goods
                  retentionTime: 2029-01-14T19:58:47+02:00
                  status:
                    accept: ACCEPTED
                  category: INVOICE
                  folder: INBOX
                  connections:
                  - id: 00000001-0000-0000-0000-000000000001
                    relationType: SUPPLIER
                  - id: 00000001-0000-0000-0000-000000000002
                    relationType: CUSTOMER
                  lines:
                  - $schema: 
                      https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                    quantity: '2'
                    unit: H87
                    netAmount: '80.56'
                    currency: USD
                    metadata:
                      externalLineId: A
                      notes:
                      - code: AAA
                        text: Goods item description
                      - code: AAB
                        text: Net 60
                      buyerAccountingReference: CUST-001
                      invoiceReferences:
                      - invoiceReference: ABC002
                        invoiceType: '380'
                        issueDate: 2024-01-14
                        invoiceNumber: ABC002
                      delivery:
                        name: xxxxxx
                        address:
                          department: Service achat
                          streetName: RUE DES FLEURS
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          townName: LIBOURNE CEDEX
                          postCode: '33506'
                          country: FR
                        deliveryDate: 2024-01-10
                      startDate: 2024-01-23
                      endDate: 2024-06-23
                      allowances:
                      - netAmount: '20.0'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '76.67'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                    pricing:
                      itemNetPrice: '80.56'
                      itemGrossPrice: '96.67'
                      itemPriceQuantity: '40.278192'
                      itemPriceDiscount: '10.0'
                    vatDetails:
                      vatCategory: S
                      vatPercentage: '0.2'
                      vatAmount: '16.11'
                    productIdentifiers:
                      itemId: item1
                      itemCategory: Electronics
                      itemDescription: Noise-cancelling wireless headphones with Bluetooth.
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              examples:
                Document:
                  description: Document
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                      documentNumber: ABC002
                      issueDate: 2024-01-31
                      invoiceType: '380'
                      currencyCode: EUR
                      dueDate: 2024-03-30
                      buyerReference: CUST-001
                      contractReference: CONTRACT001
                      purchaseOrderReference: PO123
                      paymentTerms: Net 60
                      notes:
                      - code: AAA
                        text: Goods item description
                      invoiceReferences:
                      - invoiceReference: ABC002
                        issueDate: 2024-01-14
                        invoiceType: '380'
                      supplier:
                        legalName: Monte Carlo Ltd
                        tradingName: Monte Carlo Ltd
                        address:
                          streetName: Rue des Fleurs
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          department: Service achat
                          city: LIBOURNE CEDEX
                          postalCode: '33506'
                          countryCode: FR
                        globalIdentifiers:
                          fr:siren: '349718288'
                          fr:siret: '34971828812345'
                          fr:vat: FR63349718288
                          global:email:
                          - montecarloltd@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      customer:
                        legalName: Unifiedpost Group
                        tradingName: ?????????
                        address:
                          streetName: Bloemendalelaan
                          buildingNumber: 62/3
                          buildingName: Building West
                          floor: '4'
                          room: '47'
                          city: Maldegem
                          postalCode: '9990'
                          countryCode: BE
                        globalIdentifiers:
                          be:vat: BE0412887923
                          global:email:
                          - john@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      delivery:
                        deliveryDate: 2024-01-31
                      prepaid:
                        paymentDate: 2024-08-15
                        code: '55'
                        text: 'Advance payment for order #12345'
                        paymentReference:
                          value: Prepaid invoice ABC002
                          type: UNSTRUCTURED
                      paymentMeans:
                      - code: '42'
                        text: PPayment to bank account, Belgian structured reference
                        paymentReference:
                          value: 001/4037/32870
                          type: STRUCTURED
                          scheme: OGM_VCS
                        paymentAccount:
                          identifier: FR3330002005500000157841Z25
                          scheme: IBAN
                          country: FR
                          currency: EUR
                          bank:
                            identifier: CRLYFRPP
                            scheme: BIC
                        paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                        paymentMandate:
                          identifier: MANDATE-2026-00045
                          payerFinancialAccount:
                            identifier: FR7630006000011234567890189
                      allowances:
                      - netAmount: '150'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '200'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                      documentTotals:
                        netAmount: '1000'
                        vatAmount: '100'
                        grossAmount: '1100'
                        prepaidAmount: '500'
                        roundingDifference: '1100'
                        payableAmount: '600'
                        linesNetAmount: '900'
                        allowancesNetAmount: '100'
                        chargesNetAmount: '200'
                      vatDetails:
                      - vatCategory: S
                        vatPercentage: '10'
                        netAmount: '1000'
                        vatAmount: '100'
                        exemptionReason: Medical supplies are exempt from VAT
                        exemptionReasonCode: VATEX-EU-79-C
                      uploadId: '123456789'
                      vatChargeableMethod: payment_date
                      vatAlreadyDeclared: true
                      processControl:
                        businessProcess: goods
                      profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    connections:
                    - id: 00000001-0000-0000-0000-000000000001
                      relationType: SUPPLIER
                    - id: 00000001-0000-0000-0000-000000000002
                      relationType: CUSTOMER
                      displayName: ABC Company
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    rawLines:
                      '5':
                        unit:
                          confidence: 0.99
                          value: stuks
                          coordinates: {}
                    rawData:
                      invoiceDate:
                        confidence: 0.99
                        value: 2024-01-01
                        coordinates: {}
                      vatDetails:
                      - vatCode:
                          confidence: 0.99
                          value: ABC
                          coordinates: {}
                    processingData:
                      spaceExtensions:
                        com.unifiedpost.btx.connectors:
                          peppol:
                            sbdhInstanceIdentifiers:
                            - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                    validationData:
                      spaceExtensions:
                        com.unifiedpost.btx.connectors.validator:
                          dataExtraction:
                            status: COMPLETED
                            validationId: 00000001-0000-0000-0000-000000000000
                            results:
                              ocr.confidence:
                                level: ERROR
                                locations:
                                - type: field
                                  path: dueDate
                                  parameters:
                                    confidence: 0.75
                    customCategories:
                      purchases:
                      - fuel
                      - restaurant
                    timestamps:
                      createdAt: 2025-07-04T14:20:31.502921Z
                      updatedAt: 2025-07-04T14:20:31.502921Z
                Document containing lines:
                  description: Document containing lines
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                      documentNumber: ABC002
                      issueDate: 2024-01-31
                      invoiceType: '380'
                      currencyCode: EUR
                      dueDate: 2024-03-30
                      buyerReference: CUST-001
                      contractReference: CONTRACT001
                      purchaseOrderReference: PO123
                      paymentTerms: Net 60
                      notes:
                      - code: AAA
                        text: Goods item description
                      invoiceReferences:
                      - invoiceReference: ABC002
                        issueDate: 2024-01-14
                        invoiceType: '380'
                      supplier:
                        legalName: Monte Carlo Ltd
                        tradingName: Monte Carlo Ltd
                        address:
                          streetName: Rue des Fleurs
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          department: Service achat
                          city: LIBOURNE CEDEX
                          postalCode: '33506'
                          countryCode: FR
                        globalIdentifiers:
                          fr:siren: '349718288'
                          fr:siret: '34971828812345'
                          fr:vat: FR63349718288
                          global:email:
                          - montecarloltd@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      customer:
                        legalName: Unifiedpost Group
                        tradingName: ?????????
                        address:
                          streetName: Bloemendalelaan
                          buildingNumber: 62/3
                          buildingName: Building West
                          floor: '4'
                          room: '47'
                          city: Maldegem
                          postalCode: '9990'
                          countryCode: BE
                        globalIdentifiers:
                          be:vat: BE0412887923
                          global:email:
                          - john@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      delivery:
                        deliveryDate: 2024-01-31
                      prepaid:
                        paymentDate: 2024-08-15
                        code: '55'
                        text: 'Advance payment for order #12345'
                        paymentReference:
                          value: Prepaid invoice ABC002
                          type: UNSTRUCTURED
                      paymentMeans:
                      - code: '42'
                        text: PPayment to bank account, Belgian structured reference
                        paymentReference:
                          value: 001/4037/32870
                          type: STRUCTURED
                          scheme: OGM_VCS
                        paymentAccount:
                          identifier: FR3330002005500000157841Z25
                          scheme: IBAN
                          country: FR
                          currency: EUR
                          bank:
                            identifier: CRLYFRPP
                            scheme: BIC
                        paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                        paymentMandate:
                          identifier: MANDATE-2026-00045
                          payerFinancialAccount:
                            identifier: FR7630006000011234567890189
                      allowances:
                      - netAmount: '150'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '200'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                      documentTotals:
                        netAmount: '1000'
                        vatAmount: '100'
                        grossAmount: '1100'
                        prepaidAmount: '500'
                        roundingDifference: '1100'
                        payableAmount: '600'
                      vatDetails:
                      - vatCategory: S
                        vatPercentage: '10'
                        netAmount: '1000'
                        vatAmount: '100'
                        exemptionReason: Medical supplies are exempt from VAT
                        exemptionReasonCode: VATEX-EU-79-C
                      uploadId: '123456789'
                      vatChargeableMethod: payment_date
                      vatAlreadyDeclared: true
                      processControl:
                        businessProcess: goods
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    connections:
                    - id: 00000001-0000-0000-0000-000000000001
                      relationType: SUPPLIER
                    - id: 00000001-0000-0000-0000-000000000002
                      relationType: CUSTOMER
                      displayName: ABC Company
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    lines:
                    - $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                      quantity: '2'
                      unit: H87
                      netAmount: '80.56'
                      currency: USD
                      metadata:
                        externalLineId: A
                        notes:
                        - code: AAA
                          text: Goods item description
                        - code: AAB
                          text: Net 60
                        buyerAccountingReference: CUST-001
                        invoiceReferences:
                        - invoiceReference: ABC002
                          invoiceType: '380'
                          issueDate: 2024-01-14
                          invoiceNumber: ABC002
                        delivery:
                          name: xxxxxx
                          address:
                            department: Service achat
                            streetName: RUE DES FLEURS
                            buildingNumber: 22BIS
                            floor: Zone industrielle de la Ballastrierre Ouest
                            postBox: BP 40122
                            townName: LIBOURNE CEDEX
                            postCode: '33506'
                            country: FR
                          deliveryDate: 2024-01-10
                        startDate: 2024-01-23
                        endDate: 2024-06-23
                        allowances:
                        - netAmount: '20.0'
                          baseAmount: '1000'
                          percentage: '15'
                          vatCategory: S
                          vatPercentage: '10'
                          description: Discount
                          reasonCode: '95'
                        charges:
                        - netAmount: '76.67'
                          baseAmount: '1000'
                          percentage: '20'
                          vatCategory: S
                          vatPercentage: '10'
                          description: Advertising
                          reasonCode: AA
                      pricing:
                        itemNetPrice: '80.56'
                        itemGrossPrice: '96.67'
                        itemPriceQuantity: '40.278192'
                        itemPriceDiscount: '10.0'
                      vatDetails:
                        vatCategory: S
                        vatPercentage: '0.2'
                        vatAmount: '16.11'
                      productIdentifiers:
                        itemId: item1
                        itemCategory: Electronics
                        itemDescription: Noise-cancelling wireless headphones with
                          Bluetooth.
                    timestamps:
                      createdAt: 2025-07-04T14:20:31.502921Z
                      updatedAt: 2025-07-04T14:20:31.502921Z
                Document with parent directory:
                  description: Document with parent directory
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: FILES
                    category: FILE
                    metadata:
                      $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                      documentNumber: ABC002
                    tags:
                    - new
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    parentDirectory:
                      id: 44d929f7-952d-4283-9010-8a63a16831b3
                      name: Plant
                    timestamps:
                      createdAt: 2025-07-04T14:20:31.502921Z
                      updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}:
    get:
      tags:
      - Documents
      summary: Get document info v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document information v2 by its ID on the given space <br/> Scope:
        space_read"
      operationId: getDocumentV2
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - lines
            - tasks
            - connections
            - timestamps
            - rawData
            - rawLines
            - processingData
            - validationData
            - customCategories
            - balanceOffsets
        example: lines,connections
      responses:
        '200':
          description: Ok. Document info.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  $schema: 
                    https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                  documentNumber: ABC002
                  issueDate: 2024-01-31
                  invoiceType: '380'
                  currencyCode: EUR
                  dueDate: 2024-03-30
                  buyerReference: CUST-001
                  contractReference: CONTRACT001
                  purchaseOrderReference: PO123
                  paymentTerms: Net 60
                  notes:
                  - code: AAA
                    text: Goods item description
                  invoiceReferences:
                  - invoiceReference: ABC002
                    issueDate: 2024-01-14
                    invoiceType: '380'
                  supplier:
                    legalName: Monte Carlo Ltd
                    tradingName: Monte Carlo Ltd
                    address:
                      streetName: Rue des Fleurs
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      department: Service achat
                      city: LIBOURNE CEDEX
                      postalCode: '33506'
                      countryCode: FR
                    globalIdentifiers:
                      fr:siren: '349718288'
                      fr:siret: '34971828812345'
                      fr:vat: FR63349718288
                      global:email:
                      - montecarloltd@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  customer:
                    legalName: Unifiedpost Group
                    tradingName: ?????????
                    address:
                      streetName: Bloemendalelaan
                      buildingNumber: 62/3
                      buildingName: Building West
                      floor: '4'
                      room: '47'
                      city: Maldegem
                      postalCode: '9990'
                      countryCode: BE
                    globalIdentifiers:
                      be:vat: BE0412887923
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  delivery:
                    deliveryDate: 2024-01-31
                  prepaid:
                    paymentDate: 2024-08-15
                    code: '55'
                    text: 'Advance payment for order #12345'
                    paymentReference:
                      value: Prepaid invoice ABC002
                      type: UNSTRUCTURED
                  paymentMeans:
                  - code: '42'
                    text: PPayment to bank account, Belgian structured reference
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    paymentAccount:
                      identifier: FR3330002005500000157841Z25
                      scheme: IBAN
                      country: FR
                      currency: EUR
                      bank:
                        identifier: CRLYFRPP
                        scheme: BIC
                    paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    paymentMandate:
                      identifier: MANDATE-2026-00045
                      payerFinancialAccount:
                        identifier: FR7630006000011234567890189
                  allowances:
                  - netAmount: '150'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '200'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                  documentTotals:
                    netAmount: '1000'
                    vatAmount: '100'
                    grossAmount: '1100'
                    prepaidAmount: '500'
                    roundingDifference: '1100'
                    payableAmount: '600'
                    linesNetAmount: '900'
                    allowancesNetAmount: '100'
                    chargesNetAmount: '200'
                  vatDetails:
                  - vatCategory: S
                    vatPercentage: '10'
                    netAmount: '1000'
                    vatAmount: '100'
                    exemptionReason: Medical supplies are exempt from VAT
                    exemptionReasonCode: VATEX-EU-79-C
                  uploadId: '123456789'
                  vatChargeableMethod: payment_date
                  vatAlreadyDeclared: true
                  processControl:
                    businessProcess: goods
                  profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                connections:
                - id: 00000001-0000-0000-0000-000000000001
                  relationType: SUPPLIER
                - id: 00000001-0000-0000-0000-000000000002
                  relationType: CUSTOMER
                  displayName: ABC Company
                retentionTime: 2023-10-04T14:20:31.502921Z
                rawLines:
                  '5':
                    unit:
                      confidence: 0.99
                      value: stuks
                      coordinates: {}
                rawData:
                  invoiceDate:
                    confidence: 0.99
                    value: 2024-01-01
                    coordinates: {}
                  vatDetails:
                  - vatCode:
                      confidence: 0.99
                      value: ABC
                      coordinates: {}
                processingData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors:
                      peppol:
                        sbdhInstanceIdentifiers:
                        - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                validationData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors.validator:
                      dataExtraction:
                        status: COMPLETED
                        validationId: 00000001-0000-0000-0000-000000000000
                        results:
                          ocr.confidence:
                            level: ERROR
                            locations:
                            - type: field
                              path: dueDate
                              parameters:
                                confidence: 0.75
                customCategories:
                  purchases:
                  - fuel
                  - restaurant
                timestamps:
                  createdAt: 2025-07-04T14:20:31.502921Z
                  updatedAt: 2025-07-04T14:20:31.502921Z
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Documents
      summary: Delete document v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document v2 by its ID on the given space. Will cascade delete
        associated balance offsets. <br/> Scope: space_write"
      operationId: deleteDocumentV2
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: Ok.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Documents
      summary: Update document v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document v2 by its ID on the given space by sending json with
        the changes <br/> Scope: space_write"
      operationId: updateDocumentV2
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Document data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentPatchRequestV2'
            example:
              metadata:
                supplier:
                  legalName: Jack Doe
                  tradeName: Jack Doe
              tags:
              - seen
              retentionTime: 2029-01-14T19:58:47+02:00
              status:
                accept: UNACCEPTED
              category: INVOICE
              lines:
              - $schema: 
                  https://btx.unifiedpost.com/btx/datastore/document/document_line/v1/document-line-schema.json
                quantity: '2'
                unit: H87
                netAmount: '80.56'
                currency: USD
                metadata:
                  externalLineId: A
                  notes:
                  - code: AAA
                    text: Goods item description
                  - code: AAB
                    text: Net 60
                  buyerAccountingReference: CUST-001
                  invoiceReferences:
                  - invoiceReference: ABC002
                    invoiceType: '380'
                    issueDate: 2024-01-14
                    invoiceNumber: ABC002
                  delivery:
                    name: xxxxxx
                    address:
                      department: Service achat
                      streetName: RUE DES FLEURS
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      townName: LIBOURNE CEDEX
                      postCode: '33506'
                      country: FR
                    deliveryDate: 2024-01-10
                  startDate: 2024-01-23
                  endDate: 2024-06-23
                  allowances:
                  - netAmount: '20.0'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '76.67'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                pricing:
                  itemNetPrice: '80.56'
                  itemGrossPrice: '96.67'
                  itemPriceQuantity: '40.278192'
                  itemPriceDiscount: '10.0'
                vatDetails:
                  vatCategory: S
                  vatPercentage: '0.2'
                  vatAmount: '16.11'
                productIdentifiers:
                  itemId: item1
                  itemCategory: Electronics
                  itemDescription: Noise-cancelling wireless headphones with Bluetooth.
              connections:
              - id: 00000001-0000-0000-0000-000000000001
                relationType: SUPPLIER
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  $schema: 
                    https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                  documentNumber: ABC002
                  issueDate: 2024-01-31
                  invoiceType: '380'
                  currencyCode: EUR
                  dueDate: 2024-03-30
                  buyerReference: CUST-001
                  contractReference: CONTRACT001
                  purchaseOrderReference: PO123
                  paymentTerms: Net 60
                  notes:
                  - code: AAA
                    text: Goods item description
                  invoiceReferences:
                  - invoiceReference: ABC002
                    issueDate: 2024-01-14
                    invoiceType: '380'
                  supplier:
                    legalName: Monte Carlo Ltd
                    tradingName: Monte Carlo Ltd
                    address:
                      streetName: Rue des Fleurs
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      department: Service achat
                      city: LIBOURNE CEDEX
                      postalCode: '33506'
                      countryCode: FR
                    globalIdentifiers:
                      fr:siren: '349718288'
                      fr:siret: '34971828812345'
                      fr:vat: FR63349718288
                      global:email:
                      - montecarloltd@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  customer:
                    legalName: Unifiedpost Group
                    tradingName: ?????????
                    address:
                      streetName: Bloemendalelaan
                      buildingNumber: 62/3
                      buildingName: Building West
                      floor: '4'
                      room: '47'
                      city: Maldegem
                      postalCode: '9990'
                      countryCode: BE
                    globalIdentifiers:
                      be:vat: BE0412887923
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  delivery:
                    deliveryDate: 2024-01-31
                  prepaid:
                    paymentDate: 2024-08-15
                    code: '55'
                    text: 'Advance payment for order #12345'
                    paymentReference:
                      value: Prepaid invoice ABC002
                      type: UNSTRUCTURED
                  paymentMeans:
                  - code: '42'
                    text: PPayment to bank account, Belgian structured reference
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    paymentAccount:
                      identifier: FR3330002005500000157841Z25
                      scheme: IBAN
                      country: FR
                      currency: EUR
                      bank:
                        identifier: CRLYFRPP
                        scheme: BIC
                    paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    paymentMandate:
                      identifier: MANDATE-2026-00045
                      payerFinancialAccount:
                        identifier: FR7630006000011234567890189
                  allowances:
                  - netAmount: '150'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '200'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                  documentTotals:
                    netAmount: '1000'
                    vatAmount: '100'
                    grossAmount: '1100'
                    prepaidAmount: '500'
                    roundingDifference: '1100'
                    payableAmount: '600'
                    linesNetAmount: '900'
                    allowancesNetAmount: '100'
                    chargesNetAmount: '200'
                  vatDetails:
                  - vatCategory: S
                    vatPercentage: '10'
                    netAmount: '1000'
                    vatAmount: '100'
                    exemptionReason: Medical supplies are exempt from VAT
                    exemptionReasonCode: VATEX-EU-79-C
                  uploadId: '123456789'
                  vatChargeableMethod: payment_date
                  vatAlreadyDeclared: true
                  processControl:
                    businessProcess: goods
                  profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                connections:
                - id: 00000001-0000-0000-0000-000000000001
                  relationType: SUPPLIER
                - id: 00000001-0000-0000-0000-000000000002
                  relationType: CUSTOMER
                  displayName: ABC Company
                retentionTime: 2023-10-04T14:20:31.502921Z
                rawLines:
                  '5':
                    unit:
                      confidence: 0.99
                      value: stuks
                      coordinates: {}
                rawData:
                  invoiceDate:
                    confidence: 0.99
                    value: 2024-01-01
                    coordinates: {}
                  vatDetails:
                  - vatCode:
                      confidence: 0.99
                      value: ABC
                      coordinates: {}
                processingData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors:
                      peppol:
                        sbdhInstanceIdentifiers:
                        - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                validationData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors.validator:
                      dataExtraction:
                        status: COMPLETED
                        validationId: 00000001-0000-0000-0000-000000000000
                        results:
                          ocr.confidence:
                            level: ERROR
                            locations:
                            - type: field
                              path: dueDate
                              parameters:
                                confidence: 0.75
                customCategories:
                  purchases:
                  - fuel
                  - restaurant
                timestamps:
                  createdAt: 2025-07-04T14:20:31.502921Z
                  updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}:jsonpatch:
    patch:
      tags:
      - Documents
      summary: Update document v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document v2 by its ID on the given space by sending JSON patch
        <br/> Scope: space_write"
      operationId: jsonpatchDocumentV2
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Document data to update
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /description
              value: patched description
            - op: remove
              path: /foo
        required: true
      responses:
        '200':
          description: Update document successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  $schema: 
                    https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                  documentNumber: ABC002
                  issueDate: 2024-01-31
                  invoiceType: '380'
                  currencyCode: EUR
                  dueDate: 2024-03-30
                  buyerReference: CUST-001
                  contractReference: CONTRACT001
                  purchaseOrderReference: PO123
                  paymentTerms: Net 60
                  notes:
                  - code: AAA
                    text: Goods item description
                  invoiceReferences:
                  - invoiceReference: ABC002
                    issueDate: 2024-01-14
                    invoiceType: '380'
                  supplier:
                    legalName: Monte Carlo Ltd
                    tradingName: Monte Carlo Ltd
                    address:
                      streetName: Rue des Fleurs
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      department: Service achat
                      city: LIBOURNE CEDEX
                      postalCode: '33506'
                      countryCode: FR
                    globalIdentifiers:
                      fr:siren: '349718288'
                      fr:siret: '34971828812345'
                      fr:vat: FR63349718288
                      global:email:
                      - montecarloltd@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  customer:
                    legalName: Unifiedpost Group
                    tradingName: ?????????
                    address:
                      streetName: Bloemendalelaan
                      buildingNumber: 62/3
                      buildingName: Building West
                      floor: '4'
                      room: '47'
                      city: Maldegem
                      postalCode: '9990'
                      countryCode: BE
                    globalIdentifiers:
                      be:vat: BE0412887923
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  delivery:
                    deliveryDate: 2024-01-31
                  prepaid:
                    paymentDate: 2024-08-15
                    code: '55'
                    text: 'Advance payment for order #12345'
                    paymentReference:
                      value: Prepaid invoice ABC002
                      type: UNSTRUCTURED
                  paymentMeans:
                  - code: '42'
                    text: PPayment to bank account, Belgian structured reference
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    paymentAccount:
                      identifier: FR3330002005500000157841Z25
                      scheme: IBAN
                      country: FR
                      currency: EUR
                      bank:
                        identifier: CRLYFRPP
                        scheme: BIC
                    paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    paymentMandate:
                      identifier: MANDATE-2026-00045
                      payerFinancialAccount:
                        identifier: FR7630006000011234567890189
                  allowances:
                  - netAmount: '150'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '200'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                  documentTotals:
                    netAmount: '1000'
                    vatAmount: '100'
                    grossAmount: '1100'
                    prepaidAmount: '500'
                    roundingDifference: '1100'
                    payableAmount: '600'
                    linesNetAmount: '900'
                    allowancesNetAmount: '100'
                    chargesNetAmount: '200'
                  vatDetails:
                  - vatCategory: S
                    vatPercentage: '10'
                    netAmount: '1000'
                    vatAmount: '100'
                    exemptionReason: Medical supplies are exempt from VAT
                    exemptionReasonCode: VATEX-EU-79-C
                  uploadId: '123456789'
                  vatChargeableMethod: payment_date
                  vatAlreadyDeclared: true
                  processControl:
                    businessProcess: goods
                  profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                connections:
                - id: 00000001-0000-0000-0000-000000000001
                  relationType: SUPPLIER
                - id: 00000001-0000-0000-0000-000000000002
                  relationType: CUSTOMER
                  displayName: ABC Company
                retentionTime: 2023-10-04T14:20:31.502921Z
                rawLines:
                  '5':
                    unit:
                      confidence: 0.99
                      value: stuks
                      coordinates: {}
                rawData:
                  invoiceDate:
                    confidence: 0.99
                    value: 2024-01-01
                    coordinates: {}
                  vatDetails:
                  - vatCode:
                      confidence: 0.99
                      value: ABC
                      coordinates: {}
                processingData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors:
                      peppol:
                        sbdhInstanceIdentifiers:
                        - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                validationData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors.validator:
                      dataExtraction:
                        status: COMPLETED
                        validationId: 00000001-0000-0000-0000-000000000000
                        results:
                          ocr.confidence:
                            level: ERROR
                            locations:
                            - type: field
                              path: dueDate
                              parameters:
                                confidence: 0.75
                customCategories:
                  purchases:
                  - fuel
                  - restaurant
                timestamps:
                  createdAt: 2025-07-04T14:20:31.502921Z
                  updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space and/or Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}:move:
    post:
      tags:
      - Documents
      summary: Move document to a directory
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Move document on the given space to a directory <br/> Scope: space_write"
      operationId: moveDocumentToDirectory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier.
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier.
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Move document request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveDocumentToDirectoryRequest'
            examples:
              Move to root directory:
                description: Move to root directory
                value:
                  parentDirectoryId:
              Move to directory:
                description: Move to directory
                value:
                  parentDirectoryId: 44d929f7-952d-4283-9010-8a63a16831b3
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              examples:
                Document:
                  description: Document
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: PURCHASES
                    status:
                      pay: FULLY_PAID
                    category: INVOICE
                    metadata:
                      $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                      documentNumber: ABC002
                      issueDate: 2024-01-31
                      invoiceType: '380'
                      currencyCode: EUR
                      dueDate: 2024-03-30
                      buyerReference: CUST-001
                      contractReference: CONTRACT001
                      purchaseOrderReference: PO123
                      paymentTerms: Net 60
                      notes:
                      - code: AAA
                        text: Goods item description
                      invoiceReferences:
                      - invoiceReference: ABC002
                        issueDate: 2024-01-14
                        invoiceType: '380'
                      supplier:
                        legalName: Monte Carlo Ltd
                        tradingName: Monte Carlo Ltd
                        address:
                          streetName: Rue des Fleurs
                          buildingNumber: 22BIS
                          floor: Zone industrielle de la Ballastrierre Ouest
                          postBox: BP 40122
                          department: Service achat
                          city: LIBOURNE CEDEX
                          postalCode: '33506'
                          countryCode: FR
                        globalIdentifiers:
                          fr:siren: '349718288'
                          fr:siret: '34971828812345'
                          fr:vat: FR63349718288
                          global:email:
                          - montecarloltd@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      customer:
                        legalName: Unifiedpost Group
                        tradingName: ?????????
                        address:
                          streetName: Bloemendalelaan
                          buildingNumber: 62/3
                          buildingName: Building West
                          floor: '4'
                          room: '47'
                          city: Maldegem
                          postalCode: '9990'
                          countryCode: BE
                        globalIdentifiers:
                          be:vat: BE0412887923
                          global:email:
                          - john@example.com
                          global:phoneNumber:
                          - '+1234567890'
                      delivery:
                        deliveryDate: 2024-01-31
                      prepaid:
                        paymentDate: 2024-08-15
                        code: '55'
                        text: 'Advance payment for order #12345'
                        paymentReference:
                          value: Prepaid invoice ABC002
                          type: UNSTRUCTURED
                      paymentMeans:
                      - code: '42'
                        text: PPayment to bank account, Belgian structured reference
                        paymentReference:
                          value: 001/4037/32870
                          type: STRUCTURED
                          scheme: OGM_VCS
                        paymentAccount:
                          identifier: FR3330002005500000157841Z25
                          scheme: IBAN
                          country: FR
                          currency: EUR
                          bank:
                            identifier: CRLYFRPP
                            scheme: BIC
                        paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                        paymentMandate:
                          identifier: MANDATE-2026-00045
                          payerFinancialAccount:
                            identifier: FR7630006000011234567890189
                      allowances:
                      - netAmount: '150'
                        baseAmount: '1000'
                        percentage: '15'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Discount
                        reasonCode: '95'
                      charges:
                      - netAmount: '200'
                        baseAmount: '1000'
                        percentage: '20'
                        vatCategory: S
                        vatPercentage: '10'
                        description: Advertising
                        reasonCode: AA
                      documentTotals:
                        netAmount: '1000'
                        vatAmount: '100'
                        grossAmount: '1100'
                        prepaidAmount: '500'
                        roundingDifference: '1100'
                        payableAmount: '600'
                        linesNetAmount: '900'
                        allowancesNetAmount: '100'
                        chargesNetAmount: '200'
                      vatDetails:
                      - vatCategory: S
                        vatPercentage: '10'
                        netAmount: '1000'
                        vatAmount: '100'
                        exemptionReason: Medical supplies are exempt from VAT
                        exemptionReasonCode: VATEX-EU-79-C
                      uploadId: '123456789'
                      vatChargeableMethod: payment_date
                      vatAlreadyDeclared: true
                      processControl:
                        businessProcess: goods
                      profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                    tags:
                    - new
                    tasks:
                    - extensionName: com.unifiedpost.btx.data:approve
                      status: approve
                    connections:
                    - id: 00000001-0000-0000-0000-000000000001
                      relationType: SUPPLIER
                    - id: 00000001-0000-0000-0000-000000000002
                      relationType: CUSTOMER
                      displayName: ABC Company
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    rawLines:
                      '5':
                        unit:
                          confidence: 0.99
                          value: stuks
                          coordinates: {}
                    rawData:
                      invoiceDate:
                        confidence: 0.99
                        value: 2024-01-01
                        coordinates: {}
                      vatDetails:
                      - vatCode:
                          confidence: 0.99
                          value: ABC
                          coordinates: {}
                    processingData:
                      spaceExtensions:
                        com.unifiedpost.btx.connectors:
                          peppol:
                            sbdhInstanceIdentifiers:
                            - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                    validationData:
                      spaceExtensions:
                        com.unifiedpost.btx.connectors.validator:
                          dataExtraction:
                            status: COMPLETED
                            validationId: 00000001-0000-0000-0000-000000000000
                            results:
                              ocr.confidence:
                                level: ERROR
                                locations:
                                - type: field
                                  path: dueDate
                                  parameters:
                                    confidence: 0.75
                    customCategories:
                      purchases:
                      - fuel
                      - restaurant
                    timestamps:
                      createdAt: 2025-07-04T14:20:31.502921Z
                      updatedAt: 2025-07-04T14:20:31.502921Z
                Document with parent directory:
                  description: Document with parent directory
                  value:
                    id: 0ca2797b-6365-4bf2-a490-247075e3cede
                    spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                    description: Sample Document
                    source: Sample Source
                    folder: FILES
                    category: FILE
                    metadata:
                      $schema: 
                        https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                      documentNumber: ABC002
                    tags:
                    - new
                    retentionTime: 2023-10-04T14:20:31.502921Z
                    parentDirectory:
                      id: 44d929f7-952d-4283-9010-8a63a16831b3
                      name: Plant
                    timestamps:
                      createdAt: 2025-07-04T14:20:31.502921Z
                      updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}:unassignConnection:
    post:
      tags:
      - Documents
      summary: Unassign connection from document
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Unassign connection from document <br/> Scope: space_write"
      operationId: unassignDocumentConnection
      parameters:
      - name: spaceId
        in: path
        description: The space unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document unique identifier. (A UUID specified by RFC4122).
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection to unassign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentConnectionRequest'
            example:
              id: 4c32d3fb-0023-470c-ae21-105274a94706
              relationType: CUSTOMER
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentV2'
              example:
                id: 0ca2797b-6365-4bf2-a490-247075e3cede
                spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                description: Sample Document
                source: Sample Source
                folder: PURCHASES
                status:
                  pay: FULLY_PAID
                category: INVOICE
                metadata:
                  $schema: 
                    https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                  documentNumber: ABC002
                  issueDate: 2024-01-31
                  invoiceType: '380'
                  currencyCode: EUR
                  dueDate: 2024-03-30
                  buyerReference: CUST-001
                  contractReference: CONTRACT001
                  purchaseOrderReference: PO123
                  paymentTerms: Net 60
                  notes:
                  - code: AAA
                    text: Goods item description
                  invoiceReferences:
                  - invoiceReference: ABC002
                    issueDate: 2024-01-14
                    invoiceType: '380'
                  supplier:
                    legalName: Monte Carlo Ltd
                    tradingName: Monte Carlo Ltd
                    address:
                      streetName: Rue des Fleurs
                      buildingNumber: 22BIS
                      floor: Zone industrielle de la Ballastrierre Ouest
                      postBox: BP 40122
                      department: Service achat
                      city: LIBOURNE CEDEX
                      postalCode: '33506'
                      countryCode: FR
                    globalIdentifiers:
                      fr:siren: '349718288'
                      fr:siret: '34971828812345'
                      fr:vat: FR63349718288
                      global:email:
                      - montecarloltd@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  customer:
                    legalName: Unifiedpost Group
                    tradingName: ?????????
                    address:
                      streetName: Bloemendalelaan
                      buildingNumber: 62/3
                      buildingName: Building West
                      floor: '4'
                      room: '47'
                      city: Maldegem
                      postalCode: '9990'
                      countryCode: BE
                    globalIdentifiers:
                      be:vat: BE0412887923
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '+1234567890'
                  delivery:
                    deliveryDate: 2024-01-31
                  prepaid:
                    paymentDate: 2024-08-15
                    code: '55'
                    text: 'Advance payment for order #12345'
                    paymentReference:
                      value: Prepaid invoice ABC002
                      type: UNSTRUCTURED
                  paymentMeans:
                  - code: '42'
                    text: PPayment to bank account, Belgian structured reference
                    paymentReference:
                      value: 001/4037/32870
                      type: STRUCTURED
                      scheme: OGM_VCS
                    paymentAccount:
                      identifier: FR3330002005500000157841Z25
                      scheme: IBAN
                      country: FR
                      currency: EUR
                      bank:
                        identifier: CRLYFRPP
                        scheme: BIC
                    paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    paymentMandate:
                      identifier: MANDATE-2026-00045
                      payerFinancialAccount:
                        identifier: FR7630006000011234567890189
                  allowances:
                  - netAmount: '150'
                    baseAmount: '1000'
                    percentage: '15'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Discount
                    reasonCode: '95'
                  charges:
                  - netAmount: '200'
                    baseAmount: '1000'
                    percentage: '20'
                    vatCategory: S
                    vatPercentage: '10'
                    description: Advertising
                    reasonCode: AA
                  documentTotals:
                    netAmount: '1000'
                    vatAmount: '100'
                    grossAmount: '1100'
                    prepaidAmount: '500'
                    roundingDifference: '1100'
                    payableAmount: '600'
                    linesNetAmount: '900'
                    allowancesNetAmount: '100'
                    chargesNetAmount: '200'
                  vatDetails:
                  - vatCategory: S
                    vatPercentage: '10'
                    netAmount: '1000'
                    vatAmount: '100'
                    exemptionReason: Medical supplies are exempt from VAT
                    exemptionReasonCode: VATEX-EU-79-C
                  uploadId: '123456789'
                  vatChargeableMethod: payment_date
                  vatAlreadyDeclared: true
                  processControl:
                    businessProcess: goods
                  profileId: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
                tags:
                - new
                tasks:
                - extensionName: com.unifiedpost.btx.data:approve
                  status: approve
                connections:
                - id: 00000001-0000-0000-0000-000000000001
                  relationType: SUPPLIER
                - id: 00000001-0000-0000-0000-000000000002
                  relationType: CUSTOMER
                  displayName: ABC Company
                retentionTime: 2023-10-04T14:20:31.502921Z
                rawLines:
                  '5':
                    unit:
                      confidence: 0.99
                      value: stuks
                      coordinates: {}
                rawData:
                  invoiceDate:
                    confidence: 0.99
                    value: 2024-01-01
                    coordinates: {}
                  vatDetails:
                  - vatCode:
                      confidence: 0.99
                      value: ABC
                      coordinates: {}
                processingData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors:
                      peppol:
                        sbdhInstanceIdentifiers:
                        - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
                validationData:
                  spaceExtensions:
                    com.unifiedpost.btx.connectors.validator:
                      dataExtraction:
                        status: COMPLETED
                        validationId: 00000001-0000-0000-0000-000000000000
                        results:
                          ocr.confidence:
                            level: ERROR
                            locations:
                            - type: field
                              path: dueDate
                              parameters:
                                confidence: 0.75
                customCategories:
                  purchases:
                  - fuel
                  - restaurant
                timestamps:
                  createdAt: 2025-07-04T14:20:31.502921Z
                  updatedAt: 2025-07-04T14:20:31.502921Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/documents/{documentId}/status/spaceExtensions/{extensionNameSpace}/{extensionName}:
    get:
      tags:
      - Documents
      summary: Get document status
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document status of a specific extension (connector)."
      operationId: getDocumentStatusOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: sent
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    put:
      tags:
      - Documents
      summary: Create/Update document status of extension
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/Update document status of a specific extension (connector)."
      operationId: replaceDocumentStatusOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: Document status specific to the given extension
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              status: sent
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: sent
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    patch:
      tags:
      - Documents
      summary: Update document status of extension
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document status of a specific extension (connector) with json
        patch operations."
      operationId: updateDocumentStatusOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: Json-patch operations to apply to document status
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: add
              path: /sbdhInstanceIdentifiers
              value:
              - 12345_118e3040-51d2-11e3-8f96-0800200c9a66
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: sent
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
  ? /transaction/v2/spaces/{spaceId}/documents/{documentId}/validationData/spaceExtensions/{extensionNameSpace}/{extensionName}
  : get:
      tags:
      - Documents
      summary: Get document validation data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get document’s validation data of a specific extension (connector)."
      operationId: getDocumentValidationDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: COMPLETED
                validationId: 00000001-0000-0000-0000-000000000000
                results:
                  ocr.confidence:
                    level: ERROR
                    locations:
                    - type: field
                      path: dueDate
                      parameters:
                        confidence: 0.75
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    put:
      tags:
      - Documents
      summary: Create/update document validation data.
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/Update document’s validation data of a specific extension (connector)."
      operationId: replaceDocumentValidationDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: New value for the document validation data specific to the given
          extension
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/JsonBMap'
            example:
              status: COMPLETED
              validationId: 00000001-0000-0000-0000-000000000000
              results:
                ocr.confidence:
                  level: ERROR
                  locations:
                  - type: field
                    path: dueDate
                    parameters:
                      confidence: 0.75
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: COMPLETED
                validationId: 00000001-0000-0000-0000-000000000000
                results:
                  ocr.confidence:
                    level: ERROR
                    locations:
                    - type: field
                      path: dueDate
                      parameters:
                        confidence: 0.75
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
    patch:
      tags:
      - Documents
      summary: Update document validation data
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document’s validation data of a specific extension (connector)
        with json patch operations."
      operationId: updateDocumentValidationDataOfExtensionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: documentId
        in: path
        description: The document identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: extensionNameSpace
        in: path
        description: Extension namespace
        required: true
        schema:
          type: string
      - name: extensionName
        in: path
        description: Extension name
        required: true
        schema:
          type: string
      requestBody:
        description: Json-patch operations to apply to validation data
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /validationId
              value: 00000001-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                status: COMPLETED
                validationId: 00000001-0000-0000-0000-000000000000
                results:
                  ocr.confidence:
                    level: ERROR
                    locations:
                    - type: field
                      path: dueDate
                      parameters:
                        confidence: 0.75
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '401':
          description: Unauthorized, the access token does not belong to the service
            account of the extension
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '404':
          description: Space/Document UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2: []
  /transaction/v2/spaces/{spaceId}/documents:paydetails:
    post:
      tags:
      - Documents
      summary: Get documents payment details v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get documents payment details v2 by the IDs on the given space <br/>
        Scope: space_read"
      operationId: getDocumentPaymentDetailsV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Document Payment Details to request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentPaymentDetailsRequestV2'
            example:
              documents:
              - 00000004-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentPaymentDetailsResultListV2'
              example:
                documents:
                - id: 00000001-0000-0000-0000-000000000000
                  metadata:
                    $schema: 
                      https://btx.unifiedpost.com/btx/datastore/document/document_metadata/v1/document-metadata-schema.json
                    documentNumber: ABC002
                    issueDate: 2024-01-31
                    invoiceType: '380'
                    currencyCode: EUR
                    dueDate: 2024-03-30
                    buyerReference: CUST-001
                    contractReference: CONTRACT001
                    purchaseOrderReference: PO123
                    paymentTerms: Net 60
                    notes:
                    - code: AAA
                      text: Goods item description
                    invoiceReferences:
                    - invoiceReference: ABC002
                      issueDate: 2024-01-14
                      invoiceType: '380'
                    supplier:
                      legalName: Monte Carlo Ltd
                      tradingName: Monte Carlo Ltd
                      address:
                        streetName: Rue des Fleurs
                        buildingNumber: 22BIS
                        floor: Zone industrielle de la Ballastrierre Ouest
                        postBox: BP 40122
                        department: Service achat
                        city: LIBOURNE CEDEX
                        postalCode: '33506'
                        countryCode: FR
                      globalIdentifiers:
                        fr:siren: '349718288'
                        fr:siret: '34971828812345'
                        fr:vat: FR63349718288
                        global:email:
                        - montecarloltd@example.com
                        global:phoneNumber:
                        - '+1234567890'
                    customer:
                      legalName: Unifiedpost Group
                      tradingName: ?????????
                      address:
                        streetName: Bloemendalelaan
                        buildingNumber: 62/3
                        buildingName: Building West
                        floor: '4'
                        room: '47'
                        city: Maldegem
                        postalCode: '9990'
                        countryCode: BE
                      globalIdentifiers:
                        be:vat: BE0412887923
                        global:email:
                        - john@example.com
                        global:phoneNumber:
                        - '+1234567890'
                    delivery:
                      deliveryDate: 2024-01-31
                    prepaid:
                      paymentDate: 2024-08-15
                      code: '55'
                      text: 'Advance payment for order #12345'
                      paymentReference:
                        value: Prepaid invoice ABC002
                        type: UNSTRUCTURED
                    paymentMeans:
                    - code: '42'
                      text: PPayment to bank account, Belgian structured reference
                      paymentReference:
                        value: 001/4037/32870
                        type: STRUCTURED
                        scheme: OGM_VCS
                      paymentAccount:
                        identifier: FR3330002005500000157841Z25
                        scheme: IBAN
                        country: FR
                        currency: EUR
                        bank:
                          identifier: CRLYFRPP
                          scheme: BIC
                      paymentLink: https://tx.pay-nxt.com/payment-items/807594ae-...-166eca6e81a7
                    allowances:
                    - netAmount: '150'
                      baseAmount: '1000'
                      percentage: '15'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Discount
                      reasonCode: '95'
                    charges:
                    - netAmount: '200'
                      baseAmount: '1000'
                      percentage: '20'
                      vatCategory: S
                      vatPercentage: '10'
                      description: Advertising
                      reasonCode: AA
                    documentTotals:
                      netAmount: '1000'
                      vatAmount: '100'
                      grossAmount: '1100'
                      prepaidAmount: '500'
                      roundingDifference: '1100'
                      payableAmount: '600'
                    vatDetails:
                    - vatCategory: S
                      vatPercentage: '10'
                      netAmount: '1000'
                      vatAmount: '100'
                      exemptionReason: Medical supplies are exempt from VAT
                      exemptionReasonCode: VATEX-EU-79-C
                    uploadId: '123456789'
                    vatChargeableMethod: payment_date
                    vatAlreadyDeclared: true
                    processControl:
                      businessProcess: goods
                  status:
                    pay: FULLY_PAID
                  tasks:
                  - extensionName: com.unifiedpost.btx.data:approve
                    status: approve
                  supplier:
                    id: 06141394-72eb-4eed-bfa5-84caf4b78470
                    name: The Supplier
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                  category: INVOICE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v2/spaces/{spaceId}/connections:
    get:
      tags:
      - Connections
      summary: Get list of connections v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of connections v2 on the given space with optional filtering
        by identifiers.\n\tThe API supports pagination and sorting.\n <br/> Scope:
        space_read"
      operationId: listConnectionsV2
      parameters:
      - name: filter
        in: query
        schema:
          $ref: '#/components/schemas/ListConnectionsQueryParamsSingle'
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: type
        in: query
        description: List of connection type for searching. Can be multiple values
          separated by comma, or just one value
        explode: false
        schema:
          type: array
          items:
            type: string
        example: business,person
      - name: businessType
        in: query
        description: List of business type for searching. Can be multiple values separated
          by comma, or just one value
        explode: false
        schema:
          type: array
          items:
            type: string
        example: ENTERPRISE,GOVERNMENT
      - name: ql
        in: query
        description: "\tBTX Query Language filter expression. Examples:\n\t- type=business
          (or type[eq]=business or type[in]=(business))\n\t- connectionStatus=CONNECTED
          (or connectionStatus[in]=(CONNECTED,PENDING), connectionStatus[not_in]=(DISCONNECTED))\n
          \t- businessType=ENTERPRISE (or businessType[eq]=ENTERPRISE)\n\t- addresses.main.countryCode=BE\n
          \t- assignedAccountId=\"00044\" (or assignedAccountId[cont]=\"00044\")\n
          \t- globalIdentifiers.\"be:en\"=\"0400282475\" (or globalIdentifiers.\"\
          be:en\"[eq]=\"0400282475\")\n\t- metadata.selfBilling.customer.mandate=true\n
          \t- relationTypes[in]=(CUSTOMER,SUPPLIER)\n\t- tags[in]=(first_tag,second_tag)\n"
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Connection identifier (e.g. VAT number)
        schema:
          type: array
          items:
            type: string
      - name: metadata
        in: query
        description: "\tAllows filtering connections by nested metadata fields.\n\t
          Example:\n\tGiven the following metadata:\n\t{\n\t\t\"metadata\": {\n\t\t\
          \t\"selfBilling\": {\n\t\t\t\t\"customer\": { \"mandate\": true },\n\t\t\
          \t\t\"supplier\": { \"mandate\": false }\n\t\t\t}\n\t\t}\n\t}\n\tTo filter
          by connections where selfBilling.customer.mandate is true, send the query
          parameter:\n\t?metadata=selfBilling.customer.mandate=true\n"
        schema:
          type: array
          items:
            type: string
        example: metadata=selfBilling.customer.mandate=true
      - name: relationTypes
        in: query
        description: Relation Types for searching. Can be multiple values separated
          by comma, or just one value.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        example: CUSTOMER,PARTNER
      - name: tags
        in: query
        description: Filter by tags. Can be an array to filter by all tags (AND) -
          e.g. ?tags=first_tag&tags=second_tag. Or it could be a comma-separated list
          to filter by any of the values (OR) - e.g. ?tags=first_tag,second_tag.
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag
        - third_tag
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionInclude'
        example: paymentAccounts
      - name: connectorsKeyValue
        in: query
        description: Connectors data (key value)
        schema:
          type: array
          items:
            type: string
        example: connectorsKeyValue=name=email&connectorsKeyValue=active=true
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - name
          - name.asc
          - name.desc
          - type
          - type.asc
          - type.desc
          - assignedAccountId
          - assignedAccountId.asc
          - assignedAccountId.desc
          - businessType
          - businessType.asc
          - businessType.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConnectionsResponseV2'
              example:
                connections:
                - type: business
                  id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: Local123
                  alias: Sample Connection
                  connectionStatus: CONNECTED
                  relationTypes:
                  - SUPPLIER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - tag1
                  - tag2
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  legalName: Sample Business
                  tradeName: Trade Business
                  businessType: ENTERPRISE
                - type: person
                  id: 12345678-90ab-cdef-1234-567890abcdef
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: Sample Person
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - tag3
                  - tag4
                  active: false
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  firstName: John
                  lastName: Doe
                totalElements: 1
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create connection v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create connection v2 on the given space <br/> Scope: space_write"
      operationId: createConnectionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionRequestV2'
            examples:
              PersonConnection:
                description: PersonConnection
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  connectors:
                  - active: true
                    extensionId: 00000001-0001-0000-0000-000000000001
                    name: cross-peppol
                    namespace: com.unifiedpost.btx.connectors
                    settings:
                      peppolAccessPoint: access-point
                      peppolID: '12345'
                  firstName: John
                  lastName: Doe
              BusinessConnection:
                description: BusinessConnection
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siren: '530514157'
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:en: '0400282475'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    paymentTerms:
                      defaultDuePeriod: P0D
                      isEndOfMonth: true
                    paymentMethod: '31'
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  connectors:
                  - active: true
                    extensionId: 00000001-0001-0000-0000-000000000001
                    name: cross-peppol
                    namespace: com.unifiedpost.btx.connectors
                    settings:
                      peppolAccessPoint: access-point
                      peppolID: '12345'
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV2'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/connections/{connectionId}:
    get:
      tags:
      - Connections
      summary: Get connection info v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get connection information v2 by its ID on the given space <br/> Scope:
        space_read"
      operationId: getConnectionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionInclude'
        example: paymentAccounts
      responses:
        '200':
          description: Ok. Connection info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV2'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '404':
          description: Not Found. Connection uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Connections
      summary: Delete connection v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete connection v2 by its ID on the given space <br/> Scope: space_write"
      operationId: deleteConnectionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      responses:
        '204':
          description: Ok.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Connections
      summary: Update connection v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection v2 by its ID on the given space <br/> Scope: space_write"
      operationId: updateConnectionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Connection data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionPatchRequestV2'
            examples:
              Update Person Connection Request:
                description: Update Person Connection Request
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: Johnny
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  firstName: Joan
                  lastName: Doe
              Update Business Connection Request:
                description: Update Business Connection Request
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - SUPPLIER
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    paymentTerms:
                      defaultDuePeriod: P0D
                      isEndOfMonth: true
                    paymentMethod: '31'
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '200':
          description: Update connection successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV2'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/connections/{connectionId}:jsonpatch:
    patch:
      tags:
      - Connections
      summary: Update connection v2
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection v2 by its ID on the given space by sending JSON patch
        <br/> Scope: space_write"
      operationId: jsonpatchConnectionV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Connection data to update
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example: "[\n\t{op\": \"add\", \"path\": \"/metadata/selfBilling\", \"\
              value\": {}},\n\t{\"op\": \"remove\", \"path\": \"/foo\"}\n]"
        required: true
      responses:
        '200':
          description: Update connection successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV2'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        country: Belgium
                        countryCode: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/connections/{connectionId}/connectors:
    put:
      tags:
      - Connections
      summary: Create/update connectors in the connection.
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/update entire content inside the connectors of the given connectionId.
        <br/> Scope: space_write"
      operationId: replaceConnectorsV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Array of connectors
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/JsonBMap'
            example:
            - active: true
              extensionId: 00000001-0001-0000-0000-000000000001
              name: cross-peppol1
              namespace: com.unifiedpost.btx.connectors1
              settings:
                peppolAccessPoint: access-point1
                peppolID: '12345'
            - active: true
              extensionId: 00000001-0002-0000-0000-000000000001
              name: cross-peppol2
              namespace: com.unifiedpost.btx.connectors2
              settings:
                peppolAccessPoint: access-point2
                peppolID: '67890'
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JsonBMap'
              example:
              - active: true
                extensionId: 00000001-0001-0000-0000-000000000001
                name: cross-peppol1
                namespace: com.unifiedpost.btx.connectors1
                settings:
                  peppolAccessPoint: access-point1
                  peppolID: '12345'
              - active: true
                extensionId: 00000001-0002-0000-0000-000000000001
                name: cross-peppol2
                namespace: com.unifiedpost.btx.connectors2
                settings:
                  peppolAccessPoint: access-point2
                  peppolID: '67890'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets:
    get:
      tags:
      - Assets
      summary: Get list of assets
      description: |-
        <div class='my-preview'><span>Preview: The API is in development or testing phases and the interface could still change slightly.</span></div> <br/> Get list of assets on the given space, with options to filter out the result.
        The API supports pagination and sorting.
         <br/> Scope: space_read
      operationId: getAllAssets
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        description: Asset category
        schema:
          $ref: '#/components/schemas/Category'
        example: BRAND
      - name: fileType
        in: query
        description: Asset file type
        schema:
          type: string
        example: jpeg
      - name: status
        in: query
        description: Asset status
        schema:
          $ref: '#/components/schemas/AssetStatus'
        example: AWAITING_UPLOAD
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllAssetResult'
              example:
                assets:
                - id: 1d1911f5-38c2-4e49-b97d-ba5059bb813c
                  filename: brand logo
                  description: brand logo for the company
                  category: BRAND
                  status: VIRUS_SCANNED
                  creatorSubject: 00000001-0001-0001-0001-000000000000
                  creatorType: user
                  retentionTime: 2129-01-14T19:58:47Z
                  fileSize: 1024
                  fileType: jpeg
                  contentType: image/jpeg
                  source: user-upload
                  uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=zzz
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    key: value
                  createdAt: 2025-01-01T10:15:00Z
                  updatedAt: 2025-01-01T10:15:00Z
                totalElements: 1
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Assets
      summary: Create asset in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create asset in the space <br/> Scope: space_write"
      operationId: createSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Asset data to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
            example:
              filename: brand_logo.jpeg
              retentionTime: 2029-01-14T19:58:47+00:00
              fileSize: 1024
              contentType: image/jpeg
              source: user-upload
              fileType: jpeg
              description: Brand logo of the company.
              creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
              creatorType: user
              tags:
              - tag1
              - tag2
              metadata:
                key: value
              category: BRAND
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14T19:58:47Z
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06T10:15:00Z
                updatedAt: 2025-08-06T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets/{assetId}:
    get:
      tags:
      - Assets
      summary: Get asset in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get asset in the space <br/> Scope: space_read"
      operationId: getSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14T19:58:47Z
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06T10:15:00Z
                updatedAt: 2025-08-06T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Assets
      summary: Delete asset in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete asset in the space <br/> Scope: space_write"
      operationId: deleteSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Assets
      summary: Update asset in the space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update asset of the given space <br/> Scope: space_write"
      operationId: updateAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Asset data to update
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/AssetRequest'
            example:
              filename: brand_logo.jpeg
              retentionTime: 2029-01-14T19:58:47+00:00
              fileSize: 1024
              contentType: image/jpeg
              source: user-upload
              fileType: jpeg
              description: Brand logo of the company.
              creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
              creatorType: user
              tags:
              - tag1
              - tag2
              metadata:
                key: value
              category: BRAND
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14T19:58:47Z
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06T10:15:00Z
                updatedAt: 2025-08-06T12:45:00Z
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets/{assetId}/content:
    get:
      tags:
      - Assets
      summary: Get asset content
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get asset content on the given space <br/> Scope: space_read"
      operationId: getSpaceAssetContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '302':
          description: Found
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}:
    get:
      tags:
      - Documents
      summary: Get list of document categories
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of document categories with the given name and optional search
        term on the given space space. <br/> Scope: space_read"
      operationId: listCategories
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: search
        in: query
        description: Search term - partial, case insensitive search supported
        schema:
          type: string
      - name: active
        in: query
        description: Filter category values based on their status
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCategoriesResponse'
              example:
                values:
                - fuel
                - restaurant
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document category
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create document category on space <br/> Scope: space_write"
      operationId: createCategory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      requestBody:
        description: Category value to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryRequest'
            example:
              value: restaurant
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryResponse'
              example:
                value: restaurant
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}/{categoryValue}:
    delete:
      tags:
      - Documents
      summary: Delete document category
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document category on space <br/> Scope: space_write"
      operationId: deleteCategory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: categoryValue
        in: path
        description: Category value
        required: true
        schema:
          type: string
          example: fuel
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}/{categoryValue}:updateStatus:
    put:
      tags:
      - Documents
      summary: Set document category as active or inactive
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Set document category as active or inactive <br/> Scope: space_write"
      operationId: updateCategoryStatus
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: categoryValue
        in: path
        description: Category value
        required: true
        schema:
          type: string
          example: fuel
      requestBody:
        description: Category status to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceCategoryStatusRequest'
            example:
              active: true
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryStatusResponse'
              example:
                active: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}:updateValue:
    post:
      tags:
      - Documents
      summary: Update document category value.
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document category value. <br/> Scope: space_write"
      operationId: updateCategoryValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      requestBody:
        description: Update category value request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCategoryValueRequest'
            example:
              oldValue: restaurant
              newValue: fuel
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryValueResponse'
              example:
                value: fuel
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v3/spaces/{spaceId}/connections:
    get:
      tags:
      - Connections
      summary: Get list of connections v3
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> \tGet list of connections v3 on the given space with optional filtering
        by identifiers.\n\tThe API supports pagination and sorting.\n <br/> Scope:
        space_read"
      operationId: listConnectionsV3
      parameters:
      - name: filter
        in: query
        schema:
          $ref: '#/components/schemas/ListConnectionsQueryParamsSingleV3'
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: type
        in: query
        description: List of connection type for searching. Can be multiple values
          separated by comma, or just one value
        explode: false
        schema:
          type: array
          items:
            type: string
        example: business,person
      - name: businessType
        in: query
        description: List of business type for searching. Can be multiple values separated
          by comma, or just one value
        explode: false
        schema:
          type: array
          items:
            type: string
        example: ENTERPRISE,GOVERNMENT
      - name: ql
        in: query
        description: "\tBTX Query Language filter expression. Examples:\n\t- type=business
          (or type[eq]=business or type[in]=(business))\n\t- connectionStatus=CONNECTED
          (or connectionStatus[in]=(CONNECTED,PENDING), connectionStatus[not_in]=(DISCONNECTED))\n
          \t- businessType=ENTERPRISE (or businessType[eq]=ENTERPRISE)\n\t- addresses.main.countryCode=BE\n
          \t- assignedAccountId=\"00044\" (or assignedAccountId[cont]=\"00044\")\n
          \t- globalIdentifiers.\"be:en\"=\"0400282475\" (or globalIdentifiers.\"\
          be:en\"[eq]=\"0400282475\")\n\t- metadata.selfBilling.customer.mandate=true\n
          \t- relationTypes[in]=(CUSTOMER,SUPPLIER)\n\t- tags[in]=(first_tag,second_tag)\n"
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Connection identifier (e.g. VAT number)
        schema:
          type: array
          items:
            type: string
      - name: metadata
        in: query
        description: "\tAllows filtering connections by nested metadata fields.\n\t
          Example:\n\tGiven the following metadata:\n\t{\n\t\t\"metadata\": {\n\t\t\
          \t\"selfBilling\": {\n\t\t\t\t\"customer\": { \"mandate\": true },\n\t\t\
          \t\t\"supplier\": { \"mandate\": false }\n\t\t\t}\n\t\t}\n\t}\n\tTo filter
          by connections where selfBilling.customer.mandate is true, send the query
          parameter:\n\t?metadata=selfBilling.customer.mandate=true\n"
        schema:
          type: array
          items:
            type: string
        example: metadata=selfBilling.customer.mandate=true
      - name: relationTypes
        in: query
        description: Relation Types for searching. Can be multiple values separated
          by comma, or just one value.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        example: CUSTOMER,PARTNER
      - name: tags
        in: query
        description: Filter by tags. Can be an array to filter by all tags (AND) -
          e.g. ?tags=first_tag&tags=second_tag. Or it could be a comma-separated list
          to filter by any of the values (OR) - e.g. ?tags=first_tag,second_tag.
        schema:
          type: array
          items:
            type: string
        example:
        - first_tag
        - second_tag
        - third_tag
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionInclude'
        example: paymentAccounts
      - name: connectorsKeyValue
        in: query
        description: Connectors data (key value)
        schema:
          type: array
          items:
            type: string
        example: connectorsKeyValue=name=email&connectorsKeyValue=active=true
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - name
          - name.asc
          - name.desc
          - type
          - type.asc
          - type.desc
          - assignedAccountId
          - assignedAccountId.asc
          - assignedAccountId.desc
          - businessType
          - businessType.asc
          - businessType.desc
        example: createdAt.asc
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConnectionsResponseV3'
              example:
                connections:
                - type: business
                  id: 0ca2797b-6365-4bf2-a490-247075e3cede
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: Local123
                  alias: Sample Connection
                  connectionStatus: CONNECTED
                  relationTypes:
                  - SUPPLIER
                  addresses:
                    main:
                      addressType: BIZZ
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  tags:
                  - tag1
                  - tag2
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  legalName: Sample Business
                  tradeName: Trade Business
                  businessType: ENTERPRISE
                - type: person
                  id: 12345678-90ab-cdef-1234-567890abcdef
                  globalIdentifiers:
                    fr:siret: '12345678901234'
                    nl:kvk: '87654321'
                    be:vat: '123456789'
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: Sample Person
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      country: Belgium
                      countryCode: BE
                  tags:
                  - tag3
                  - tag4
                  active: false
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  createdAt: 2024-01-02T07:27:51.251000Z
                  firstName: John
                  lastName: Doe
                totalElements: 1
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Connections
      summary: Create connection v3
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create connection v3 on the given space <br/> Scope: space_write"
      operationId: createConnectionV3
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Connection to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionRequestV3'
            examples:
              PersonConnection:
                description: PersonConnection
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      addressType: BIZZ
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  connectors:
                  - active: true
                    extensionId: 00000001-0001-0000-0000-000000000001
                    name: cross-peppol
                    namespace: com.unifiedpost.btx.connectors
                    settings:
                      peppolAccessPoint: access-point
                      peppolID: '12345'
                  firstName: John
                  lastName: Doe
              BusinessConnection:
                description: BusinessConnection
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siren: '530514157'
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:en: '0400282475'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      addressType: BIZZ
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    paymentTerms:
                      defaultDuePeriod: P0D
                      isEndOfMonth: true
                    paymentMethod: '31'
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  connectors:
                  - active: true
                    extensionId: 00000001-0001-0000-0000-000000000001
                    name: cross-peppol
                    namespace: com.unifiedpost.btx.connectors
                    settings:
                      peppolAccessPoint: access-point
                      peppolID: '12345'
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV3'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v3/spaces/{spaceId}/connections/{connectionId}:
    get:
      tags:
      - Connections
      summary: Get connection info v3
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get connection information v3 by its ID on the given space <br/> Scope:
        space_read"
      operationId: getConnectionV3
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionInclude'
        example: paymentAccounts
      responses:
        '200':
          description: Ok. Connection info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV3'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '404':
          description: Not Found. Connection uuid must be invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    patch:
      tags:
      - Connections
      summary: Update connection v3
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update connection v3 by its ID on the given space <br/> Scope: space_write"
      operationId: updateConnectionV3
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Connection data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionPatchRequestV3'
            examples:
              Update Person Connection Request:
                description: Update Person Connection Request
                value:
                  type: person
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: Johnny
                  connectionStatus: CONNECTED
                  relationTypes:
                  - CUSTOMER
                  addresses:
                    main:
                      addressType: BIZZ
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  firstName: Joan
                  lastName: Doe
              Update Business Connection Request:
                description: Update Business Connection Request
                value:
                  type: business
                  spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                  globalIdentifiers:
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  assignedAccountId: '001'
                  alias: UP
                  connectionStatus: CONNECTED
                  relationTypes:
                  - SUPPLIER
                  addresses:
                    main:
                      addressType: BIZZ
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  tags:
                  - favorite
                  - liked
                  active: true
                  metadata:
                    paymentTerms:
                      defaultDuePeriod: P0D
                      isEndOfMonth: true
                    paymentMethod: '31'
                    channels:
                      main: delivery_on_platform
                      secondary: email
                    department: Accounting
                    logo: https://somelinks.com/logo.jpg
                    website: https://mycompanywebsite.com
                    notes: some notes
                    industry: Agriculture, Forestry And Fishing
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
        required: true
      responses:
        '200':
          description: Update connection successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionV3'
              examples:
                Business Connection:
                  description: Business Connection
                  value:
                    type: business
                    id: 00000001-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      be:vat: '123456789'
                      fr:siret: '12345678901234'
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                      nl:kvk: '87654321'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      extensionId: 00000001-0001-0000-0000-000000000001
                      name: cross-peppol
                      namespace: com.unifiedpost.btx.connectors
                      settings:
                        peppolAccessPoint: access-point
                        peppolID: '12345'
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    legalName: Unifiedpost Group
                    tradeName: unifiedpost
                    businessType: ENTERPRISE
                Person Connection:
                  description: Person Connection
                  value:
                    type: person
                    id: 00000002-0000-0000-0000-000000000000
                    spaceUrl: https://entity.store/entitystore/v1/directory/entities/entity_1/spaces/space_1
                    globalIdentifiers:
                      global:email:
                      - john@example.com
                      global:phoneNumber:
                      - '00301234567'
                    assignedAccountId: '001'
                    alias: UP
                    connectionStatus: CONNECTED
                    relationTypes:
                    - CUSTOMER
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    tags:
                    - favorite
                    - liked
                    active: true
                    metadata:
                      channels:
                        main: delivery_on_platform
                        secondary: email
                      department: Accounting
                      industry: Agriculture, Forestry And Fishing
                      logo: https://somelinks.com/logo.jpg
                      notes: some notes
                      website: https://mycompanywebsite.com
                    connectors:
                    - active: true
                      name: email
                      settings:
                        emailAddress: john.doe@example.com
                    paymentAccounts:
                    - id: 0ca2797b-6365-4bf2-a490-247075e3cede
                      identifier: BE19519469892112
                      scheme: IBAN
                      country: BE
                      currency: EUR
                      bank:
                        identifier: ABNABE2AIDJ
                        scheme: BIC
                      spaceId: 56079d21-a756-49fb-9286-9859c354aa69
                      ownedBySpace: true
                      active: true
                      ownerName: UP RO
                      isDefault: true
                    firstName: John
                    lastName: Doe
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v3/spaces/{spaceId}/connections/{connectionId}/connectors:
    put:
      tags:
      - Connections
      summary: Create/update connectors in the connection v3.
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create/update entire content inside the connectors of the given connectionId.
        <br/> Scope: space_write"
      operationId: replaceConnectorsV3
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: connectionId
        in: path
        description: The connection identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 1d0159ca-ab19-49d5-9e13-9d34afb03849
      requestBody:
        description: Array of connectors
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/JsonBMap'
            example:
            - active: true
              extensionId: 00000001-0001-0000-0000-000000000001
              name: cross-peppol1
              namespace: com.unifiedpost.btx.connectors1
              settings:
                peppolAccessPoint: access-point1
                peppolID: '12345'
            - active: true
              extensionId: 00000001-0002-0000-0000-000000000001
              name: cross-peppol2
              namespace: com.unifiedpost.btx.connectors2
              settings:
                peppolAccessPoint: access-point2
                peppolID: '67890'
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JsonBMap'
              example:
              - active: true
                extensionId: 00000001-0001-0000-0000-000000000001
                name: cross-peppol1
                namespace: com.unifiedpost.btx.connectors1
                settings:
                  peppolAccessPoint: access-point1
                  peppolID: '12345'
              - active: true
                extensionId: 00000001-0002-0000-0000-000000000001
                name: cross-peppol2
                namespace: com.unifiedpost.btx.connectors2
                settings:
                  peppolAccessPoint: access-point2
                  peppolID: '67890'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Connection UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27T12:34:50Z
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
components:
  schemas:
    JsonBMap:
      type: object
      additionalProperties: true
    JsonBMapNullable:
      type: object
      additionalProperties: true
      nullable: true
    PatchRequest:
      type: array
      items:
        $ref: '#/components/schemas/PatchDocument'
    PatchDocument:
      required:
      - op
      - path
      type: object
      properties:
        op:
          type: string
          description: The operation to be performed
          enum:
          - add
          - remove
          - replace
          - move
          - copy
          - test
        path:
          type: string
          description: A JSON-Pointer
        value:
          type: object
          description: The value to be used within the operations.
        from:
          type: string
          description: A string containing a JSON Pointer value.
      description: A JSONPatch document as defined by RFC 6902
    AllDocumentsActionResult:
      type: object
      properties:
        success:
          type: array
          description: List of successful document ids
          items:
            type: string
            description: List of successful document ids
        failure:
          type: array
          description: List of failed document ids
          items:
            type: string
            description: List of failed document ids
    ApiErrorProblemDetail:
      required:
      - error
      - requestId
      - timestamp
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
          format: uri
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
    NestedProblem:
      required:
      - detail
      - error
      - title
      type: object
      properties:
        error:
          type: string
        title:
          type: string
        detail:
          type: string
        type:
          type: string
          format: uri
    DocumentsActionRequest:
      type: object
      properties:
        spaceId:
          type: string
          description: The space that documents belong to
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
        documents:
          type: array
          description: IDs of the documents
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
          items:
            type: string
            description: IDs of the documents
            format: uuid
            example: 56079d21-a756-49fb-9286-9859c354aa69
    DocumentActionAdditionalData:
      type: object
      properties:
        additionalComment:
          type: string
          description: additional comment
          example: something
        sharedPaymentStatusEmails:
          type: array
          items:
            type: string
            description: The email address to send payment status updates
            format: idn-email
            example: me@mail.com
        reason:
          type: string
          description: reason
          example: OTHER
        otherReason:
          type: string
          description: other reason. Required if reason is OTHER, else optional
          example: by mistake
      description: data
    MarkAsRefusedRequest:
      type: object
      properties:
        spaceId:
          type: string
          description: The space that documents belong to
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
        documents:
          type: array
          description: IDs of the documents
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
          items:
            type: string
            description: IDs of the documents
            format: uuid
            example: 56079d21-a756-49fb-9286-9859c354aa69
        data:
          $ref: '#/components/schemas/DocumentActionAdditionalData'
    DocumentActionData:
      type: object
      properties:
        additionalComment:
          type: string
          description: additional comment
          example: something
        sharedPaymentStatusEmails:
          type: array
          items:
            type: string
            description: The email address to send payment status updates
            format: idn-email
            example: me@mail.com
      description: data (optional)
    MarkAsResolvedRequest:
      type: object
      properties:
        spaceId:
          type: string
          description: The space that documents belong to
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
        documents:
          type: array
          description: IDs of the documents
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
          items:
            type: string
            description: IDs of the documents
            format: uuid
            example: 56079d21-a756-49fb-9286-9859c354aa69
        data:
          $ref: '#/components/schemas/DocumentActionData'
    MarkAsWontBePaidRequest:
      type: object
      properties:
        spaceId:
          type: string
          description: The space that documents belong to
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
        documents:
          type: array
          description: IDs of the documents
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
          items:
            type: string
            description: IDs of the documents
            format: uuid
            example: 56079d21-a756-49fb-9286-9859c354aa69
        data:
          $ref: '#/components/schemas/DocumentActionAdditionalData'
    DocumentAttachmentResult:
      required:
      - contentType
      - documentId
      - fileSize
      - fileType
      - filename
      - id
      - status
      type: object
      properties:
        id:
          type: string
          description: Attachment id
          format: uuid
        documentId:
          type: string
          description: Document id
          format: uuid
        filename:
          type: string
          description: filename of the document attachment
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The attachment for document XYZ
        retentionTime:
          type: string
          description: Duration until expiration of attachment
          format: date-time
        fileSize:
          type: integer
          description: size of attachment in bytes
          format: int32
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        uploadUrl:
          type: string
          description: short lived url where upload can be performed to
          example: http://path/to/file.xml
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        status:
          type: string
          description: status of attachment
          example: AWAITING_UPLOAD
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    DocumentAttachmentRequest:
      required:
      - contentType
      - fileType
      - filename
      type: object
      properties:
        filename:
          type: string
          description: filename of the document attachment
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The attachment for document XYZ
        retentionTime:
          type: string
          description: Duration until expiration of attachment
          format: date-time
        fileSize:
          type: integer
          description: size of attachment in bytes
          format: int32
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    AllDocumentAttachmentResult:
      type: object
      properties:
        documentAttachments:
          type: array
          description: List of document attachments
          items:
            $ref: '#/components/schemas/DocumentAttachmentResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    DocumentAttachmentStatus:
      type: string
      description: Document attachment status
      example: AWAITING_UPLOAD
      enum:
      - AWAITING_UPLOAD
      - VIRUS_SCANNING
      - VIRUS_SCANNED
      - VIRUS_ERROR
      - PROCESSING
      - PROCESSED
      - ERROR
    UpdateDocumentAttachmentRequest:
      type: object
      properties:
        filename:
          type: string
          description: filename of the document attachment
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The attachment for document XYZ
        retentionTime:
          type: string
          description: Duration until expiration of attachment
          format: date-time
        status:
          $ref: '#/components/schemas/DocumentAttachmentStatus'
        fileSize:
          type: integer
          description: size of attachment in bytes
          format: int32
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    DocumentRepresentationResult:
      required:
      - main
      type: object
      properties:
        id:
          type: string
          description: id of document representation
          format: uuid
        documentId:
          type: string
          description: id of document
          format: uuid
        retentionTime:
          type: string
          description: retention time of content
          format: date-time
        type:
          type: string
          description: type of the document representation
          example: legal_xml
        filename:
          type: string
          description: filename of the document representation
          example: legal_xml.xml
        contentType:
          type: string
          description: content_type of the document representation
          example: application/xml
        size:
          type: number
          description: size of the document representation content
          example: 20
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        status:
          $ref: '#/components/schemas/RepresentationStatus'
        main:
          type: boolean
          description: whether this is the main representation of a document
        uploadUrl:
          type: string
          description: short lived url where upload can be performed to
          example: http://path/to/file.xml
        md5Hash:
          type: string
          description: md5 hashing
          example: 938c2cc0dcc05f2b68c4287040cfcf71
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        original:
          type: boolean
          description: 'True: The representation was originally uploaded by the client
            or received from a connector;False: The representation was generated based
            on the JSON representation of the document'
    RepresentationStatus:
      type: string
      description: status of representation
      example: AWAITING_UPLOAD
      enum:
      - AWAITING_UPLOAD
      - VIRUS_SCANNING
      - VIRUS_SCANNED
      - VIRUS_ERROR
      - PROCESSING
      - AWAITING_USER_ACTION
      - PROCESSED
      - REJECTED
      - ERROR
    DocumentRepresentationRequest:
      required:
      - contentType
      - filename
      - type
      type: object
      properties:
        fileSize:
          type: integer
          description: size of file in bytes
          format: int32
        retentionTime:
          type: string
          description: retention time of content
          format: date-time
        type:
          type: string
          description: type of the document representation
          example: legal_xml
        filename:
          type: string
          description: filename of the document representation
          example: legal_xml.xml
        contentType:
          type: string
          description: content_type of the document representation
          example: application/xml
        main:
          type: boolean
          description: whether this is the main representation of a document
        md5Hash:
          type: string
          description: md5 hash of a document
        original:
          type: boolean
          description: 'True: The representation was originally uploaded by the client
            or received from a connector;False: The representation was generated based
            on the JSON representation of the document'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    AllDocumentRepresentationResult:
      type: object
      properties:
        document_representations:
          type: array
          description: List of document_representations
          items:
            $ref: '#/components/schemas/DocumentRepresentationResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateDocumentRepresentationRequest:
      required:
      - contentType
      - fileSize
      - filename
      - type
      type: object
      properties:
        retentionTime:
          type: string
          description: retention time of content
          format: date-time
        main:
          type: boolean
          description: whether this is the main representation of a document
        type:
          type: string
          description: type of the document representation
          example: legal_xml
        fileSize:
          type: integer
          description: size of file in bytes
          format: int32
        filename:
          type: string
          description: filename of the document representation
          example: legal_xml.xml
        contentType:
          type: string
          description: content_type of the document representation
          example: application/xml
        md5Hash:
          type: string
          description: md5 hash of content
          example: 938c2cc0dcc05f2b68c4287040cfcf71
        original:
          type: boolean
          description: 'True: The representation was originally uploaded by the client
            or received from a connector;False: The representation was generated based
            on the JSON representation of the document'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    ConnectionData:
      type: object
      properties:
        displayName:
          type: string
          description: display name of supplier/customer
        id:
          type: string
          description: id of supplier/customer
          format: uuid
    DocumentResult:
      required:
      - category
      - status
      type: object
      properties:
        id:
          type: string
          description: id of document
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        description:
          type: string
          description: description of document
        source:
          type: string
          description: source of document
        folder:
          $ref: '#/components/schemas/Folder'
        supplier:
          $ref: '#/components/schemas/ConnectionData'
        customer:
          $ref: '#/components/schemas/ConnectionData'
        status:
          $ref: '#/components/schemas/JsonBMap'
        category:
          type: string
          description: 'Document category, current known values are :  PURCHASE_ORDER,
            ORDER_CONFIRMATION, DELIVERY_NOTE, GOODS_RECEIVED_NOTE, PROFORMA_INVOICE,
            INVOICE, INVOICE_REMINDER, CREDIT_NOTE, RECEIPT, STATEMENT, FILE, QUOTE,
            CREDIT_CARD_STATEMENT, THIRD_PARTY_STATEMENT, SELF_BILLED_INVOICE, SELF_BILLED_CREDIT_NOTE,
            OTHER. Future releases might contain additional new values.'
          example: INVOICE
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        tags:
          type: array
          description: tags
          items:
            type: string
            description: tags
        tasks:
          type: array
          description: tasks
          items:
            $ref: '#/components/schemas/TaskResult'
        retentionTime:
          type: string
          description: datetime of document expiry
          format: date-time
        lines:
          type: array
          description: List of line items
          items:
            $ref: '#/components/schemas/LineItemResult'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    Folder:
      type: string
      description: Document folder
      example: PURCHASES
      enum:
      - AP
      - AR
      - PURCHASES
      - SALES
      - DRAFTS
      - INBOX
      - STATEMENTS
      - FILES
    LineItemResult:
      type: object
      properties:
        id:
          type: string
          description: Line item id
          format: uuid
        sequence:
          type: integer
          description: Sequence
          format: int32
          example: 1
        identifier:
          type: string
          description: Identifier
          example: identifier 1
        description:
          type: string
          description: Description
          example: line item 1
        itemId:
          type: string
          description: Company’s local product code
          example: item1
        itemCategory:
          type: string
          description: Item category
          example: category
        productIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        quantity:
          type: integer
          description: Quantity
          format: int32
          example: 2
        unit:
          type: string
          description: Unit
          example: PCS
        startDate:
          type: string
          description: Start date
          format: date
          example: 2024-01-23
        endDate:
          type: string
          description: End date
          format: date
          example: 2024-06-23
        discounts:
          $ref: '#/components/schemas/JsonBMap'
        charges:
          $ref: '#/components/schemas/JsonBMap'
        unitPrice:
          type: string
          description: Unit price
          example: '40.278192'
        netAmount:
          type: string
          description: Net amount
          example: '80.56'
        grossAmount:
          type: string
          description: Gross amount
          example: '96.67'
        vatAmount:
          type: string
          description: VAT amount
          example: '16.11'
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        vatRate:
          type: string
          description: VAT rate
          example: '0.2'
        vatCode:
          type: string
          description: VAT code
          example: VAT
    TaskResult:
      type: object
      properties:
        extensionName:
          type: string
          description: extension name
          example: com.unifiedpost.btx.data:approve
        status:
          type: string
          description: extension status
          example: approve
        context:
          $ref: '#/components/schemas/JsonBMap'
      description: tasks
    DocumentCategory:
      type: string
      description: Document category
      example: PURCHASE_ORDER
      enum:
      - PURCHASE_ORDER
      - ORDER_CONFIRMATION
      - DELIVERY_NOTE
      - GOODS_RECEIVED_NOTE
      - PROFORMA_INVOICE
      - INVOICE
      - INVOICE_REMINDER
      - CREDIT_NOTE
      - RECEIPT
      - STATEMENT
      - FILE
      - QUOTE
      - CREDIT_CARD_STATEMENT
      - THIRD_PARTY_STATEMENT
      - SELF_BILLED_INVOICE
      - SELF_BILLED_CREDIT_NOTE
      - OTHER
    DocumentRequest:
      required:
      - category
      - status
      type: object
      properties:
        waitForComplete:
          type: boolean
          description: Whether the document needs to wait for call to /complete endpoint,
            after representations have been uploaded
          example: true
        description:
          type: string
          description: Description of the document.
          example: This is the invoice for your new phone
        source:
          type: string
          description: Source of the document.
          example: choruspro
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        tags:
          type: array
          description: Document tags
          example:
          - expensive
          items:
            type: string
            description: Document tags
            example: '["expensive"]'
        retentionTime:
          type: string
          description: Expiry datetime for the document
        supplier:
          type: string
          description: Supplier of the document to be saved as document connection.
            Must exist and should have type supplier.
          format: uuid
          example: 4c32d3fb-0023-470c-ae21-105274a94706
        customer:
          type: string
          description: Customer of the document to be saved as document connection.
            Must exist and should have type customer.
          format: uuid
          example: 53bb63a9-9525-4f07-b29c-cdfb0c2905fd
        status:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/DocumentCategory'
        lines:
          type: array
          description: List of line items
          nullable: true
          items:
            $ref: '#/components/schemas/LineItemRequest'
    LineItemRequest:
      type: object
      properties:
        identifier:
          type: string
          description: Identifier
          example: identifier 1
        description:
          type: string
          description: Description
          example: line item 1
        itemId:
          type: string
          description: Company’s local product code
          example: item1
        itemCategory:
          type: string
          description: Item category
          example: category
        productIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        quantity:
          type: integer
          description: Quantity
          format: int32
          example: 2
        unit:
          type: string
          description: Unit
          example: PCS
        startDate:
          type: string
          description: Start Date
          format: date
          example: 2024-01-23
        endDate:
          type: string
          description: End date
          format: date
          example: 2024-06-23
        discounts:
          $ref: '#/components/schemas/JsonBMap'
        charges:
          $ref: '#/components/schemas/JsonBMap'
        unitPrice:
          type: string
          description: Unit price
          example: '40.278192'
        netAmount:
          type: string
          description: Net amount
          example: '80.56'
        grossAmount:
          type: string
          description: Gross amount
          example: '96.67'
        vatAmount:
          type: string
          description: VAT amount
          example: '16.11'
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        vatRate:
          type: string
          description: VAT rate
          example: '0.2'
        vatCode:
          type: string
          description: VAT code
          example: VAT
    AllDocumentResult:
      type: object
      properties:
        documents:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/DocumentResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    AllStatusCountResult:
      required:
      - counts
      type: object
      properties:
        counts:
          type: array
          description: result of all status counts
          items:
            $ref: '#/components/schemas/StatusCountResult'
    StatusCountResult:
      required:
      - count
      - statuses
      type: object
      properties:
        statuses:
          type: array
          description: list of document statuses
          example:
          - accept:UNACCEPTED
          - pay:FULLY_PAID
          items:
            type: string
            description: list of document statuses
            example: '["accept:UNACCEPTED","pay:FULLY_PAID"]'
        count:
          type: integer
          description: count of documents having those statuses
          format: int64
          example: 5
      description: result of all status counts
    FileResult:
      type: object
      properties:
        id:
          type: string
          description: file identifier
          example: 00000003-0000-0000-0000-000000000000
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type
          example: user
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14T19:58:47Z
        status:
          $ref: '#/components/schemas/FileStatus'
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        uploadUrl:
          type: string
          description: upload URL
          example: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        parentFileId:
          type: string
          description: parent file id
          format: uuid
          example: b8536327-4c29-4280-9da2-aa190e8484b7
        children:
          type: array
          description: List of child files
          items:
            $ref: '#/components/schemas/FileResult'
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    FilesResult:
      type: object
      properties:
        files:
          type: array
          description: List of response files
          items:
            $ref: '#/components/schemas/FileResult'
    JsonPatch:
      type: object
    FileList:
      type: object
      properties:
        files:
          type: array
          description: List of file ids
          items:
            type: string
            description: List of file ids
    UpdateDocumentRequest:
      type: object
      properties:
        description:
          type: string
          description: Description of the document.
          example: This is the invoice for your new phone
        source:
          type: string
          description: Source of the document.
          example: choruspro
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        tags:
          type: array
          description: Document tags
          example:
          - expensive
          items:
            type: string
            description: Document tags
            example: '["expensive"]'
        retentionTime:
          type: string
          description: Expiry datetime for the document
        supplier:
          type: string
          description: Supplier of the document
          format: uuid
        customer:
          type: string
          description: Customer of the document
          format: uuid
        status:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/DocumentCategory'
    FileStatus:
      type: string
      description: File status
      example: PROCESSING
      enum:
      - AWAITING_UPLOAD
      - AWAITING_USER_ACTION
      - VIRUS_SCANNING
      - VIRUS_SCANNED
      - VIRUS_ERROR
      - PROCESSING
      - PROCESSED
      - REJECTED
      - ERROR
      - REPROCESSED
    FileRequest:
      required:
      - contentType
      - fileType
      - filename
      type: object
      properties:
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject. It is required if creator type is provided
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type. It is required if creator subject is provided
          example: user
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14T19:58:47Z
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        parentFileId:
          type: string
          description: parent file id
          format: uuid
          example: b8536327-4c29-4280-9da2-aa190e8484b7
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    AllFilesResult:
      type: object
      properties:
        files:
          type: array
          description: List of files
          items:
            $ref: '#/components/schemas/FileResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    FileSingleParams:
      type: object
      properties:
        hasDocuments:
          type: boolean
          description: Filter files which linked to document or not
          example: true
        creatorSubject:
          type: string
          description: Filter by subject who created the files
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: Return the files that have creator type
          example: user
        status:
          $ref: '#/components/schemas/FileStatus'
        fileType:
          type: string
          description: Return the files that have file type
          example: pdf
        filename:
          type: string
          description: Return files having the name partially matching the given filename
          example: Doc-file-1
        source:
          type: string
          description: Return files having the source field equal to the given search
            term
          example: com.unifiedpost.btx.connectors:peppol
        createdAt[eq]:
          type: string
          description: Created at equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        createdAt[ne]:
          type: string
          description: Created at not equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        createdAt[gt]:
          type: string
          description: Created at greater than, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        createdAt[gte]:
          type: string
          description: Created at greater than or equal, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        createdAt[lt]:
          type: string
          description: Created at less than, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        createdAt[lte]:
          type: string
          description: Created at less than or equal, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        parentFileId:
          type: string
          description: Filter by parent file ID. If null, top-level files are returned.
          format: uuid
          example: b8536327-4c29-4280-9da2-aa190e8484b7
        include:
          type: string
          description: What extra data to include in the response.
          example: children
    ANTLRErrorListener:
      type: object
    ATN:
      type: object
      properties:
        states:
          type: array
          items:
            $ref: '#/components/schemas/ATNState'
        decisionToState:
          type: array
          items:
            $ref: '#/components/schemas/DecisionState'
        ruleToStartState:
          type: array
          items:
            $ref: '#/components/schemas/RuleStartState'
        ruleToStopState:
          type: array
          items:
            $ref: '#/components/schemas/RuleStopState'
        modeNameToStartState:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TokensStartState'
        grammarType:
          type: string
          enum:
          - LEXER
          - PARSER
        maxTokenType:
          type: integer
          format: int32
        ruleToTokenType:
          type: array
          items:
            type: integer
            format: int32
        lexerActions:
          type: array
          items:
            $ref: '#/components/schemas/LexerAction'
        modeToStartState:
          type: array
          items:
            $ref: '#/components/schemas/TokensStartState'
        numberOfDecisions:
          type: integer
          format: int32
    ATNConfig:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ATNState'
        alt:
          type: integer
          format: int32
        context:
          $ref: '#/components/schemas/PredictionContext'
        reachesIntoOuterContext:
          type: integer
          format: int32
        semanticContext:
          $ref: '#/components/schemas/SemanticContext'
        outerContextDepth:
          type: integer
          format: int32
        precedenceFilterSuppressed:
          type: boolean
    ATNConfigSet:
      uniqueItems: true
      type: array
      properties:
        readonly:
          type: boolean
        configLookup:
          type: array
          properties:
            empty:
              type: boolean
          items:
            $ref: '#/components/schemas/ATNConfig'
        configs:
          type: array
          items:
            $ref: '#/components/schemas/ATNConfig'
        uniqueAlt:
          type: integer
          format: int32
        hasSemanticContext:
          type: boolean
        dipsIntoOuterContext:
          type: boolean
        fullCtx:
          type: boolean
        empty:
          type: boolean
        states:
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/ATNState'
        alts:
          type: object
          properties:
            empty:
              type: boolean
        predicates:
          type: array
          items:
            $ref: '#/components/schemas/SemanticContext'
      items:
        $ref: '#/components/schemas/ATNConfig'
    ATNState:
      type: object
      properties:
        atn:
          $ref: '#/components/schemas/ATN'
        stateNumber:
          type: integer
          format: int32
        ruleIndex:
          type: integer
          format: int32
        epsilonOnlyTransitions:
          type: boolean
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
        nextTokenWithinRule:
          $ref: '#/components/schemas/IntervalSet'
        stateType:
          type: integer
          format: int32
        nonGreedyExitState:
          type: boolean
        numberOfTransitions:
          type: integer
          format: int32
    AbstractConfigHashSet:
      type: array
      properties:
        empty:
          type: boolean
      items:
        $ref: '#/components/schemas/ATNConfig'
    AmbiguityInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        configs:
          uniqueItems: true
          type: array
          properties:
            readonly:
              type: boolean
            configLookup:
              type: array
              properties:
                empty:
                  type: boolean
              items:
                $ref: '#/components/schemas/ATNConfig'
            configs:
              type: array
              items:
                $ref: '#/components/schemas/ATNConfig'
            uniqueAlt:
              type: integer
              format: int32
            hasSemanticContext:
              type: boolean
            dipsIntoOuterContext:
              type: boolean
            fullCtx:
              type: boolean
            empty:
              type: boolean
            states:
              uniqueItems: true
              type: array
              items:
                $ref: '#/components/schemas/ATNState'
            alts:
              type: object
              properties:
                empty:
                  type: boolean
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/SemanticContext'
          items:
            $ref: '#/components/schemas/ATNConfig'
        input:
          $ref: '#/components/schemas/TokenStream'
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        fullCtx:
          type: boolean
        ambigAlts:
          type: object
          properties:
            empty:
              type: boolean
    CharStream:
      type: object
      properties:
        sourceName:
          type: string
    ContextSensitivityInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        configs:
          uniqueItems: true
          type: array
          properties:
            readonly:
              type: boolean
            configLookup:
              type: array
              properties:
                empty:
                  type: boolean
              items:
                $ref: '#/components/schemas/ATNConfig'
            configs:
              type: array
              items:
                $ref: '#/components/schemas/ATNConfig'
            uniqueAlt:
              type: integer
              format: int32
            hasSemanticContext:
              type: boolean
            dipsIntoOuterContext:
              type: boolean
            fullCtx:
              type: boolean
            empty:
              type: boolean
            states:
              uniqueItems: true
              type: array
              items:
                $ref: '#/components/schemas/ATNState'
            alts:
              type: object
              properties:
                empty:
                  type: boolean
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/SemanticContext'
          items:
            $ref: '#/components/schemas/ATNConfig'
        input:
          $ref: '#/components/schemas/TokenStream'
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        fullCtx:
          type: boolean
    DecisionInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        invocations:
          type: integer
          format: int64
        timeInPrediction:
          type: integer
          format: int64
        SLL_TotalLook:
          type: integer
          format: int64
        SLL_MinLook:
          type: integer
          format: int64
        SLL_MaxLook:
          type: integer
          format: int64
        SLL_MaxLookEvent:
          $ref: '#/components/schemas/LookaheadEventInfo'
        LL_TotalLook:
          type: integer
          format: int64
        LL_MinLook:
          type: integer
          format: int64
        LL_MaxLook:
          type: integer
          format: int64
        LL_MaxLookEvent:
          $ref: '#/components/schemas/LookaheadEventInfo'
        contextSensitivities:
          type: array
          items:
            $ref: '#/components/schemas/ContextSensitivityInfo'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorInfo'
        ambiguities:
          type: array
          items:
            $ref: '#/components/schemas/AmbiguityInfo'
        predicateEvals:
          type: array
          items:
            $ref: '#/components/schemas/PredicateEvalInfo'
        SLL_ATNTransitions:
          type: integer
          format: int64
        SLL_DFATransitions:
          type: integer
          format: int64
        LL_Fallback:
          type: integer
          format: int64
        LL_ATNTransitions:
          type: integer
          format: int64
        LL_DFATransitions:
          type: integer
          format: int64
    DecisionState:
      type: object
      properties:
        atn:
          $ref: '#/components/schemas/ATN'
        stateNumber:
          type: integer
          format: int32
        ruleIndex:
          type: integer
          format: int32
        epsilonOnlyTransitions:
          type: boolean
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
        nextTokenWithinRule:
          $ref: '#/components/schemas/IntervalSet'
        decision:
          type: integer
          format: int32
        nonGreedy:
          type: boolean
        stateType:
          type: integer
          format: int32
        nonGreedyExitState:
          type: boolean
        numberOfTransitions:
          type: integer
          format: int32
    ErrorInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        configs:
          uniqueItems: true
          type: array
          properties:
            readonly:
              type: boolean
            configLookup:
              type: array
              properties:
                empty:
                  type: boolean
              items:
                $ref: '#/components/schemas/ATNConfig'
            configs:
              type: array
              items:
                $ref: '#/components/schemas/ATNConfig'
            uniqueAlt:
              type: integer
              format: int32
            hasSemanticContext:
              type: boolean
            dipsIntoOuterContext:
              type: boolean
            fullCtx:
              type: boolean
            empty:
              type: boolean
            states:
              uniqueItems: true
              type: array
              items:
                $ref: '#/components/schemas/ATNState'
            alts:
              type: object
              properties:
                empty:
                  type: boolean
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/SemanticContext'
          items:
            $ref: '#/components/schemas/ATNConfig'
        input:
          $ref: '#/components/schemas/TokenStream'
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        fullCtx:
          type: boolean
    IntStream:
      type: object
      properties:
        sourceName:
          type: string
    Interval:
      type: object
      properties:
        a:
          type: integer
          format: int32
        b:
          type: integer
          format: int32
    IntervalSet:
      type: object
      properties:
        intervals:
          type: array
          items:
            $ref: '#/components/schemas/Interval'
        readonly:
          type: boolean
        nil:
          type: boolean
        maxElement:
          type: integer
          format: int32
        minElement:
          type: integer
          format: int32
    LexerAction:
      type: object
      properties:
        actionType:
          type: string
          enum:
          - CHANNEL
          - CUSTOM
          - MODE
          - MORE
          - POP_MODE
          - PUSH_MODE
          - SKIP
          - TYPE
        positionDependent:
          type: boolean
    LookaheadEventInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        configs:
          uniqueItems: true
          type: array
          properties:
            readonly:
              type: boolean
            configLookup:
              type: array
              properties:
                empty:
                  type: boolean
              items:
                $ref: '#/components/schemas/ATNConfig'
            configs:
              type: array
              items:
                $ref: '#/components/schemas/ATNConfig'
            uniqueAlt:
              type: integer
              format: int32
            hasSemanticContext:
              type: boolean
            dipsIntoOuterContext:
              type: boolean
            fullCtx:
              type: boolean
            empty:
              type: boolean
            states:
              uniqueItems: true
              type: array
              items:
                $ref: '#/components/schemas/ATNState'
            alts:
              type: object
              properties:
                empty:
                  type: boolean
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/SemanticContext'
          items:
            $ref: '#/components/schemas/ATNConfig'
        input:
          $ref: '#/components/schemas/TokenStream'
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        fullCtx:
          type: boolean
        predictedAlt:
          type: integer
          format: int32
    ParseInfo:
      type: object
      properties:
        totalTimeInPrediction:
          type: integer
          format: int64
        totalSLLLookaheadOps:
          type: integer
          format: int64
        totalLLLookaheadOps:
          type: integer
          format: int64
        totalSLLATNLookaheadOps:
          type: integer
          format: int64
        totalLLATNLookaheadOps:
          type: integer
          format: int64
        totalATNLookaheadOps:
          type: integer
          format: int64
        decisionInfo:
          type: array
          items:
            $ref: '#/components/schemas/DecisionInfo'
        lldecisions:
          type: array
          items:
            type: integer
            format: int32
        dfasize:
          type: integer
          format: int32
    ParseTree:
      type: object
      properties:
        parent:
          $ref: '#/components/schemas/ParseTree'
        text:
          type: string
        sourceInterval:
          $ref: '#/components/schemas/Interval'
        payload:
          type: object
        childCount:
          type: integer
          format: int32
    ParserRuleContext:
      type: object
      properties:
        parent:
          $ref: '#/components/schemas/ParserRuleContext'
        invokingState:
          type: integer
          format: int32
        children:
          type: array
          items:
            $ref: '#/components/schemas/ParseTree'
        start:
          $ref: '#/components/schemas/Token'
        stop:
          $ref: '#/components/schemas/Token'
        exception:
          $ref: '#/components/schemas/RecognitionException'
        childCount:
          type: integer
          format: int32
        sourceInterval:
          $ref: '#/components/schemas/Interval'
        empty:
          type: boolean
        payload:
          $ref: '#/components/schemas/RuleContext'
        text:
          type: string
        ruleContext:
          $ref: '#/components/schemas/RuleContext'
        ruleIndex:
          type: integer
          format: int32
        altNumber:
          type: integer
          format: int32
    PredicateEvalInfo:
      type: object
      properties:
        decision:
          type: integer
          format: int32
        configs:
          uniqueItems: true
          type: array
          properties:
            readonly:
              type: boolean
            configLookup:
              type: array
              properties:
                empty:
                  type: boolean
              items:
                $ref: '#/components/schemas/ATNConfig'
            configs:
              type: array
              items:
                $ref: '#/components/schemas/ATNConfig'
            uniqueAlt:
              type: integer
              format: int32
            hasSemanticContext:
              type: boolean
            dipsIntoOuterContext:
              type: boolean
            fullCtx:
              type: boolean
            empty:
              type: boolean
            states:
              uniqueItems: true
              type: array
              items:
                $ref: '#/components/schemas/ATNState'
            alts:
              type: object
              properties:
                empty:
                  type: boolean
            predicates:
              type: array
              items:
                $ref: '#/components/schemas/SemanticContext'
          items:
            $ref: '#/components/schemas/ATNConfig'
        input:
          $ref: '#/components/schemas/TokenStream'
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        fullCtx:
          type: boolean
        semctx:
          $ref: '#/components/schemas/SemanticContext'
        predictedAlt:
          type: integer
          format: int32
        evalResult:
          type: boolean
    PredictionContext:
      type: object
      properties:
        id:
          type: integer
          format: int32
        cachedHashCode:
          type: integer
          format: int32
        empty:
          type: boolean
    QueryContext:
      type: object
      properties:
        parent:
          $ref: '#/components/schemas/ParserRuleContext'
        invokingState:
          type: integer
          format: int32
        children:
          type: array
          items:
            $ref: '#/components/schemas/ParseTree'
        start:
          $ref: '#/components/schemas/Token'
        stop:
          $ref: '#/components/schemas/Token'
        exception:
          $ref: '#/components/schemas/RecognitionException'
        ruleIndex:
          type: integer
          format: int32
        childCount:
          type: integer
          format: int32
        sourceInterval:
          $ref: '#/components/schemas/Interval'
        empty:
          type: boolean
        payload:
          $ref: '#/components/schemas/RuleContext'
        text:
          type: string
        ruleContext:
          $ref: '#/components/schemas/RuleContext'
        altNumber:
          type: integer
          format: int32
    RecognitionException:
      type: object
      properties:
        cause:
          type: object
          properties:
            stackTrace:
              type: array
              items:
                type: object
                properties:
                  classLoaderName:
                    type: string
                  moduleName:
                    type: string
                  moduleVersion:
                    type: string
                  methodName:
                    type: string
                  fileName:
                    type: string
                  lineNumber:
                    type: integer
                    format: int32
                  className:
                    type: string
                  nativeMethod:
                    type: boolean
            message:
              type: string
            suppressed:
              type: array
              items:
                type: object
                properties:
                  stackTrace:
                    type: array
                    items:
                      type: object
                      properties:
                        classLoaderName:
                          type: string
                        moduleName:
                          type: string
                        moduleVersion:
                          type: string
                        methodName:
                          type: string
                        fileName:
                          type: string
                        lineNumber:
                          type: integer
                          format: int32
                        className:
                          type: string
                        nativeMethod:
                          type: boolean
                  message:
                    type: string
                  localizedMessage:
                    type: string
            localizedMessage:
              type: string
        stackTrace:
          type: array
          items:
            type: object
            properties:
              classLoaderName:
                type: string
              moduleName:
                type: string
              moduleVersion:
                type: string
              methodName:
                type: string
              fileName:
                type: string
              lineNumber:
                type: integer
                format: int32
              className:
                type: string
              nativeMethod:
                type: boolean
        recognizer:
          $ref: '#/components/schemas/RecognizerObjectObject'
        ctx:
          $ref: '#/components/schemas/RuleContext'
        offendingToken:
          $ref: '#/components/schemas/Token'
        offendingState:
          type: integer
          format: int32
        inputStream:
          $ref: '#/components/schemas/IntStream'
        expectedTokens:
          $ref: '#/components/schemas/IntervalSet'
        message:
          type: string
        suppressed:
          type: array
          items:
            type: object
            properties:
              stackTrace:
                type: array
                items:
                  type: object
                  properties:
                    classLoaderName:
                      type: string
                    moduleName:
                      type: string
                    moduleVersion:
                      type: string
                    methodName:
                      type: string
                    fileName:
                      type: string
                    lineNumber:
                      type: integer
                      format: int32
                    className:
                      type: string
                    nativeMethod:
                      type: boolean
              message:
                type: string
              localizedMessage:
                type: string
        localizedMessage:
          type: string
    RecognizerObjectObject:
      type: object
      properties:
        state:
          type: integer
          format: int32
        inputStream:
          $ref: '#/components/schemas/IntStream'
        errorListenerDispatch:
          $ref: '#/components/schemas/ANTLRErrorListener'
        interpreter:
          type: object
        tokenTypeMap:
          type: object
          additionalProperties:
            type: integer
            format: int32
        errorListeners:
          type: array
          items:
            $ref: '#/components/schemas/ANTLRErrorListener'
        tokenNames:
          type: array
          items:
            type: string
        vocabulary:
          $ref: '#/components/schemas/Vocabulary'
        grammarFileName:
          type: string
        serializedATN:
          type: string
        atn:
          $ref: '#/components/schemas/ATN'
        tokenFactory:
          $ref: '#/components/schemas/TokenFactoryObject'
        parseInfo:
          $ref: '#/components/schemas/ParseInfo'
        ruleIndexMap:
          type: object
          additionalProperties:
            type: integer
            format: int32
        ruleNames:
          type: array
          items:
            type: string
    RuleContext:
      type: object
      properties:
        parent:
          $ref: '#/components/schemas/RuleContext'
        invokingState:
          type: integer
          format: int32
        empty:
          type: boolean
        payload:
          $ref: '#/components/schemas/RuleContext'
        text:
          type: string
        childCount:
          type: integer
          format: int32
        ruleContext:
          $ref: '#/components/schemas/RuleContext'
        ruleIndex:
          type: integer
          format: int32
        sourceInterval:
          $ref: '#/components/schemas/Interval'
        altNumber:
          type: integer
          format: int32
    RuleStartState:
      type: object
      properties:
        atn:
          $ref: '#/components/schemas/ATN'
        stateNumber:
          type: integer
          format: int32
        ruleIndex:
          type: integer
          format: int32
        epsilonOnlyTransitions:
          type: boolean
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
        nextTokenWithinRule:
          $ref: '#/components/schemas/IntervalSet'
        stopState:
          $ref: '#/components/schemas/RuleStopState'
        isLeftRecursiveRule:
          type: boolean
        stateType:
          type: integer
          format: int32
        nonGreedyExitState:
          type: boolean
        numberOfTransitions:
          type: integer
          format: int32
    RuleStopState:
      type: object
      properties:
        atn:
          $ref: '#/components/schemas/ATN'
        stateNumber:
          type: integer
          format: int32
        ruleIndex:
          type: integer
          format: int32
        epsilonOnlyTransitions:
          type: boolean
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
        nextTokenWithinRule:
          $ref: '#/components/schemas/IntervalSet'
        stateType:
          type: integer
          format: int32
        nonGreedyExitState:
          type: boolean
        numberOfTransitions:
          type: integer
          format: int32
    SemanticContext:
      type: object
    Token:
      type: object
      properties:
        type:
          type: integer
          format: int32
        inputStream:
          $ref: '#/components/schemas/CharStream'
        channel:
          type: integer
          format: int32
        text:
          type: string
        charPositionInLine:
          type: integer
          format: int32
        startIndex:
          type: integer
          format: int32
        stopIndex:
          type: integer
          format: int32
        tokenSource:
          $ref: '#/components/schemas/TokenSource'
        tokenIndex:
          type: integer
          format: int32
        line:
          type: integer
          format: int32
    TokenFactoryObject:
      type: object
    TokenSource:
      type: object
      properties:
        inputStream:
          $ref: '#/components/schemas/CharStream'
        charPositionInLine:
          type: integer
          format: int32
        tokenFactory:
          $ref: '#/components/schemas/TokenFactoryObject'
        sourceName:
          type: string
        line:
          type: integer
          format: int32
    TokenStream:
      type: object
      properties:
        text:
          type: string
        tokenSource:
          $ref: '#/components/schemas/TokenSource'
        sourceName:
          type: string
    TokensStartState:
      type: object
      properties:
        atn:
          $ref: '#/components/schemas/ATN'
        stateNumber:
          type: integer
          format: int32
        ruleIndex:
          type: integer
          format: int32
        epsilonOnlyTransitions:
          type: boolean
        transitions:
          type: array
          items:
            $ref: '#/components/schemas/Transition'
        nextTokenWithinRule:
          $ref: '#/components/schemas/IntervalSet'
        decision:
          type: integer
          format: int32
        nonGreedy:
          type: boolean
        stateType:
          type: integer
          format: int32
        nonGreedyExitState:
          type: boolean
        numberOfTransitions:
          type: integer
          format: int32
    Transition:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/ATNState'
        serializationType:
          type: integer
          format: int32
        epsilon:
          type: boolean
    Vocabulary:
      type: object
      properties:
        maxTokenType:
          type: integer
          format: int32
    LinkedDocumentResult:
      type: object
      properties:
        id:
          type: string
          description: Id of document
          format: uuid
        description:
          type: string
          description: Description of document
    ListLinkedDocumentsResult:
      type: object
      properties:
        documents:
          type: array
          description: List of documents
          items:
            $ref: '#/components/schemas/LinkedDocumentResult'
    DocumentList:
      type: object
      properties:
        documents:
          type: array
          description: List of document ids
          items:
            type: string
            description: List of document ids
    UpdateFileRequest:
      type: object
      properties:
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type
          example: user
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14T19:58:47Z
        status:
          $ref: '#/components/schemas/FileStatus'
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        parentFileId:
          type: string
          description: parent file id
          format: uuid
          example: b8536327-4c29-4280-9da2-aa190e8484b7
    LineItemListResult:
      type: object
      properties:
        lines:
          type: array
          description: List of line items
          items:
            $ref: '#/components/schemas/LineItemResult'
    LineItemListRequest:
      type: object
      properties:
        lines:
          type: array
          description: List of line items
          items:
            $ref: '#/components/schemas/LineItemResult'
    AllLineItemsResult:
      type: object
      properties:
        lines:
          type: array
          description: List of line items
          items:
            $ref: '#/components/schemas/LineItemResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateLineItemRequest:
      type: object
      properties:
        identifier:
          type: string
          description: Identifier
          example: identifier 1
        description:
          type: string
          description: Description
          example: line item 1
        itemId:
          type: string
          description: Company’s local product code
          example: item1
        itemCategory:
          type: string
          description: Item category
          example: category
        productIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        quantity:
          type: integer
          description: Quantity
          format: int32
          example: 2
        unit:
          type: string
          description: Unit
          example: PCS
        startDate:
          type: string
          description: Start date
          format: date
        endDate:
          type: string
          description: End date
          format: date
          example: 2024-06-23
        discounts:
          $ref: '#/components/schemas/JsonBMap'
        charges:
          $ref: '#/components/schemas/JsonBMap'
        unitPrice:
          type: string
          description: Unit price
          example: '40.278192'
        netAmount:
          type: string
          description: Net amount
          example: '80.56'
        grossAmount:
          type: string
          description: Gross amount
          example: '96.67'
        vatAmount:
          type: string
          description: VAT amount
          example: '16.11'
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        vatRate:
          type: string
          description: VAT rate
          example: '0.2'
        vatCode:
          type: string
          description: VAT code
          example: VAT
    TaskRequest:
      type: object
      properties:
        extensionName:
          type: string
          description: Extension name,max 255 characters
          example: com.unifiedpost.btx.data:approve
        context:
          $ref: '#/components/schemas/JsonBMap'
    AllTaskResult:
      type: object
      properties:
        tasks:
          type: array
          description: List of tasks
          items:
            $ref: '#/components/schemas/TaskResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateTaskRequest:
      type: object
      properties:
        status:
          type: string
          description: Extension status
          example: in progress
    CreateDocumentRelationsResult:
      type: object
      properties:
        success:
          type: array
          description: List of successfully linked document ids
          items:
            type: string
            description: Document id
            format: uuid
        failure:
          type: array
          description: List of document ids that failed to link
          items:
            type: string
            description: Document id
            format: uuid
    CreateDocumentRelationsRequest:
      type: object
      properties:
        parents:
          type: array
          description: List of parent ids
          items:
            type: string
            description: Parent document id
            format: uuid
        children:
          type: array
          description: List of child ids
          items:
            type: string
            description: Child document id
            format: uuid
    AllDocumentRelationsResult:
      type: object
      properties:
        documentRelations:
          $ref: '#/components/schemas/DocumentRelationsResult'
    DocumentRelationResult:
      type: object
      properties:
        id:
          type: string
          description: Payment account ID
          format: uuid
        document:
          $ref: '#/components/schemas/RelatedDocumentResult'
    DocumentRelationsResult:
      type: object
      properties:
        parents:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/DocumentRelationResult'
        children:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/DocumentRelationResult'
      description: Document relations
    RelatedDocumentResult:
      required:
      - category
      type: object
      properties:
        id:
          type: string
          description: Document ID
          format: uuid
        description:
          type: string
          description: Document description
          example: Sample invoice 1
        folder:
          $ref: '#/components/schemas/Folder'
        category:
          $ref: '#/components/schemas/DocumentCategory'
        documentNumber:
          type: string
          description: Document number from document metadata
          example: INV-001
    AggregationStatus:
      type: string
      description: Status determined by aggregation
      example: AUTO_CONFIRMED
      enum:
      - PROPOSED
      - AUTO_CONFIRMED
      - USER_CONFIRMED
      - REJECTED
    AmountDto:
      type: object
      properties:
        value:
          type: string
          description: Amount value with a maximum of 14 integer digits and 2 fractional
            digits
          example: '10.05'
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code of the currency used
          example: EUR
    BalanceOffsetPayableType:
      type: string
      description: Discriminator to determine the payable type.
      example: document
      enum:
      - document
      - note
      - payment
    BalanceOffsetResult:
      required:
      - aggregationStatus
      - offsetType
      - paymentId
      type: object
      properties:
        payableType:
          $ref: '#/components/schemas/BalanceOffsetPayableType'
        id:
          type: string
          description: id of balance offset
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        paymentId:
          type: string
          description: Payment id
          format: uuid
        amount:
          $ref: '#/components/schemas/AmountDto'
        offsetType:
          $ref: '#/components/schemas/BalanceOffsetType'
        aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        metadata:
          $ref: '#/components/schemas/JsonBMap'
      description: Balance offsets
      discriminator:
        propertyName: payableType
        mapping:
          document: '#/components/schemas/DocumentBalanceOffsetResult'
          note: '#/components/schemas/NoteBalanceOffsetResult'
          payment: '#/components/schemas/PaymentBalanceOffsetResult'
    BalanceOffsetType:
      type: string
      description: Type of balance offset
      example: PARTIAL
      enum:
      - FULL
      - PARTIAL
      - DISCOUNT
      - REFUND
      - TIP
      - UNDERPAYMENT
      - OVERPAYMENT
      - FEE
    DocumentBalanceOffsetResult:
      required:
      - aggregationStatus
      - documentId
      - offsetType
      - paymentId
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetResult'
      - type: object
        properties:
          documentId:
            type: string
            description: Document id
            format: uuid
    NoteBalanceOffsetResult:
      required:
      - aggregationStatus
      - offsetType
      - paymentId
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetResult'
      - type: object
        properties:
          comment:
            type: string
            description: Comment on the note balance offset.
    PaymentBalanceOffsetResult:
      required:
      - aggregationStatus
      - counterpartyPaymentId
      - offsetType
      - paymentId
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetResult'
      - type: object
        properties:
          counterpartyPaymentId:
            type: string
            description: Counterparty payment id
            format: uuid
    BalanceOffsetRequest:
      required:
      - aggregationStatus
      - offsetType
      - payableType
      type: object
      properties:
        payableType:
          $ref: '#/components/schemas/BalanceOffsetPayableType'
        paymentId:
          type: string
          description: Payment id associated to the balance offset.
          format: uuid
        amount:
          $ref: '#/components/schemas/AmountDto'
        offsetType:
          $ref: '#/components/schemas/BalanceOffsetType'
        aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: payableType
        mapping:
          document: '#/components/schemas/DocumentBalanceOffsetRequest'
          note: '#/components/schemas/NoteBalanceOffsetRequest'
          payment: '#/components/schemas/PaymentBalanceOffsetRequest'
    DocumentBalanceOffsetRequest:
      required:
      - aggregationStatus
      - documentId
      - offsetType
      - payableType
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetRequest'
      - type: object
        properties:
          documentId:
            type: string
            description: Document id associated to the balance offset.
            format: uuid
    NoteBalanceOffsetRequest:
      required:
      - aggregationStatus
      - comment
      - offsetType
      - payableType
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetRequest'
      - type: object
        properties:
          comment:
            type: string
            description: Comment on the note balance offset.
    PaymentBalanceOffsetRequest:
      required:
      - aggregationStatus
      - counterpartyPaymentId
      - offsetType
      - payableType
      type: object
      allOf:
      - $ref: '#/components/schemas/BalanceOffsetRequest'
      - type: object
        properties:
          counterpartyPaymentId:
            type: string
            description: Counterparty payment id associated to the balance offset.
            format: uuid
    DocumentBalanceOffsetResultList:
      required:
      - balanceOffsets
      type: object
      properties:
        balanceOffsets:
          type: array
          description: balanceOffsets of given document
          items:
            $ref: '#/components/schemas/DocumentBalanceOffsetWithPaymentDetailsResult'
    DocumentBalanceOffsetWithPaymentDetailsResult:
      type: object
      properties:
        id:
          type: string
          description: id of balance offset
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        amount:
          $ref: '#/components/schemas/AmountDto'
        offsetType:
          $ref: '#/components/schemas/BalanceOffsetType'
        aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        documentId:
          type: string
          description: Document id
          format: uuid
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        payment:
          $ref: '#/components/schemas/PaymentDetails'
      description: balanceOffsets of given document
    LevelOfCertainty:
      type: string
      description: Level of certainty
      nullable: true
      example: INFORMATIONAL
      enum:
      - REQUESTED
      - INFORMATIONAL
      - INITIATED
      - AUTHORISED
      - TRANSACTION_SUCCESSFUL
      - PLANNED
      - RESERVED
      - BOOKED_REVERSIBLE
      - BOOKED_GUARANTEED
      - ABANDONED
      - NOT_APPLICABLE
    PaymentDetails:
      required:
      - status
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
      description: Children SINGLE payments in case current payment is of type BULK.
        For SINGLE payments, this will be null.
    UpdateBalanceOffsetRequest:
      required:
      - aggregationStatus
      - payableType
      type: object
      properties:
        aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        payableType:
          type: string
      discriminator:
        propertyName: payableType
        mapping:
          document: '#/components/schemas/UpdateDocumentBalanceOffsetRequest'
          note: '#/components/schemas/UpdateNoteBalanceOffsetRequest'
          payment: '#/components/schemas/UpdatePaymentBalanceOffsetRequest'
    UpdateDocumentBalanceOffsetRequest:
      required:
      - aggregationStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateBalanceOffsetRequest'
    UpdateNoteBalanceOffsetRequest:
      required:
      - aggregationStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateBalanceOffsetRequest'
      - type: object
        properties:
          comment:
            type: string
            description: Comment on the note balance offset.
    UpdatePaymentBalanceOffsetRequest:
      required:
      - aggregationStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateBalanceOffsetRequest'
    DocumentListBalanceOffsetRequest:
      type: object
      properties:
        documents:
          type: array
          description: List of document ids
          items:
            type: string
            description: Document id
            format: uuid
    AccountIdentifier:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
      description: Parent payment account
    BankIdentifier:
      type: object
      properties:
        identifier:
          type: string
          description: Bank Identifier
          example: PANXBEB1XXX
        scheme:
          type: string
          description: Bank Identifier Scheme
          example: BIC
          enum:
          - BIC
          - CODE
          - ABA
          - CLABE
          - THIRD_PARTY
      description: Information about the issuer of the account
    DocumentPaymentDetailsListItem:
      required:
      - status
      type: object
      properties:
        id:
          type: string
          description: id of document
          format: uuid
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        status:
          $ref: '#/components/schemas/JsonBMap'
        tasks:
          type: array
          description: tasks
          items:
            $ref: '#/components/schemas/TaskResult'
        supplier:
          $ref: '#/components/schemas/Supplier'
        category:
          $ref: '#/components/schemas/DocumentCategory'
    DocumentPaymentDetailsResultList:
      type: object
      properties:
        documents:
          type: array
          description: List of response document payment details
          items:
            $ref: '#/components/schemas/DocumentPaymentDetailsListItem'
    Iso20022StructuredAddress:
      type: object
      properties:
        country:
          type: string
          description: Nation with its own government, expressed as a two letter ISO
            3166 code (alpha-2) of the country. The country code is written in upper
            case.
          example: BE
        townName:
          type: string
          description: Name of a built-up area, with defined boundaries, and a local
            government.
          example: La Hulpe
        addressType:
          type: string
          description: Identifies the nature of the postal address.
          example: ADDR
          enum:
          - ADDR
          - PBOX
          - HOME
          - BIZZ
          - MLTO
          - DLVY
        streetName:
          maxLength: 140
          type: string
          description: Name of a street or thoroughfare.
          example: Avenue Reine Astrid
        buildingNumber:
          maxLength: 16
          type: string
          description: A unique number assigned to the building in the street or area
            //Number that identifies the position of a building on a street.
          example: '40'
        careOf:
          maxLength: 140
          type: string
          description: Identifies an addressee that is accepting the correspondence
            for the intended recipient. Using care of ensures the correspondence reaches
            the right recipient rather than getting returned to the sender.
          example: Finance
        department:
          maxLength: 70
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
        subDepartment:
          maxLength: 70
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
        buildingName:
          maxLength: 140
          type: string
          description: Name of the building or house.
          example: Empire State Building
        floor:
          maxLength: 70
          type: string
          description: Floor or storey within a building.
          example: ground
        unitNumber:
          maxLength: 16
          type: string
          description: Identifies a flat or dwelling within the building.
          example: '2'
        postBox:
          maxLength: 16
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1003'
        room:
          maxLength: 70
          type: string
          description: Building room number.
          example: '2.22'
        postCode:
          maxLength: 16
          type: string
          description: Identifier consisting of a group of letters and/or numbers
            that is added to a postal address to assist the sorting of mail.
          example: '1310'
        townLocationName:
          maxLength: 140
          type: string
          description: Specific location name within the town. eg Borough (USA), Village
            (GB).
          example: Miami Beach
        districtName:
          maxLength: 140
          type: string
          description: Identifies a subdivision within a country sub-division eg County
            (USA), Landkreis (DE).
          example: Miami-Dade, Coburg
        countrySubDivision:
          maxLength: 35
          type: string
          description: Identifies a subdivision of a country such as state (USA),
            Bundesland (DE), region, province,....
          example: Florida, Bayern, Wallonia, Hainaut
      description: Information that locates and identifies a specific address, as
        defined by postal services
      externalDocs:
        description: More about EPC Interbank Structured Address Structure; see also
          PostalAddress27 type in https://www.iso20022.org/message/22905/download
        url: 
          https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
    PaymentAccountListItem:
      type: object
      properties:
        id:
          type: string
          description: Payment account ID
          format: uuid
        identifier:
          type: string
          description: Identifier of the payment account
        scheme:
          type: string
          description: Scheme of the payment account
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        spaceId:
          type: string
          description: Space id
          format: uuid
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not.
        ownerName:
          type: string
          description: Name of owner.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform.
      description: The party initiating the transfer.
    Supplier:
      type: object
      properties:
        type:
          type: string
          description: Type of supplier (business/person).
          example: business
        id:
          type: string
          description: the supplier id
        name:
          type: string
          description: the supplier name
        paymentAccounts:
          type: array
          description: List of payment accounts
          items:
            $ref: '#/components/schemas/PaymentAccountListItem'
      description: Supplier of the document
    DocumentPaymentDetailsRequest:
      type: object
      properties:
        documents:
          type: array
          description: List of document IDs
          format: uuid
          items:
            type: string
            description: List of document IDs
            format: uuid
    Data:
      type: object
      properties:
        entityId:
          type: string
          description: The entity of the payment account
          format: uuid
          example: e5791e1e-9364-465a-8426-19ca9772acd1
        spaceId:
          type: string
          description: The space of the payment account
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
        paymentAccount:
          $ref: '#/components/schemas/PaymentAccountData'
    ExtensionCreatedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    ExtensionDeletedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    ExtensionUpdatedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    PartnerExtensionCreatedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    PartnerExtensionDeletedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    PartnerExtensionUpdatedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        valid:
          type: boolean
    PaymentAccountAssignedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        categoryValid:
          type: boolean
        typeValid:
          type: boolean
    PaymentAccountData:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        ownerName:
          type: string
          description: Name of the holder of this payment account.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account. Default value is false.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not. Default
            value is true.
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account.
        id:
          type: string
          description: The payment account id in Entity Store
          format: uuid
          example: 56079d21-a756-49fb-9286-9859c354aa69
    PaymentAccountUnassignedMessage:
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/Data'
        categoryValid:
          type: boolean
        typeValid:
          type: boolean
    FakeConnectionsRequest:
      type: object
      properties:
        spaceUuid:
          type: string
          description: The space which will be owner of generated connections
          format: uuid
        numberOfRecords:
          type: integer
          description: Number of connections to generate
          format: int32
    FakeDocumentsRequest:
      type: object
      properties:
        spaceUuid:
          type: string
          description: The space which will be owner of generated documents
          format: uuid
        numberOfDocs:
          type: integer
          description: Number of documents to generate
          format: int32
    BusinessConnectionDetailsResult:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetailsResult'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    BusinessConnectionType:
      type: string
      description: Business connection type
      nullable: true
      example: ENTERPRISE
      enum:
      - GOVERNMENT
      - ENTERPRISE
      - PRIVATE_PERSON
    ConnectionDetailsResult:
      required:
      - connectionStatus
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionDetailsResult /
            BusinessConnectionDetailsResult
          example: person
          enum:
          - business
          - person
        id:
          type: string
          description: Connection ID
          format: uuid
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        localIdentifier:
          type: string
          description: Local identifier. Please use assignedAccountId instead!
          deprecated: true
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          items:
            type: string
            description: Tags
        active:
          type: boolean
          description: Active / Not active
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
      description: discriminator to determine PersonConnectionDetailsResult / BusinessConnectionDetailsResult
      example: person
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessConnectionDetailsResult'
          person: '#/components/schemas/PersonConnectionDetailsResult'
    ConnectionRelationResult:
      type: object
      properties:
        id:
          type: string
          description: Connection relation ID
          format: uuid
        connection:
          $ref: '#/components/schemas/ConnectionDetailsResult'
        role:
          type: string
          description: The role of the connection
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    ConnectionRelationType:
      type: string
      description: Connection relation type
      example: CUSTOMER
      enum:
      - CUSTOMER
      - SUPPLIER
      - ACCOUNTANT
      - PARTNER
      - GROUP
    ConnectionStatus:
      type: string
      description: Connection status
      nullable: true
      example: INVITED
      enum:
      - INVITED
      - PENDING
      - CONNECTED
      - DISCONNECTED
      - CREATED
    PersonConnectionDetailsResult:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetailsResult'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    SepaStructuredAddress:
      type: object
      properties:
        streetName:
          type: string
          description: Name of the street
          example: Avenue Reine Astrid
        house:
          type: string
        buildingNumber:
          type: string
          description: A unique number assigned to the building in the street or area
          example: A22
        level:
          type: string
        postalCode:
          type: string
          description: Series of letters or digits or both, included in a postal address
          example: 12345-1A
        city:
          type: string
          description: Name of the city
          example: La Hulpe
        state:
          type: string
          description: Name of the state
          example: California
        country:
          type: string
          description: Name of the country
          example: Belgium
        countryCode:
          type: string
          description: Two-letter country code defined in ISO 3166
          example: BE
        province:
          type: string
        postalCodeExtension:
          type: string
        department:
          maxLength: 70
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
        subDepartment:
          maxLength: 70
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
        buildingName:
          maxLength: 35
          type: string
          description: Name of the building or house.
          example: Empire State Building
        floor:
          maxLength: 70
          type: string
          description: A unique number or name assigned to the floor within the building
          example: ground
        postBox:
          maxLength: 16
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1033'
        room:
          maxLength: 70
          type: string
          description: Building room number.
          example: '2.22'
        cityLocationName:
          maxLength: 35
          type: string
          description: Specific location name within the town.
          example: City center
        district:
          type: string
          description: Identifies a subdivision within a country sub-division
          example: Walloon Brabant
        subDistrict:
          maxLength: 35
          type: string
          description: Identifies a subdivision of a country such as state, region,
            county.
          example: Wallonia
      description: |
        EPC Interbank Structured Address Structure. Structured addresses are address information split into several fields instead of one unstructured address field.
        From November 2023, all banks and PSPs will have to accept payment messages with structured addresses.
        From 2025, banks and PSPs will have to send all their messages with structured addresses.
      nullable: true
      externalDocs:
        description: More about EPC Interbank Structured Address Structure
        url: 
          https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
    ConnectionRelationRequest:
      type: object
      properties:
        role:
          type: string
          description: The role of the connection relation
        relatedConnectionId:
          type: string
          description: The ID of the target connection
          format: uuid
    AllConnectionRelationResult:
      type: object
      properties:
        connection_relations:
          type: array
          description: List of connection relations
          items:
            $ref: '#/components/schemas/ConnectionRelationResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateConnectionRelationRequest:
      type: object
      properties:
        role:
          type: string
          description: The role of the connection relation
        relatedConnectionId:
          type: string
          description: The ID of the target connection
          format: uuid
    ConnectorRequest:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        type: object
    BusinessConnectionDetailsResultWithPaymentAccounts:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetailsResultWithPaymentAccounts'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionDetailsResultWithPaymentAccounts:
      required:
      - connectionStatus
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionDetailsResult /
            BusinessConnectionDetailsResult
          example: person
          enum:
          - business
          - person
        id:
          type: string
          description: Connection ID
          format: uuid
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        localIdentifier:
          type: string
          description: Local identifier. Please use assignedAccountId instead!
          deprecated: true
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          items:
            type: string
            description: Tags
        active:
          type: boolean
          description: Active / Not active
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts linked to connection
          items:
            $ref: '#/components/schemas/PaymentAccountListItem'
      description: discriminator to determine PersonConnectionDetailsResultWithPaymentAccounts
        / BusinessConnectionDetailsResultWithPaymentAccounts
      example: person
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessConnectionDetailsResultWithPaymentAccounts'
          person: '#/components/schemas/PersonConnectionDetailsResultWithPaymentAccounts'
    PersonConnectionDetailsResultWithPaymentAccounts:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetailsResultWithPaymentAccounts'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    BusinessConnectionRequest:
      required:
      - businessType
      - relationType
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequest'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionRequest:
      required:
      - relationType
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionRequest / BusinessConnectionRequest
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        localIdentifier:
          type: string
          description: Local identifier. Please use assignedAccountId instead!
          deprecated: true
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: Tags
            example: '["tag1","tag2"]'
        active:
          type: boolean
          description: Active / Not active
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts
          items:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonConnectionRequest'
          business: '#/components/schemas/BusinessConnectionRequest'
    NamedPaymentAccountDto:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        ownerName:
          type: string
          description: Name of the holder of this payment account.
      description: Counterparty payment account
      nullable: true
    PersonConnectionRequest:
      required:
      - relationType
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequest'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    AllConnectionsResult:
      type: object
      properties:
        connections:
          type: array
          description: List of connections
          items:
            $ref: '#/components/schemas/ConnectionListItem'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    BusinessConnectionListItem:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionListItem'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionListItem:
      required:
      - connectionStatus
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionListItem / BusinessConnectionListItem
          example: person
          enum:
          - business
          - person
        id:
          type: string
          description: Connection ID
          format: uuid
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        localIdentifier:
          type: string
          description: Local identifier. Please use `assignedAccountId` instead!
          deprecated: true
        assignedAccountId:
          type: string
          description: Assigned account id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          items:
            type: string
            description: Tags
        active:
          type: boolean
          description: Active / Not active
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        spaceUrl:
          type: string
          description: Space url
        createdAt:
          type: string
          description: Creation datetime
          format: date-time
      description: discriminator to determine PersonConnectionListItem / BusinessConnectionListItem
      example: person
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessConnectionListItem'
          person: '#/components/schemas/PersonConnectionListItem'
    PersonConnectionListItem:
      required:
      - connectionStatus
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionListItem'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    UpdateBusinessConnectionRequest:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateConnectionRequest'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    UpdateConnectionRequest:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionRequest / BusinessConnectionRequest
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        localIdentifier:
          type: string
          description: Local identifier. Please use assignedAccountId instead!
          deprecated: true
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: Tags
            example: '["tag1","tag2"]'
        active:
          type: boolean
          description: Active / Not active
        metadata:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/UpdatePersonConnectionRequest'
          business: '#/components/schemas/UpdateBusinessConnectionRequest'
    UpdatePersonConnectionRequest:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateConnectionRequest'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    PaymentAccountConnectionDetails:
      type: object
      properties:
        id:
          type: string
          description: Connection ID
          format: uuid
        type:
          type: string
          description: Connection type
          example: person
        name:
          type: string
          description: Connection name
        alias:
          type: string
          description: Connection alias
        defaultPaymentAccount:
          type: boolean
          description: Flag to indicate if paymentAccount is default for this connection
      description: List of associated connection
    PaymentAccountResult:
      type: object
      properties:
        id:
          type: string
          description: Payment account ID
          format: uuid
        identifier:
          type: string
          description: Identifier of the payment account
        scheme:
          type: string
          description: Scheme of the payment account
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        spaceId:
          type: string
          description: Space id
          format: uuid
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not.
        ownerName:
          type: string
          description: Name of owner.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform.
        connections:
          type: array
          description: List of associated connection
          items:
            $ref: '#/components/schemas/PaymentAccountConnectionDetails'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        entityPaymentAccountId:
          type: string
          description: entityPaymentAccountId in Payment Account
          format: uuid
    ConnectionPaymentAccountRequest:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        ownerName:
          type: string
          description: Name of the holder of this payment account.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account. Default value is false.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not. Default
            value is true.
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account.
        isDefault:
          type: boolean
          description: Is default payment account of connection. If a default already
            exists, it will be overwritten in case you pass true!
          default: false
    AllPaymentAccountsResult:
      type: object
      properties:
        paymentAccounts:
          type: array
          description: List of payment accounts
          items:
            $ref: '#/components/schemas/PaymentAccountResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ConnectionPaymentAccountListItem:
      type: object
      properties:
        id:
          type: string
          description: Payment account ID
          format: uuid
        identifier:
          type: string
          description: Identifier of the payment account
        scheme:
          type: string
          description: Scheme of the payment account
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        spaceId:
          type: string
          description: Space id
          format: uuid
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not.
        ownerName:
          type: string
          description: Name of owner.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform.
        isDefault:
          type: boolean
          description: Is default payment account of connection.
      description: Payment accounts linked to connection
    UpdateConnectionPaymentAccountRequest:
      type: object
      properties:
        ownerName:
          type: string
          description: Owner name
        isDefault:
          type: boolean
          description: flag to specify if payment account should be default nor not
            for current connection
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account. Passing null clears the existing value.
    BusinessUnit:
      type: string
      description: Business Unit
      example: HEAD_OFFICE
      enum:
      - HEAD_OFFICE
      - BRANCH
      - OTHER
    TaxInfoResult:
      type: object
      properties:
        id:
          type: string
          description: TaxInfo id
          format: uuid
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        b2cIndicator:
          type: boolean
          description: B2C Indicator
        customerClassification:
          type: string
          description: Customer classification. Applies to customer connection only.
        smallEnterprise:
          type: boolean
          description: Small enterprise
        businessUnit:
          $ref: '#/components/schemas/BusinessUnit'
        taxRegistrations:
          type: array
          description: Tax registrations
          items:
            $ref: '#/components/schemas/TaxRegistrationResult'
    TaxRegistrationResult:
      type: object
      properties:
        id:
          type: string
          description: Tax registration id
        taxId:
          type: string
          description: Tax id
        country:
          type: string
          description: Country
        type:
          type: string
          description: Tax type
        voluntaryTax:
          type: boolean
          description: Voluntary tax flag
        oss:
          type: boolean
          description: Oss flag
        startDate:
          type: string
          description: Start Date
          format: date
        endDate:
          type: string
          description: End Date
          format: date
        vatGroup:
          $ref: '#/components/schemas/VatGroup'
    VatGroup:
      type: object
      properties:
        name:
          type: string
          description: VAT group name
        startDate:
          type: string
          description: VAT group start date
          format: date
        endDate:
          type: string
          description: VAT group end date
          format: date
      description: Vat Group
    TaxInfoRequest:
      type: object
      properties:
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        b2cIndicator:
          type: boolean
          description: B2C Indicator
        customerClassification:
          type: string
          description: Customer classification. Applies to customer connection only.
        smallEnterprise:
          type: boolean
          description: Small enterprise
        businessUnit:
          $ref: '#/components/schemas/BusinessUnit'
    TaxRegistrationRequest:
      type: object
      properties:
        taxId:
          type: string
          description: TaxId
        country:
          type: string
          description: Country
        type:
          type: string
          description: Type
        voluntaryTax:
          type: boolean
          description: Voluntary Tax
        oss:
          type: boolean
          description: oss
        startDate:
          type: string
          description: Start Date
          format: date
        endDate:
          type: string
          description: End Date
          format: date
        vatGroup:
          $ref: '#/components/schemas/VatGroup'
    ConnectionsList:
      type: object
      properties:
        connections:
          type: array
          description: List of connection ids
          format: uuid
          items:
            type: string
            description: List of connection ids
            format: uuid
    PaymentAccountRequest:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        ownerName:
          type: string
          description: Name of the holder of this payment account.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        ownedBySpace:
          type: boolean
          description: Flag to indicate if the space is the actual holder of the payment
            account. Default value is false.
        active:
          type: boolean
          description: Flag to indicate if the payment account is active or not. Default
            value is true.
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account.
    UpdatePaymentAccountRequest:
      type: object
      properties:
        ownerName:
          type: string
          description: Name of the holder of this payment account.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account. Passing null clears the existing value.
    PaymentAccountsWhitelist:
      required:
      - paymentAccountsWhitelist
      type: object
      properties:
        paymentAccountsWhitelist:
          type: array
          description: Payment accounts whitelist - array of key value payment account
            objects
          example:
          - identifier: BETEST2
            scheme: IBAN
            currency: EUR
          items:
            $ref: '#/components/schemas/AccountIdentifier'
    PaymentBalanceOffsetResultList:
      required:
      - balanceOffsets
      type: object
      properties:
        balanceOffsets:
          type: array
          description: balanceOffsets of given payment
          items:
            $ref: '#/components/schemas/BalanceOffsetResult'
    PaymentListBalanceOffsetRequest:
      type: object
      properties:
        payments:
          type: array
          description: List of payment ids
          items:
            type: string
            description: Payment id
            format: uuid
    CounterpartyPaymentInformationResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          endToEndId:
            type: string
            description: End to end id, according to PSD2 directive.
          amount:
            $ref: '#/components/schemas/AmountDto'
          counterpartySpaceUrl:
            type: string
            description: URL to the space of the counter party
          counterPartyBalanceOffsetId:
            type: string
            description: Id of counter party's balance offset
            format: uuid
          paymentAccount:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
          counterpartyPaymentAccount:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
    PaymentInformationReferenceDetailsResult:
      type: object
      properties:
        value:
          type: string
          description: The value of the payment reference
        type:
          $ref: '#/components/schemas/PaymentInformationReferenceType'
        scheme:
          $ref: '#/components/schemas/PaymentInformationReferenceScheme'
      description: Reference added to all transactions (resulting in movements) that
        will be performed while executing the transfer.
    PaymentInformationReferenceScheme:
      type: string
      description: Payment reference scheme
      example: ISO_11649
      enum:
      - OGM_VCS
      - ISO_11649
      - ACCEPT_GIRO
      - STRUCTURED_EE
      - STRUCTURED_SE
      - STRUCTURED_LU
      - STRUCTURED_FI
      - STRUCTURED_NO
      - STRUCTURED_CZ
    PaymentInformationReferenceType:
      type: string
      description: Payment reference scheme
      example: STRUCTURED
      enum:
      - STRUCTURED
      - UNSTRUCTURED
    CounterpartyPaymentInformationRequest:
      required:
      - counterPartyBalanceOffsetId
      - counterpartySpaceUrl
      - status
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        counterpartySpaceUrl:
          type: string
          description: URL to the space of the counter party
        counterPartyBalanceOffsetId:
          type: string
          description: Id of counter party's balance offset
          format: uuid
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
    PaymentInformationReferenceDetails:
      required:
      - type
      - value
      type: object
      properties:
        value:
          type: string
          description: The value of the payment reference
        type:
          $ref: '#/components/schemas/PaymentInformationReferenceType'
        scheme:
          $ref: '#/components/schemas/PaymentInformationReferenceScheme'
      description: Reference details filled in by the payer when making the payment.
    AllCounterpartyPaymentInformationResult:
      type: object
      properties:
        counterpartyPaymentInformation:
          type: array
          description: List of counterparty payment information
          items:
            $ref: '#/components/schemas/CounterpartyPaymentInformationResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateCounterpartyPaymentInformationRequest:
      required:
      - paymentId
      type: object
      properties:
        paymentId:
          type: string
          description: The new payment ID to associate with this counterparty payment
            information
          format: uuid
    CrossCurrencyTransactionResponse:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          originatingAmount:
            $ref: '#/components/schemas/AmountDto'
          counterpartyAmount:
            $ref: '#/components/schemas/AmountDto'
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          beneficiary:
            $ref: '#/components/schemas/PaymentAccountListItem'
          payer:
            $ref: '#/components/schemas/PaymentAccountListItem'
          source:
            $ref: '#/components/schemas/CrossCurrencyTransactionSource'
          cost:
            $ref: '#/components/schemas/JsonBMap'
          collectConversionReference:
            type: string
            description: Additional reference added to the transaction which moves
              money from payer account to UP collect account (to be later converted
              to another currency). Set by FX service provider (PXG).
          feeConversionReference:
            type: string
            description: Additional reference added to the transaction which represents
              the cost charge. Set by FX service provider (PXG).
          notificationUrl:
            type: string
            description: URL registered by the initiating application which will serve
              as a callback through which BTX PAY can feed update notifications.
          redirectUrl:
            type: string
            description: URL registered by the initiating application which will be
              used to redirect the user once the authorization flow of the transfer
              has been completed.
    CrossCurrencyTransactionSource:
      required:
      - provider
      type: object
      properties:
        provider:
          type: string
          description: Source provider
          enum:
          - PXG
        crossCurrencyTransactionId:
          type: string
          description: Cross currency transaction identifier in context of specified
            source provider.
      description: Specifies the external identifier of the transfer.
    CrossCurrencyTransactionRequest:
      required:
      - status
      type: object
      properties:
        paymentId:
          type: string
          description: Identifier of the wrapping BTX Payment (all CCTs need to be
            executed in the context of a payment)
          format: uuid
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        beneficiary:
          $ref: '#/components/schemas/NamedPaymentAccountWithAddress'
        payer:
          $ref: '#/components/schemas/NamedPaymentAccountWithAddress'
        status:
          $ref: '#/components/schemas/JsonBMap'
        cost:
          $ref: '#/components/schemas/JsonBMap'
        source:
          $ref: '#/components/schemas/CrossCurrencyTransactionSource'
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        collectConversionReference:
          type: string
          description: Additional reference added to the transaction which moves money
            from payer account to UP collect account (to be later converted to another
            currency). Set by FX service provider (PXG).
        feeConversionReference:
          type: string
          description: Additional reference added to the transaction which represents
            the cost charge. Set by FX service provider (PXG).
        notificationUrl:
          type: string
          description: URL registered by the initiating application which will serve
            as a callback through which BTX PAY can feed update notifications.
        redirectUrl:
          type: string
          description: URL registered by the initiating application which will be
            used to redirect the user once the authorization flow of the transfer
            has been completed.
    NamedPaymentAccountWithAddress:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        ownerName:
          type: string
          description: Name of the holder of this payment account.
        address:
          $ref: '#/components/schemas/Iso20022StructuredAddress'
      description: Creditor payment account data
      example:
        identifier: BE19519469892112
        scheme: IBAN
        bank:
          identifier: ABNABE2AIDJ
          scheme: BIC
        country: BE
        currency: EUR
        ownerName: The company
        address:
          country: BE
          townName: Gent
          addressType: BIZZ
          streetName: Kortrijksesteenweg
          buildingNumber: '1146'
          postCode: '9051'
    ListCrossCurrencyTransactionsResponse:
      type: object
      properties:
        crossCurrencyTransactions:
          type: array
          description: List of cross currency transactions
          items:
            $ref: '#/components/schemas/CrossCurrencyTransactionResponse'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListCrossCurrencyTransactionsQueryParamsSingle:
      type: object
      properties:
        sourceId:
          type: string
          description: Source cross currency transaction id in context of source provider
        sourceProvider:
          type: string
          description: Source provider
          enum:
          - PXG
        originatingAmount:
          type: number
          description: Originating amount equals
          example: 100.0
        counterpartyAmount:
          type: number
          description: Counterparty amount equals
          example: 90.0
        reference:
          type: string
          description: Reference
          example: RF18000000000539007547034
        collectConversionReference:
          type: string
          description: Collect conversion reference
          example: COLLECT_REF_123
        feeConversionReference:
          type: string
          description: Fee conversion reference
          example: FEE_REF_456
        beneficiaryName:
          type: string
          description: Filter by beneficiary’s payment account owner name
        beneficiaryAccount:
          type: string
          description: Filter by beneficiary’s payment account identifier
        payerName:
          type: string
          description: Filter by payer’s payment account owner name
        payerAccount:
          type: string
          description: Filter by payer’s payment account identifier
    UpdateCrossCurrencyTransactionRequest:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/CrossCurrencyTransactionSource'
        status:
          $ref: '#/components/schemas/JsonBMap'
        collectConversionReference:
          type: string
          description: Additional reference added to the transaction which moves money
            from payer account to UP collect account (to be later converted to another
            currency). Set by FX service provider (PXG).
        feeConversionReference:
          type: string
          description: Additional reference added to the transaction which represents
            the cost charge. Set by FX service provider (PXG).
        notificationUrl:
          type: string
          description: URL registered by the initiating application which will serve
            as a callback through which BTX PAY can feed update notifications.
        redirectUrl:
          type: string
          description: URL registered by the initiating application which will be
            used to redirect the user once the authorization flow of the transfer
            has been completed.
    ManualPaymentInformationResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          endToEndId:
            type: string
            description: End to end id, according to PSD2 directive.
          amount:
            $ref: '#/components/schemas/AmountDto'
          comment:
            type: string
            description: Additional comment of user
          paymentMethod:
            $ref: '#/components/schemas/PaymentMethod'
    PaymentMethod:
      type: string
      description: The payment method
      example: BANK_TRANSFER
      enum:
      - BANK_TRANSFER
      - CREDIT_CARD
      - DEBIT_CARD
      - CASH
      - OTHER
      - DIRECT_DEBIT
      - CHEQUE
      - DRAFT
    ManualPaymentInformationRequest:
      required:
      - status
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        comment:
          type: string
          description: Additional comment of user
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
    AllManualPaymentInformationResult:
      type: object
      properties:
        manualPaymentInformation:
          type: array
          description: List of manual payment information
          items:
            $ref: '#/components/schemas/ManualPaymentInformationResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateManualPaymentInformationRequest:
      type: object
      properties:
        paymentId:
          type: string
          description: Id of payment
          format: uuid
    BookedPaymentMovementResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementResult'
      - type: object
        properties:
          balancesAfterOperation:
            $ref: '#/components/schemas/JsonBMap'
          bookingDate:
            type: string
            description: Booking date in format yyyy-MM-dd
            format: date
            example: 2024-05-22
          relatedMovement:
            type: string
            description: Related movement
            example: 51c624a8-a584-41db-b1f7-30815f48666c
    BulkPaymentMovementFullResult:
      required:
      - paymentMovements
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentMovementResult'
      - type: object
        properties:
          paymentMovements:
            type: array
            description: List of payment movements
            items:
              $ref: '#/components/schemas/PaymentMovementResult'
    BulkPaymentMovementIdsResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentMovementResult'
      - type: object
        properties:
          paymentMovements:
            type: array
            items:
              type: string
              format: uuid
    BulkPaymentMovementResult:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BulkResponseType'
      discriminator:
        propertyName: type
        mapping:
          ids: '#/components/schemas/BulkPaymentMovementIdsResult'
          full: '#/components/schemas/BulkPaymentMovementFullResult'
    BulkResponseType:
      type: string
      description: Bulk response type
      example: full
      enum:
      - full
      - ids
    PaymentMovementMandate:
      type: object
      properties:
        reference:
          type: string
          description: Mandate reference
        creditor:
          type: string
          description: Mandate creditor
    PaymentMovementReservation:
      type: object
      properties:
        id:
          type: string
          description: Reservation id
        plannedDateStart:
          type: string
          description: Start of date interval for planned movement to execute.
          format: date
        plannedDateEnd:
          type: string
          description: End of date interval for planned movement to execute.
          format: date
    PaymentMovementResult:
      required:
      - status
      type: object
      discriminator:
        propertyName: movementBookingType
        mapping:
          booked: '#/components/schemas/BookedPaymentMovementResult'
          planned: '#/components/schemas/PlannedPaymentMovementResult'
          reserved: '#/components/schemas/ReservedPaymentMovementResult'
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          endToEndId:
            type: string
            description: End to end id, according to PSD2 directive.
          movementBookingType:
            type: string
            enum:
            - booked
            - planned
            - reserved
          amount:
            $ref: '#/components/schemas/AmountDto'
          originatingPaymentAccount:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
          counterpartyPaymentAccount:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
          counterpartyMetadata:
            $ref: '#/components/schemas/JsonBMap'
          source:
            $ref: '#/components/schemas/PaymentMovementSource'
          scheme:
            $ref: '#/components/schemas/PaymentMovementScheme'
          type:
            $ref: '#/components/schemas/PaymentMovementType'
          additionalInformation:
            type: string
            description: Additional information
            example: Something more
          mandate:
            $ref: '#/components/schemas/PaymentMovementMandate'
          cardTransactionDetails:
            $ref: '#/components/schemas/JsonBMap'
          sequence:
            type: string
            description: Sequence
            example: '1'
          failureCode:
            type: string
            description: Failure code
          rawRelatableMovementIds:
            $ref: '#/components/schemas/JsonBMap'
          statementId:
            type: string
            format: uuid
    PaymentMovementScheme:
      type: string
      description: Payment movement scheme
      example: CARDS
      enum:
      - SCT
      - SCT_INST
      - SDD
      - CARDS
    PaymentMovementSource:
      required:
      - provider
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/PaymentMovementSourceProvider'
        movementId:
          type: string
          description: Source movement id in context of source provider
        paymentId:
          type: string
          description: Payment id in context of source provider
        bookingId:
          type: string
          description: Booking id in context of source provider
    PaymentMovementSourceProvider:
      type: string
      description: Payment movement source provider
      example: IBIS
      enum:
      - OB_PXG
      - IBIS
      - CODABOX
      - JE_DECLARE
      - OTHER
      - UNKNOWN
    PaymentMovementType:
      type: string
      description: Payment movement type
      example: REGULAR
      enum:
      - REGULAR
      - RETURN
      - REFUND
      - REVERSAL
      - CASH_WITHDRAWAL
      - POS
      - FEES
      - OCT
      - OCT_REVERSAL
      - OTHER
    PlannedPaymentMovementResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementResult'
      - type: object
        properties:
          reservation:
            $ref: '#/components/schemas/PaymentMovementReservation'
          collectionId:
            type: string
            description: Collection id
    ReservedPaymentMovementResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementResult'
      - type: object
        properties:
          balancesAfterOperation:
            $ref: '#/components/schemas/JsonBMap'
          reservation:
            $ref: '#/components/schemas/PaymentMovementReservation'
          collectionId:
            type: string
            description: Collection id
    BookedPaymentMovementRequest:
      required:
      - bookingDate
      - movementBookingType
      - sequence
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementRequest'
      - type: object
        properties:
          balancesAfterOperation:
            $ref: '#/components/schemas/JsonBMap'
          bookingDate:
            type: string
            description: Booking date in format yyyy-MM-dd
            format: date
            example: 2024-05-22
          relatedMovement:
            type: string
            description: Related movement
            example: 51c624a8-a584-41db-b1f7-30815f48666c
    BulkPaymentMovementRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        paymentMovements:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMovementRequest'
    BulkResponseOptions:
      type: object
      properties:
        full:
          type: boolean
          description: |
            Flag to indicate whether to return a detailed response.
            If `full` is false, only ids will be returned.
          example: true
          default: false
      description: Response options
    PaymentMovementRequest:
      required:
      - movementBookingType
      - sequence
      - status
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        movementBookingType:
          type: string
          description: discriminator to determine BookedPaymentMovementRequest / PlannedPaymentMovementRequest
            / ReservedPaymentMovementRequest
          example: booked
          enum:
          - booked
          - planned
          - reserved
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        originatingPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyMetadata:
          $ref: '#/components/schemas/JsonBMap'
        source:
          $ref: '#/components/schemas/PaymentMovementSource'
        scheme:
          $ref: '#/components/schemas/PaymentMovementScheme'
        type:
          $ref: '#/components/schemas/PaymentMovementType'
        additionalInformation:
          type: string
          description: Additional information
          example: Something more
        mandate:
          $ref: '#/components/schemas/PaymentMovementMandate'
        cardTransactionDetails:
          $ref: '#/components/schemas/JsonBMap'
        sequence:
          type: string
          description: Sequence
          example: '1'
        failureCode:
          type: string
          description: Failure code
        statementId:
          type: string
          description: Id of statement document encompassing this movement.
          format: uuid
        rawRelatableMovementIds:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: movementBookingType
        mapping:
          booked: '#/components/schemas/BookedPaymentMovementRequest'
          planned: '#/components/schemas/PlannedPaymentMovementRequest'
          reserved: '#/components/schemas/ReservedPaymentMovementRequest'
    PlannedPaymentMovementRequest:
      required:
      - movementBookingType
      - sequence
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementRequest'
      - type: object
        properties:
          reservation:
            $ref: '#/components/schemas/PaymentMovementReservation'
          collectionId:
            type: string
            description: Collection id
    ReservedPaymentMovementRequest:
      required:
      - movementBookingType
      - sequence
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/PaymentMovementRequest'
      - type: object
        properties:
          balancesAfterOperation:
            $ref: '#/components/schemas/JsonBMap'
          reservation:
            $ref: '#/components/schemas/PaymentMovementReservation'
          collectionId:
            type: string
            description: Collection id
    AllPaymentMovementsResult:
      type: object
      properties:
        paymentMovements:
          type: array
          description: List of payment movements
          items:
            $ref: '#/components/schemas/PaymentMovementResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    PaymentMovementSingleParams:
      type: object
      properties:
        counterpartyName:
          type: string
          description: Counterparty name
          example: Unifiedpost
        endToEndId:
          type: string
          description: End to end Id
          example: 0a2e9932-a660-4354-82a9-b5c0897f5887
        reference:
          type: string
          description: Reference
          example: RF18000000000539007547034
        amountValue[eq]:
          type: number
          description: Amount value equals
          example: 12.25
        amountValue[ne]:
          type: number
          description: Amount value not equals
          example: 12.25
        amountValue[gt]:
          type: number
          description: Amount value greater than
          example: 11.25
        amountValue[gte]:
          type: number
          description: Amount value greater than or equal
          example: 11.25
        amountValue[lt]:
          type: number
          description: Amount value less than
          example: 11.25
        amountValue[lte]:
          type: number
          description: Amount value less than or equal
          example: 13.25
        amountCurrency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        bookingDate[eq]:
          type: string
          description: Booking date equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        bookingDate[ne]:
          type: string
          description: Booking date not equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        bookingDate[gt]:
          type: string
          description: Booking date greater than, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        bookingDate[gte]:
          type: string
          description: Booking date greater than or equal, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        bookingDate[lt]:
          type: string
          description: Booking date less than, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        bookingDate[lte]:
          type: string
          description: Booking date less than or equal, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        mandateReference:
          type: string
          description: Mandate reference
        sequence:
          type: string
          description: Sequence
        sourceProvider:
          $ref: '#/components/schemas/PaymentMovementSourceProvider'
        sourceMovementId:
          type: string
          description: Source movement id in context of source provider
        movementBookingType:
          type: string
          description: Movement booking type
          example: booked
        plannedDateStart[eq]:
          type: string
          description: '"Planned date start" equals, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateStart[ne]:
          type: string
          description: '"Planned date start" not equals, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateStart[gt]:
          type: string
          description: '"Planned date start" greater than, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateStart[gte]:
          type: string
          description: '"Planned date start" greater than or equal, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateStart[lt]:
          type: string
          description: '"Planned date start" less than, in the format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateStart[lte]:
          type: string
          description: '"Planned date start" less than or equal, in the format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[eq]:
          type: string
          description: '"Planned date end" equals, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[ne]:
          type: string
          description: '"Planned date end" not equals, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[gt]:
          type: string
          description: '"Planned date end" greater than, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[gte]:
          type: string
          description: '"Planned date end" greater than or equal, in format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[lt]:
          type: string
          description: '"Planned date end" less than, in the format yyyy-MM-dd'
          format: date
          example: 2024-04-15
        plannedDateEnd[lte]:
          type: string
          description: '"Planned date end" less than or equal, in the format yyyy-MM-dd'
          format: date
          example: 2024-04-15
    PatchPaymentMovementReservation:
      type: object
      properties:
        plannedDateEnd:
          type: string
          description: End of date interval for planned movement to execute.
          format: date
      description: Reservation
    PatchPaymentMovementSource:
      type: object
      properties:
        movementId:
          type: string
          description: Movement id
          example: b276019f-b896-4dd6-96c8-7728272183c7
      description: Source movement
    UpdateBookedPaymentMovementRequest:
      required:
      - movementBookingType
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdatePaymentMovementRequest'
      - type: object
        properties:
          bookingDate:
            type: string
            description: Booking date in format yyyy-MM-dd
            format: date
            example: 2024-05-22
    UpdatePaymentMovementRequest:
      required:
      - movementBookingType
      type: object
      properties:
        movementBookingType:
          type: string
          description: discriminator to determine BookedPaymentMovementRequest / PlannedPaymentMovementRequest
          example: booked
          enum:
          - booked
          - planned
          - reserved
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        status:
          $ref: '#/components/schemas/JsonBMap'
        statementId:
          type: string
          description: Id of statement document encompassing this movement.
          format: uuid
        source:
          $ref: '#/components/schemas/PatchPaymentMovementSource'
      discriminator:
        propertyName: movementBookingType
        mapping:
          booked: '#/components/schemas/UpdateBookedPaymentMovementRequest'
          planned: '#/components/schemas/UpdatePlannedPaymentMovementRequest'
          reserved: '#/components/schemas/UpdateReservedPaymentMovementRequest'
    UpdatePlannedPaymentMovementRequest:
      required:
      - movementBookingType
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdatePaymentMovementRequest'
      - type: object
        properties:
          collectionId:
            type: string
            description: Collection id
          reservation:
            $ref: '#/components/schemas/PatchPaymentMovementReservation'
    UpdateReservedPaymentMovementRequest:
      required:
      - movementBookingType
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdatePaymentMovementRequest'
      - type: object
        properties:
          collectionId:
            type: string
            description: Collection id
          reservation:
            $ref: '#/components/schemas/PatchPaymentMovementReservation'
          amount:
            $ref: '#/components/schemas/AmountDto'
    ExtensionProcessableData:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        type: object
    PaymentRequestResponse:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          endToEndId:
            type: string
            description: End to end id, according to PSD2 directive.
          description:
            type: string
            description: General description
          paymentMethod:
            $ref: '#/components/schemas/PaymentMethod'
          source:
            $ref: '#/components/schemas/PaymentRequestSource'
          requestedAmount:
            $ref: '#/components/schemas/AmountDto'
          collectedAmount:
            $ref: '#/components/schemas/AmountDto'
          dueDate:
            type: string
            description: Date until when the payment needs to happen.
            format: date
          expirationDate:
            type: string
            description: Date when this payment request expires.
            format: date
          metadata:
            $ref: '#/components/schemas/JsonBMap'
    PaymentRequestSource:
      required:
      - provider
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/PaymentRequestSourceProvider'
        requestId:
          type: string
          description: Payment request identifier in context of specified source provider.
      description: Source
    PaymentRequestSourceProvider:
      type: string
      description: The payments service provider or the source of the payment request.
      example: OCS
      enum:
      - OCS
    PaymentRequestRequest:
      required:
      - status
      type: object
      properties:
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        description:
          type: string
          description: General description
        paymentMethod:
          $ref: '#/components/schemas/PaymentMethod'
        status:
          $ref: '#/components/schemas/JsonBMap'
        source:
          $ref: '#/components/schemas/PaymentRequestSource'
        requestedAmount:
          $ref: '#/components/schemas/AmountDto'
        collectedAmount:
          $ref: '#/components/schemas/AmountDto'
        dueDate:
          type: string
          description: Date until when the payment needs to happen.
          format: date
        expirationDate:
          type: string
          description: Date when this payment request expires.
          format: date
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    ListPaymentRequestsResponse:
      type: object
      properties:
        paymentRequests:
          type: array
          description: List of payment requests
          items:
            $ref: '#/components/schemas/PaymentRequestResponse'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListPaymentRequestsQueryParamsSingle:
      required:
      - sourceProvider
      type: object
      properties:
        sourceId:
          type: string
          description: Source payment id in context of source provider
        sourceProvider:
          $ref: '#/components/schemas/PaymentRequestSourceProvider'
        requestedAmount[eq]:
          type: number
          description: Requested amount equals
          example: 12.25
        requestedAmount[ne]:
          type: number
          description: Requested amount not equals
          example: 12.25
        requestedAmount[gt]:
          type: number
          description: Requested amount greater than
          example: 11.25
        requestedAmount[gte]:
          type: number
          description: Requested amount greater than or equal
          example: 11.25
        requestedAmount[lt]:
          type: number
          description: Requested amount less than
          example: 11.25
        requestedAmount[lte]:
          type: number
          description: Requested amount less than or equal
          example: 13.25
        collectedAmount[eq]:
          type: number
          description: Collected amount equals
          example: 12.25
        collectedAmount[ne]:
          type: number
          description: Collected amount not equals
          example: 12.25
        collectedAmount[gt]:
          type: number
          description: Collected amount greater than
          example: 11.25
        collectedAmount[gte]:
          type: number
          description: Collected amount greater than or equal
          example: 11.25
        collectedAmount[lt]:
          type: number
          description: Collected amount less than
          example: 11.25
        collectedAmount[lte]:
          type: number
          description: Collected amount less than or equal
          example: 13.25
        dueDate[eq]:
          type: string
          description: Due date equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[ne]:
          type: string
          description: Due date not equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[gt]:
          type: string
          description: Due date greater than, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[gte]:
          type: string
          description: Due date greater than or equal, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[lt]:
          type: string
          description: Due date less than, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[lte]:
          type: string
          description: Due date less than or equal, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[eq]:
          type: string
          description: Expiration date equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[ne]:
          type: string
          description: Expiration date not equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[gt]:
          type: string
          description: Expiration date greater than, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[gte]:
          type: string
          description: Expiration date greater than or equal, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[lt]:
          type: string
          description: Expiration date less than, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        expirationDate[lte]:
          type: string
          description: Expiration date less than or equal, in the format yyyy-MM-dd
          format: date
          example: 2024-04-15
        reference:
          type: string
          description: Reference
          example: RF18000000000539007547034
    UpdatePaymentRequestRequest:
      required:
      - status
      type: object
      properties:
        source:
          $ref: '#/components/schemas/PaymentRequestSource'
        status:
          $ref: '#/components/schemas/JsonBMap'
        description:
          type: string
          description: General description
        requestedAmount:
          $ref: '#/components/schemas/AmountDto'
        collectedAmount:
          $ref: '#/components/schemas/AmountDto'
        dueDate:
          type: string
          description: Date until when the payment needs to happen.
          format: date
        expirationDate:
          type: string
          description: Date when this payment request expires.
          format: date
        metadata:
          $ref: '#/components/schemas/JsonBMap'
    BasePaymentInformationResult:
      type: object
      properties:
        paymentInformationType:
          type: string
          description: Discriminator property to identify the payment information
            type
        id:
          type: string
          description: id of payment information
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        paymentId:
          type: string
          description: id of payment
          format: uuid
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
      discriminator:
        propertyName: paymentInformationType
        mapping:
          paymentTransaction: '#/components/schemas/PaymentTransactionResult'
          counterparty: '#/components/schemas/CounterpartyPaymentInformationResult'
          manual: '#/components/schemas/ManualPaymentInformationResult'
          paymentMovement: '#/components/schemas/PaymentMovementResult'
          paymentRequest: '#/components/schemas/PaymentRequestResponse'
          thirdParty: '#/components/schemas/ThirdPartyPaymentInformationResponse'
          crossCurrencyTransaction: '#/components/schemas/CrossCurrencyTransactionResponse'
    GetBulkPaymentDetails:
      required:
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE, if it
            has a parent. For BULK payments parentPaymentId should be null.
        amount:
          $ref: '#/components/schemas/AmountDto'
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        childrenPayments:
          type: array
          description: Children SINGLE payments in case current payment is of type
            BULK. For SINGLE payments, this will be null.
          items:
            $ref: '#/components/schemas/PaymentDetails'
    GetBulkPaymentTransactions:
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        paymentTransactions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransactionResult'
    GetBulkPaymentsDetailsResponse:
      type: object
      allOf:
      - $ref: '#/components/schemas/GetBulkPaymentsResponse'
      - type: object
        properties:
          payments:
            type: array
            description: List of payments details.
            items:
              $ref: '#/components/schemas/GetBulkPaymentDetails'
    GetBulkPaymentsResponse:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/GetBulkPaymentsResponseOptionsType'
      discriminator:
        propertyName: type
        mapping:
          PAYMENT_DETAILS: '#/components/schemas/GetBulkPaymentsDetailsResponse'
          PAYMENT_TRANSACTIONS: '#/components/schemas/GetBulkPaymentsTransactionsResponse'
    GetBulkPaymentsResponseOptionsType:
      type: string
      description: Get bulk payments response type
      example: PAYMENT_TRANSACTIONS
      enum:
      - PAYMENT_DETAILS
      - PAYMENT_TRANSACTIONS
    GetBulkPaymentsTransactionsResponse:
      type: object
      allOf:
      - $ref: '#/components/schemas/GetBulkPaymentsResponse'
      - type: object
        properties:
          payments:
            type: array
            description: List of payments with transactions. Only those payments that
              have transactions will be included.
            items:
              $ref: '#/components/schemas/GetBulkPaymentTransactions'
    OperationType:
      type: string
      description: Operation Type
      example: DEBIT
      enum:
      - CREDIT
      - DEBIT
      - DOC_TO_DOC
    PaymentSource:
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/PaymentSourceProvider'
        paymentId:
          type: string
          description: Payment Id in context of source provider
      description: Source
      nullable: true
    PaymentSourceProvider:
      type: string
      description: Payment source provider
      example: PXG
      enum:
      - PXG
      - OCS
      - AGGREGATION
      - INTERNAL
    PaymentTransactionResult:
      required:
      - status
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          referenceDetails:
            $ref: '#/components/schemas/PaymentInformationReferenceDetailsResult'
          status:
            $ref: '#/components/schemas/JsonBMap'
          endToEndId:
            type: string
            description: End to end id, according to PSD2 directive.
          amount:
            $ref: '#/components/schemas/AmountDto'
          source:
            $ref: '#/components/schemas/PaymentTransactionSource'
          paymentMethod:
            type: string
            description: Payment method - should be enum, but what values?
          debtor:
            $ref: '#/components/schemas/PaymentAccountListItem'
          creditor:
            $ref: '#/components/schemas/PaymentAccountListItem'
          requestedExecutionDate:
            type: string
            description: Requested execution date
            format: date
            example: 2024-06-23
    PaymentTransactionSource:
      required:
      - provider
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/PaymentTransactionSourceProvider'
        transactionId:
          type: string
          description: Transaction identifier in context of specified source provider.
    PaymentTransactionSourceProvider:
      type: string
      description: The payments service provider or the source of the payment transaction.
      example: PXG
      enum:
      - PXG
      - OCS
      - INTERNAL
    PaymentType:
      type: string
      description: Bulk or single payment, depending on the number of paid items.
      example: SINGLE
      enum:
      - BULK
      - SINGLE
    ThirdPartyPaymentInformationResponse:
      type: object
      allOf:
      - $ref: '#/components/schemas/BasePaymentInformationResult'
      - type: object
        properties:
          amount:
            $ref: '#/components/schemas/AmountDto'
          originatingPaymentAccount:
            $ref: '#/components/schemas/NamedPaymentAccountDto'
          details:
            type: object
            additionalProperties:
              type: object
          fees:
            type: array
            items:
              type: object
              additionalProperties:
                type: object
          statementDocumentId:
            type: string
            format: uuid
    GetBulkPaymentsRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/GetBulkPaymentsResponseOptions'
        payments:
          uniqueItems: true
          type: array
          description: List of payment ids to retrieve
          items:
            type: string
            format: uuid
    GetBulkPaymentsResponseOptions:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/GetBulkPaymentsResponseOptionsType'
      description: Response options
    BulkPaymentFullResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentResult'
      - type: object
        properties:
          payments:
            type: array
            items:
              $ref: '#/components/schemas/PaymentResult'
    BulkPaymentIdsResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentResult'
      - type: object
        properties:
          payments:
            type: array
            items:
              type: string
              format: uuid
    BulkPaymentResult:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BulkResponseType'
      discriminator:
        propertyName: type
        mapping:
          ids: '#/components/schemas/BulkPaymentIdsResult'
          full: '#/components/schemas/BulkPaymentFullResult'
    PaymentProcessingData:
      $ref: '#/components/schemas/JsonBMap'
    PaymentResult:
      required:
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE, if it
            has a parent. For BULK payments parentPaymentId should be null.
        amount:
          $ref: '#/components/schemas/AmountDto'
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        childrenPayments:
          type: array
          description: Children SINGLE payments in case current payment is of type
            BULK. For SINGLE payments, this will be null.
          items:
            $ref: '#/components/schemas/PaymentDetails'
        balanceOffsets:
          uniqueItems: true
          type: array
          description: Balance offsets
          items:
            $ref: '#/components/schemas/BalanceOffsetResult'
        processingData:
          $ref: '#/components/schemas/JsonBMap'
    BulkPaymentRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRequest'
    PaymentRequest:
      required:
      - status
      - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE.
          format: uuid
        amount:
          $ref: '#/components/schemas/AmountDto'
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
    CommonBalanceOffset:
      required:
      - aggregationStatus
      type: object
      properties:
        aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
      description: Common document balance offset data for both creditor and debtor
        documents.
    DocToDocPaymentRequest:
      required:
      - status
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        balanceOffset:
          $ref: '#/components/schemas/CommonBalanceOffset'
        creditorDocument:
          $ref: '#/components/schemas/Document'
        debtorDocument:
          $ref: '#/components/schemas/Document'
    Document:
      type: object
      properties:
        id:
          type: string
          description: Identifier of document
          format: uuid
        balanceOffset:
          $ref: '#/components/schemas/DocumentBalanceOffset'
      description: Debtor document details.
    DocumentBalanceOffset:
      required:
      - offsetType
      type: object
      properties:
        offsetType:
          $ref: '#/components/schemas/BalanceOffsetType'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
      description: Details of document balance offset
    AllPaymentsResult:
      type: object
      properties:
        payments:
          type: array
          description: List of payments
          items:
            $ref: '#/components/schemas/PaymentResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListPaymentsQueryParamsSingle:
      required:
      - type
      type: object
      properties:
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive
          example: 0a2e9932-a660-4354-82a9-b5c0897f5887
        operationType:
          $ref: '#/components/schemas/OperationType'
        amountValue[eq]:
          type: number
          description: Amount value equals
          example: 12.25
        amountValue[ne]:
          type: number
          description: Amount value not equals
          example: 12.25
        amountValue[gt]:
          type: number
          description: Amount value greater than
          example: 11.25
        amountValue[gte]:
          type: number
          description: Amount value greater than or equal
          example: 11.25
        amountValue[lt]:
          type: number
          description: Amount value less than
          example: 11.25
        amountValue[lte]:
          type: number
          description: Amount value less than or equal
          example: 13.25
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        reference:
          type: string
          description: Reference
          example: Invoice abc
        type:
          $ref: '#/components/schemas/PaymentType'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        balanceOffsets.aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        processingData:
          type: string
          description: processingData query param
          example: 
            processingData=spaceExtensions/com.unifiedpost.btx.payments/aggregation/unmatched=true
        counterpartyPaymentAccount.identifier[istart]:
          type: string
          description: Filter by counterparty payment account identifier having a
            specific prefix
          example: BE9
        counterpartyPaymentAccount.identifier[icont]:
          type: string
          description: Filter by counterparty payment account identifier containing
            a specific string
          example: '954'
        counterpartyPaymentAccount.ownerName:
          type: string
          description: Filter by counterparty payment account’s owner name
          example: Amazon
        createdAt[eq]:
          type: string
          description: Created at equals specific timestamp, iso datetime format
          format: date-time
        createdAt[ne]:
          type: string
          description: Created at does not equal specific timestamp, iso datetime
            format
          format: date-time
        createdAt[lt]:
          type: string
          description: Created is less than specific timestamp, iso datetime format
          format: date-time
        createdAt[lte]:
          type: string
          description: Created is less or equal than specific timestamp, iso datetime
            format
          format: date-time
        createdAt[gt]:
          type: string
          description: Created is greater than specific timestamp, iso datetime format
          format: date-time
        createdAt[gte]:
          type: string
          description: Created is greater than specific timestamp, iso datetime format
          format: date-time
    PaymentInclude:
      type: string
      description: The possible linked resources to include
      example: balanceOffsets
      enum:
      - balanceOffsets
      - processingData
    ListPaymentInformationResponse:
      required:
      - paymentInformation
      type: object
      properties:
        paymentInformation:
          type: array
          description: List of all payment information types
          items:
            $ref: '#/components/schemas/BasePaymentInformationResult'
    BulkUpdatePaymentRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        payments:
          type: array
          description: List of payments to update
          items:
            $ref: '#/components/schemas/BulkUpdatePaymentRequestItem'
    BulkUpdatePaymentRequestItem:
      type: object
      properties:
        id:
          type: string
        operations:
          $ref: '#/components/schemas/JsonPatch'
    UpdatePaymentRequest:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/JsonBMapNullable'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        amount:
          $ref: '#/components/schemas/AmountDto'
    BulkPaymentTransactionFullResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentTransactionResult'
      - type: object
        properties:
          paymentTransactions:
            type: array
            items:
              $ref: '#/components/schemas/PaymentTransactionResult'
    BulkPaymentTransactionIdsResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentTransactionResult'
      - type: object
        properties:
          paymentTransactions:
            type: array
            items:
              type: string
              format: uuid
    BulkPaymentTransactionResult:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BulkResponseType'
      discriminator:
        propertyName: type
        mapping:
          ids: '#/components/schemas/BulkPaymentTransactionIdsResult'
          full: '#/components/schemas/BulkPaymentTransactionFullResult'
    BulkPaymentTransactionRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        paymentTransactions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransactionRequest'
    PaymentTransactionRequest:
      required:
      - status
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        referenceDetails:
          $ref: '#/components/schemas/PaymentInformationReferenceDetails'
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        source:
          $ref: '#/components/schemas/PaymentTransactionSource'
        paymentMethod:
          type: string
          description: Payment method - should be enum, but what values?
        debtor:
          $ref: '#/components/schemas/NamedPaymentAccountWithAddress'
        creditor:
          $ref: '#/components/schemas/NamedPaymentAccountWithAddress'
        requestedExecutionDate:
          type: string
          description: Requested execution date
          format: date
          example: 2024-06-23
    AllPaymentTransactionResult:
      type: object
      properties:
        paymentTransactions:
          type: array
          description: List of payment transactions
          items:
            $ref: '#/components/schemas/PaymentTransactionResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    BulkUpdatePaymentTransactionRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        paymentTransactions:
          type: array
          description: List of payment transactions to update
          items:
            $ref: '#/components/schemas/BulkUpdatePaymentTransactionRequestItem'
    BulkUpdatePaymentTransactionRequestItem:
      type: object
      properties:
        id:
          type: string
        operations:
          $ref: '#/components/schemas/JsonPatch'
    UpdatePaymentTransactionRequest:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/JsonBMap'
        source:
          $ref: '#/components/schemas/PaymentTransactionSource'
    ThirdPartyPaymentInformationRequest:
      required:
      - amount
      - paymentId
      type: object
      properties:
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        amount:
          $ref: '#/components/schemas/AmountDto'
        originatingPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        details:
          $ref: '#/components/schemas/JsonBMap'
        fees:
          type: array
          description: List of fees
          items:
            $ref: '#/components/schemas/JsonBMap'
        statementDocumentId:
          type: string
          description: Id of statement document
          format: uuid
    ListThirdPartyPaymentInformationResponse:
      type: object
      properties:
        thirdPartyPaymentInformation:
          type: array
          description: List of third party payment information
          items:
            $ref: '#/components/schemas/ThirdPartyPaymentInformationResponse'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ThirdPartyPaymentInformationSingleParams:
      type: object
      properties:
        originatingPaymentAccount.identifier:
          type: string
          description: Account identifier of originating payment account.
          example: 547833XXXXXX0572
        originatingPaymentAccount.scheme:
          type: string
          description: Account scheme of originating payment account.
        originatingPaymentAccount.bank.scheme:
          type: string
          description: Bank scheme of originating payment account.
          example: THIRD_PARTY
          enum:
          - BIC
          - CODE
          - ABA
          - CLABE
          - THIRD_PARTY
        originatingPaymentAccount.bank.identifier:
          type: string
          description: Bank identifier of originating payment account.
    UpdateThirdPartyPaymentInformationRequest:
      type: object
      properties:
        paymentId:
          type: string
          description: Id of payment
          format: uuid
        paymentAccountId:
          type: string
          description: Id of payment account
          format: uuid
        statementDocumentId:
          type: string
          description: Id of statement document
          format: uuid
    SpaceLockedSettingResult:
      type: object
      properties:
        id:
          type: string
          description: locked setting id
          example: e7fca31b-0961-4cb1-9a6a-c17ca42df19e
        spaceId:
          type: string
          description: space id of locked setting
          example: 367b32b8-3c9f-49a2-b7e7-2224b1247fe7
        settingKey:
          type: string
          description: locked setting key
          example: referenceNumber
        settingValue:
          type: string
          description: locked setting value
          example: '1'
    SpaceLockedSettingRequest:
      required:
      - value
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
    SpaceLockedSettingValue:
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    DeleteSpaceLockedSettingLockRequest:
      required:
      - lockId
      type: object
      properties:
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    UpdateSpaceLockedSettingRequest:
      required:
      - lockId
      - value
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    DirectoryIdentifierDto:
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: string
          description: Directory id
          format: uuid
        name:
          type: string
          description: Name of the directory
      description: Document's parent directory
      example:
        id: 44d929f7-952d-4283-9010-8a63a16831b3
        name: Plant
    DirectoryResponse:
      required:
      - folder
      - id
      - name
      - spaceId
      type: object
      properties:
        id:
          type: string
          description: Directory id
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        name:
          type: string
          description: Name of the directory
        folder:
          $ref: '#/components/schemas/FolderV2'
        parentDirectory:
          $ref: '#/components/schemas/DirectoryIdentifierDto'
        timestamps:
          $ref: '#/components/schemas/Timestamps'
    FolderV2:
      type: string
      description: Document folder v2
      example: INBOX
      enum:
      - PURCHASES
      - SALES
      - DRAFTS
      - INBOX
      - STATEMENTS
      - FILES
    Timestamps:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      description: Timestamp fields, updated at and created at
    FolderLowercase:
      type: string
      description: Document folder lowercase
      example: inbox
      enum:
      - purchases
      - sales
      - drafts
      - inbox
      - statements
      - files
    DirectoryRequest:
      required:
      - name
      type: object
      properties:
        name:
          type: string
          description: Name of the directory.
          example: Fruits
        parentDirectoryId:
          type: string
          description: Optional parent directory. Must exist if not null. Null means
            top-level (root) directory in that folder.
          format: uuid
          example: 44d929f7-952d-4283-9010-8a63a16831b3
    FolderItemResponse:
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: string
          description: Item identifier
          format: uuid
        name:
          type: string
          description: Item name
        type:
          $ref: '#/components/schemas/FolderItemType'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        timestamps:
          $ref: '#/components/schemas/Timestamps'
    FolderItemType:
      type: string
      description: Folder item type
      example: DIRECTORY
      enum:
      - DIRECTORY
      - DOCUMENT
    ListFolderItemsResponse:
      type: object
      properties:
        items:
          type: array
          description: List of folder items
          items:
            $ref: '#/components/schemas/FolderItemResponse'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    FolderItemInclude:
      type: string
      description: The possible linked resources to include
      example: metadata
      enum:
      - timestamps
      - metadata
    MoveDirectoryRequest:
      type: object
      properties:
        parentDirectoryId:
          type: string
          description: Optional parent directory. Must exist if not null. Null means
            top-level (root) directory in that folder.
          format: uuid
          example: 44d929f7-952d-4283-9010-8a63a16831b3
    UpdateDirectoryRequest:
      required:
      - name
      type: object
      properties:
        name:
          type: string
          description: Name of the directory.
    LineItemData:
      $ref: '#/components/schemas/JsonBMap'
    LineItemListResultV2:
      type: object
      properties:
        lines:
          type: array
          description: List of line items
          items:
            $ref: '#/components/schemas/LineItemV2'
    LineItemV2:
      type: object
      properties:
        id:
          type: string
          description: Line item id
          format: uuid
        sequence:
          type: integer
          description: Sequence
          format: int32
          example: 1
        data:
          $ref: '#/components/schemas/JsonBMap'
    LineItemListRequestV2:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/JsonBMap'
    AllLineItemsResultV2:
      type: object
      properties:
        lines:
          type: array
          description: List of lines items
          items:
            $ref: '#/components/schemas/LineItemV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    UpdateLineItemRequestV2:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/JsonBMap'
    DocumentRawData:
      $ref: '#/components/schemas/JsonBMap'
    DocumentConnectionData:
      type: object
      properties:
        displayName:
          type: string
          description: display name of supplier/customer
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
        id:
          type: string
          description: id of supplier/customer
          format: uuid
    DocumentProcessingData:
      $ref: '#/components/schemas/JsonBMap'
    DocumentV2:
      required:
      - category
      - folder
      - id
      - metadata
      - retentionTime
      - spaceId
      - status
      type: object
      properties:
        timestamps:
          $ref: '#/components/schemas/Timestamps'
        lines:
          type: array
          description: List of line items
          nullable: true
          items:
            $ref: '#/components/schemas/LineItemV2'
        tasks:
          type: array
          description: List of document tasks
          nullable: true
          items:
            $ref: '#/components/schemas/TaskV2'
        parentDirectory:
          $ref: '#/components/schemas/DirectoryIdentifierDto'
        customCategories:
          type: object
          additionalProperties:
            uniqueItems: true
            type: array
            description: Document's custom categories
            example:
              purchases:
              - fuel
              - restaurant
            items:
              type: string
              description: Document's custom categories
              example: '{"purchases":["fuel","restaurant"]}'
          description: Document's custom categories
          example:
            purchases:
            - fuel
            - restaurant
        connections:
          type: array
          description: Connections of document
          nullable: true
          items:
            $ref: '#/components/schemas/DocumentConnectionData'
        id:
          type: string
          description: id of document
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        description:
          type: string
          description: description of document
        source:
          type: string
          description: source of document
        folder:
          $ref: '#/components/schemas/FolderV2'
        status:
          $ref: '#/components/schemas/JsonBMap'
        category:
          type: string
          description: 'Document category, current known values are :  PURCHASE_ORDER,
            ORDER_CONFIRMATION, DELIVERY_NOTE, GOODS_RECEIVED_NOTE, PROFORMA_INVOICE,
            INVOICE, INVOICE_REMINDER, CREDIT_NOTE, RECEIPT, STATEMENT, FILE, QUOTE,
            CREDIT_CARD_STATEMENT, THIRD_PARTY_STATEMENT, SELF_BILLED_INVOICE, SELF_BILLED_CREDIT_NOTE,
            OTHER. Future releases might contain additional new values.'
          example: INVOICE
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        tags:
          type: array
          description: tags
          items:
            type: string
            description: tags
        retentionTime:
          type: string
          description: datetime of document expiry
          format: date-time
        processingData:
          $ref: '#/components/schemas/JsonBMap'
        validationData:
          $ref: '#/components/schemas/JsonBMap'
        rawLinesData:
          $ref: '#/components/schemas/JsonBMap'
        rawData:
          $ref: '#/components/schemas/JsonBMap'
        balanceOffsets:
          type: array
          description: List of document balance offsets
          nullable: true
          items:
            $ref: '#/components/schemas/DocumentBalanceOffsetResult'
    DocumentValidationData:
      $ref: '#/components/schemas/JsonBMap'
    TaskV2:
      type: object
      properties:
        extensionName:
          type: string
          description: extension name
          example: com.unifiedpost.btx.data:approve
        status:
          type: string
          description: extension status
          example: approve
        context:
          $ref: '#/components/schemas/JsonBMap'
    DocumentConnectionRequest:
      required:
      - id
      - relationType
      type: object
      properties:
        id:
          type: string
          description: Relation ID of the connection to be saved as document connection.
            Must exist.
          format: uuid
          example: 4c32d3fb-0023-470c-ae21-105274a94706
        relationType:
          $ref: '#/components/schemas/ConnectionRelationType'
    BulkDocumentFullResponse:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkDocumentsResponse'
      - type: object
        properties:
          documents:
            type: array
            items:
              $ref: '#/components/schemas/DocumentV2'
    BulkDocumentIdsResponse:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkDocumentsResponse'
      - type: object
        properties:
          documents:
            type: array
            items:
              type: string
              format: uuid
    BulkDocumentsResponse:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BulkResponseType'
      discriminator:
        propertyName: type
        mapping:
          ids: '#/components/schemas/BulkDocumentIdsResponse'
          full: '#/components/schemas/BulkDocumentFullResponse'
    BulkPatchDocumentRequestItem:
      type: object
      properties:
        id:
          type: string
        operations:
          $ref: '#/components/schemas/JsonPatch'
    BulkPatchDocumentsRequest:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        documents:
          type: array
          description: List of documents to update
          items:
            $ref: '#/components/schemas/BulkPatchDocumentRequestItem'
    CountDocumentsResponse:
      type: object
      properties:
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
        results:
          type: array
          description: List of document counts
          items:
            $ref: '#/components/schemas/DocumentCountResponse'
    DocumentCountResponse:
      type: object
      properties:
        spaceId:
          type: string
          description: Space unique identifier
          format: uuid
        documents:
          type: integer
          description: Count of documents in the space which matched the filters
          format: int64
    CountDocumentsRequest:
      required:
      - ql
      type: object
      properties:
        spaces:
          type: array
          description: List of space IDs used to filter
          items:
            type: string
            format: uuid
        ql:
          type: string
          description: BTX Query Language filter expression.
    DocumentRequestV2:
      required:
      - category
      - status
      type: object
      properties:
        waitForComplete:
          type: boolean
          description: Whether the document needs to wait for call to /complete endpoint,
            after representations have been uploaded
          example: true
        description:
          type: string
          description: Description of the document.
          example: This is the invoice for your new phone
        source:
          type: string
          description: Source of the document.
          example: choruspro
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        tags:
          type: array
          description: Document tags
          example:
          - expensive
          items:
            type: string
            description: Document tags
            example: '["expensive"]'
        retentionTime:
          type: string
          description: Expiry datetime for the document
        connections:
          type: array
          description: List of connection information
          nullable: true
          items:
            $ref: '#/components/schemas/DocumentConnectionRequest'
        status:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/DocumentCategory'
        folder:
          $ref: '#/components/schemas/FolderV2'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/JsonBMap'
        parentDirectoryId:
          type: string
          description: Parent directory id
          format: uuid
          example: 4c32d3fb-0023-470c-ae21-105274a94706
        customCategories:
          type: object
          additionalProperties:
            uniqueItems: true
            type: array
            description: Document's custom categories
            example:
              purchases:
              - fuel
              - restaurant
            items:
              type: string
              description: Document's custom categories
              example: '{"purchases":["fuel","restaurant"]}'
          description: Document's custom categories
          example:
            purchases:
            - fuel
            - restaurant
        createdAt:
          type: string
          description: Date and time of the document creation, usable only for migration
            tools (with migration_service scope) to keep original creation time during
            data migration
          format: date-time
    ListDocumentsResponseV2:
      type: object
      properties:
        documents:
          type: array
          description: List of documents
          items:
            $ref: '#/components/schemas/DocumentV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListDocumentsQueryParamsSingle:
      type: object
      properties:
        category:
          type: string
          description: Document category to filter. Can be multiple values separated
            by comma, or just one value
          example: PURCHASE_ORDER,RECEIPT
        connectionName[istart]:
          type: string
          description: Value for filtering by connection name having a specific prefix
          example: UNI
        connectionName[icont]:
          type: string
          description: Value for filtering by connection name containing a specific
            string anywhere in the string value
          example: nif
        documentNumber[istart]:
          type: string
          description: Value for filtering by documentNumber property having a specific
            prefix
          example: NR
        documentNumber[icont]:
          type: string
          description: Value for filtering by documentNumber property containing a
            specific string anywhere in the string value
          example: NR
        status[ql]:
          type: string
          description: Status query language DSL
          example: (document=FULLY_APPROVED OR document=SENT) AND (pay=FULLY_PAID
            OR pay=PARTIALLY_PAID)
        customCategories[ql]:
          type: string
          description: Custom categories language DSL
          example: (purchases=fuel AND purchases=restaurant AND purchases=groceries)
            OR purchases=books
        processingData:
          type: string
          description: processingData query param
          example: 
            processingData=spaceExtensions/com.unifiedpost.btx.connectors/peppol/sbdhInstanceIdentifiers[any]=12345_118e3040-51d2-11e3-8f96-0800200c9a66,92345_118e3040-51d2-11e3-8f96-0800200c9a66
        folder:
          type: string
          description: Document folder to filter. Can be multiple values separated
            by comma, or just one value
          example: PURCHASES,STATEMENTS
        source:
          type: string
          description: Document source.
          example: documentCreator
        createdAt[eq]:
          type: string
          description: Created at equals specific timestamp, iso datetime format
          format: date-time
        createdAt[ne]:
          type: string
          description: Created at does not equal specific timestamp, iso datetime
            format
          format: date-time
        createdAt[lt]:
          type: string
          description: Created at is less than specific timestamp, iso datetime format
          format: date-time
        createdAt[lte]:
          type: string
          description: Created at is less or equal than specific timestamp, iso datetime
            format
          format: date-time
        createdAt[gt]:
          type: string
          description: Created at is greater than specific timestamp, iso datetime
            format
          format: date-time
        createdAt[gte]:
          type: string
          description: Created at is greater than specific timestamp, iso datetime
            format
          format: date-time
        dueDate[eq]:
          type: string
          description: Due date date equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[ne]:
          type: string
          description: Due date not equals to specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[gt]:
          type: string
          description: Due date greater than specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[gte]:
          type: string
          description: Due date greater or equal to a specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[lt]:
          type: string
          description: Due date less than a specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        dueDate[lte]:
          type: string
          description: Due date less than or equal to a specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[eq]:
          type: string
          description: Issue date date equals, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[ne]:
          type: string
          description: Issue date not equals to specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[gt]:
          type: string
          description: Issue date greater than specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[gte]:
          type: string
          description: Issue date greater or equal to a specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[lt]:
          type: string
          description: Issue date less than a specific date, in format yyyy-MM-dd
          format: date
          example: 2024-04-15
        issueDate[lte]:
          type: string
          description: Issue date less than or equal to a specific date, in format
            yyyy-MM-dd
          format: date
          example: 2024-04-15
        grossAmount[eq]:
          type: number
          description: Gross amount equal to
          example: 12.25
        grossAmount[ne]:
          type: number
          description: Gross amount not equal
          example: 12.25
        grossAmount[gt]:
          type: number
          description: Gross amount greater than
          example: 12.25
        grossAmount[gte]:
          type: number
          description: Gross amount greater than or equal to
          example: 12.25
        grossAmount[lt]:
          type: number
          description: Gross amount less than
          example: 12.25
        grossAmount[lte]:
          type: number
          description: Gross amount less than or equal to
          example: 12.25
        payableAmount[eq]:
          type: number
          description: Payable amount equal to
          example: 12.25
        payableAmount[ne]:
          type: number
          description: Payable amount not equal
          example: 12.25
        payableAmount[gt]:
          type: number
          description: Payable amount greater than
          example: 12.25
        payableAmount[gte]:
          type: number
          description: Payable amount greater than or equal to
          example: 12.25
        payableAmount[lt]:
          type: number
          description: Payable amount less than
          example: 12.25
        payableAmount[lte]:
          type: number
          description: Payable amount less than or equal to
          example: 12.25
        netAmount[eq]:
          type: number
          description: Net amount equal to
          example: 12.25
        netAmount[ne]:
          type: number
          description: Net amount not equal
          example: 12.25
        netAmount[gt]:
          type: number
          description: Net amount greater than
          example: 12.25
        netAmount[gte]:
          type: number
          description: Net amount greater than or equal to
          example: 12.25
        netAmount[lt]:
          type: number
          description: Net amount less than
          example: 12.25
        netAmount[lte]:
          type: number
          description: Net amount less than or equal to
          example: 12.25
        vatAmount[eq]:
          type: number
          description: VAT amount equal to
          example: 12.25
        vatAmount[ne]:
          type: number
          description: VAT amount not equal
          example: 12.25
        vatAmount[gt]:
          type: number
          description: VAT amount greater than
          example: 12.25
        vatAmount[gte]:
          type: number
          description: VAT amount greater than or equal to
          example: 12.25
        vatAmount[lt]:
          type: number
          description: VAT amount less than
          example: 12.25
        vatAmount[lte]:
          type: number
          description: VAT amount less than or equal to
          example: 12.25
        tags[in]:
          type: string
          description: Filter documents that contain any of the specified comma-separated
            tags
          example: tag1,tag2
        tags[notIn]:
          type: string
          description: Exclude documents that contain any of the specified comma-separated
            tags
          example: tag1,tag2
        balanceOffsets.aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        description:
          type: string
          description: Description of document
          example: My invoice
        updatedAt[eq]:
          type: string
          description: Updated at equals specific timestamp, iso datetime format
          format: date-time
        updatedAt[ne]:
          type: string
          description: Updated at does not equal specific timestamp, iso datetime
            format
          format: date-time
        updatedAt[lt]:
          type: string
          description: Updated at is less than specific timestamp, iso datetime format
          format: date-time
        updatedAt[lte]:
          type: string
          description: Updated at is less or equal than specific timestamp, iso datetime
            format
          format: date-time
        updatedAt[gt]:
          type: string
          description: Updated at is greater than specific timestamp, iso datetime
            format
          format: date-time
        updatedAt[gte]:
          type: string
          description: Updated at is greater than specific timestamp, iso datetime
            format
          format: date-time
        addIncomplete:
          type: boolean
          description: Flag to include documents with status wait_for_complete in
            response. Default is that documents with wait_for_complete are excluded.
    DocumentInclude:
      type: string
      description: The possible linked resources to include
      example: lines
      enum:
      - lines
      - tasks
      - connections
      - timestamps
      - rawData
      - rawLines
      - processingData
      - validationData
      - customCategories
      - balanceOffsets
    MoveDocumentToDirectoryRequest:
      type: object
      properties:
        parentDirectoryId:
          type: string
          description: Parent directory identifier
          format: uuid
          example: 44d929f7-952d-4283-9010-8a63a16831b3
    DocumentPatchRequestV2:
      type: object
      properties:
        description:
          type: string
          description: Description of the document.
          nullable: true
          example: This is the invoice for your new phone
        source:
          type: string
          description: Source of the document.
          nullable: true
          example: choruspro
        metadata:
          $ref: '#/components/schemas/JsonBMapNullable'
        tags:
          type: array
          description: Document tags
          nullable: true
          example:
          - expensive
          items:
            type: string
        retentionTime:
          type: string
          description: Expiry datetime for the document
          nullable: true
        status:
          $ref: '#/components/schemas/JsonBMapNullable'
        folder:
          $ref: '#/components/schemas/FolderV2'
        category:
          $ref: '#/components/schemas/DocumentCategory'
        lines:
          type: array
          description: List of line data
          nullable: true
          items:
            $ref: '#/components/schemas/JsonBMap'
        connections:
          type: array
          description: List of connection data
          nullable: true
          items:
            $ref: '#/components/schemas/DocumentConnectionRequest'
        customCategories:
          type: object
          additionalProperties:
            uniqueItems: true
            type: array
            description: Custom categories to replace
            nullable: true
            example:
              purchases:
              - fuel
              - restaurant
            items:
              type: string
              description: Custom categories to replace
              nullable: true
              example: '{"purchases":["fuel","restaurant"]}'
          description: Custom categories to replace
          nullable: true
          example:
            purchases:
            - fuel
            - restaurant
        createdAt:
          type: string
          description: Date and time of the document creation, usable only for migration
            tools (with migration_service scope) to keep original creation time during
            data migration
          format: date-time
    ExtensionDocumentStatus:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        type: object
    DocumentPaymentDetailsListItemV2:
      required:
      - status
      type: object
      properties:
        id:
          type: string
          description: id of document
          format: uuid
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        status:
          $ref: '#/components/schemas/JsonBMap'
        tasks:
          type: array
          description: tasks
          items:
            $ref: '#/components/schemas/TaskResult'
        supplier:
          $ref: '#/components/schemas/Supplier'
        category:
          $ref: '#/components/schemas/DocumentCategory'
    DocumentPaymentDetailsResultListV2:
      type: object
      properties:
        documents:
          type: array
          description: List of response document payment details
          items:
            $ref: '#/components/schemas/DocumentPaymentDetailsListItemV2'
    DocumentPaymentDetailsRequestV2:
      type: object
      properties:
        documents:
          type: array
          description: List of document IDs
          items:
            type: string
            format: uuid
    BusinessConnectionDetailsResultV2:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionV2'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionV2:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionV2 / BusinessConnectionV2
          example: person
          enum:
          - business
          - person
        id:
          type: string
          description: Connection ID
          format: uuid
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          items:
            type: string
            description: Tags
        active:
          type: boolean
          description: Active / Not active
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Connectors of this connection.
          items:
            $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts linked to connection
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccountListItem'
        displayName:
          type: string
          description: Display name
      description: discriminator to determine PersonConnectionV2 / BusinessConnectionV2
      example: person
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessConnectionDetailsResultV2'
          person: '#/components/schemas/PersonConnectionDetailsResultV2'
    PersonConnectionDetailsResultV2:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionV2'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    BusinessConnectionRequestV2:
      required:
      - businessType
      - relationTypes
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequestV2'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionPaymentAccountItemV2:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        isDefault:
          type: boolean
          description: Is default payment account of connection. If multiple with
            default=true => 400 response. If one without isDefault set, will consider
            'true'.
          default: true
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account.
      example:
        identifier: BE19519469892112
        scheme: IBAN
        bank:
          identifier: ABNABE2AIDJ
          scheme: BIC
        country: BE
        currency: EUR
        isDefault: true
        financialPlatformId: platform-xyz
    ConnectionRequestV2:
      required:
      - relationTypes
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionRequestV2 / BusinessConnectionRequestV2
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: Tags
            example: '["tag1","tag2"]'
        active:
          type: boolean
          description: Active / Not active
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Array of connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccountItemV2'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonConnectionRequestV2'
          business: '#/components/schemas/BusinessConnectionRequestV2'
    PersonConnectionRequestV2:
      required:
      - relationTypes
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequestV2'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    ConnectionInclude:
      type: string
      description: The possible linked resources to include
      example: paymentAccounts
      enum:
      - paymentAccounts
    ListConnectionsResponseV2:
      type: object
      properties:
        connections:
          type: array
          description: List of connections
          items:
            $ref: '#/components/schemas/ConnectionV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListConnectionsQueryParamsSingle:
      type: object
      properties:
        name[eq]:
          type: string
          description: 'Exact match on name fields only (Case insensitive). Scope:
            Legal Name, Trade Name, First Name, Last Name.'
        search[eq]:
          type: string
          description: 'Exact match on names and identifiers (Case insensitive). Scope:
            Legal Name, Trade Name, First Name, Last Name, Alias, Local Identifier
            (Assigned Account ID), Global Identifiers.'
        search[cont]:
          type: string
          description: 'Substring (partial) match on names and identifiers (Case insensitive).
            Scope: Legal Name, Trade Name, First Name, Last Name, Alias, Local Identifier
            (Assigned Account ID), Global Identifiers.'
        search[has]:
          type: string
          description: 'Word/Token match on names and identifiers (Full Text Search).
            Finds records containing the input as a distinct word. Scope: Legal Name,
            Trade Name, First Name, Last Name, Alias, Local Identifier (Assigned Account
            ID), Global Identifiers.'
        identifierValue:
          type: string
          description: Connection identifier (e.g. VAT number)
        name:
          type: string
          description: Connection name for searching
        search:
          type: string
          description: Global search parameter. Supports partial matching for names
            (business/person) and strict matching for identifiers/aliases.
        type:
          type: string
        countryCode:
          type: string
          description: Connection address country code for searching
          example: BE
        assignedAccountId:
          type: string
          description: Assigned account id for searching (supports partial matches)
          example: '00044'
        businessType:
          type: string
        metadata[ql]:
          type: string
          description: Metadata query language DSL
          example: metadata[ql]=selfBilling[exists]=true
        ql:
          type: string
    ConnectorsRequestV2:
      type: object
      properties:
        connectors:
          type: array
          description: Array of connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
    BusinessConnectionPatchRequestV2:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionPatchRequestV2'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
            nullable: true
          tradeName:
            type: string
            description: Trade name of business
            nullable: true
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionPatchRequestV2:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionPatchRequestV2 /
            BusinessConnectionPatchRequestV2
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
          nullable: true
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMapNullable'
        assignedAccountId:
          type: string
          description: Assigned Account Id
          nullable: true
        alias:
          type: string
          description: Nickname for the connection
          nullable: true
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          nullable: true
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Connection addresses
          nullable: true
        tags:
          type: array
          description: Tags
          nullable: true
          example:
          - tag1
          - tag2
          items:
            type: string
        active:
          type: boolean
          description: Active / Not active
          nullable: true
        metadata:
          $ref: '#/components/schemas/JsonBMapNullable'
        paymentAccount:
          $ref: '#/components/schemas/ConnectionPaymentAccountData'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonConnectionPatchRequestV2'
          business: '#/components/schemas/BusinessConnectionPatchRequestV2'
    ConnectionPaymentAccountData:
      type: object
      properties:
        id:
          type: string
          description: Payment account id
          format: uuid
          example: 34663a97-35ae-4cb7-80a2-71050b7c1a80
        isDefault:
          type: boolean
          description: Is default payment account of connection.
        financialPlatformId:
          type: string
          description: Optional identifier of the financial platform associated with
            this payment account. Passing null clears the existing value.
      description: Payment account to be set or unset as default
      nullable: true
    PersonConnectionPatchRequestV2:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionPatchRequestV2'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
            nullable: true
          lastName:
            type: string
            description: Person last name
            nullable: true
    BulkPaymentDetailsV2:
      required:
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE, if it
            has a parent. For BULK payments parentPaymentId should be null.
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        feeAmount:
          $ref: '#/components/schemas/AmountDto'
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        childrenPayments:
          type: array
          description: Children SINGLE payments in case current payment is of type
            BULK. For SINGLE payments, this will be null.
          items:
            $ref: '#/components/schemas/PaymentDetailsV2'
    BulkPaymentTransactionsV2:
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        paymentTransactions:
          type: array
          items:
            $ref: '#/components/schemas/PaymentTransactionResult'
    ListBulkPaymentsDetailsV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/ListBulkPaymentsV2'
      - type: object
        properties:
          payments:
            type: array
            description: List of payments details.
            items:
              $ref: '#/components/schemas/BulkPaymentDetailsV2'
    ListBulkPaymentsResponseOptionsType:
      type: string
      description: Get bulk payments response type
      example: PAYMENT_TRANSACTIONS
      enum:
      - PAYMENT_DETAILS
      - PAYMENT_TRANSACTIONS
    ListBulkPaymentsTransactionsV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/ListBulkPaymentsV2'
      - type: object
        properties:
          payments:
            type: array
            description: List of payments with transactions. Only those payments that
              have transactions will be included.
            items:
              $ref: '#/components/schemas/BulkPaymentTransactionsV2'
    ListBulkPaymentsV2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ListBulkPaymentsResponseOptionsType'
      discriminator:
        propertyName: type
        mapping:
          PAYMENT_DETAILS: '#/components/schemas/ListBulkPaymentsDetailsV2'
          PAYMENT_TRANSACTIONS: '#/components/schemas/ListBulkPaymentsTransactionsV2'
    PaymentDetailsV2:
      required:
      - status
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
      description: Children SINGLE payments in case current payment is of type BULK.
        For SINGLE payments, this will be null.
    ListBulkPaymentsRequestV2:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/ListBulkPaymentsResponseOptions'
        payments:
          uniqueItems: true
          type: array
          description: List of payment ids to retrieve
          items:
            type: string
            format: uuid
    ListBulkPaymentsResponseOptions:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ListBulkPaymentsResponseOptionsType'
      description: Response options
    BulkPaymentFullV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentV2'
      - type: object
        properties:
          payments:
            type: array
            items:
              $ref: '#/components/schemas/PaymentV2'
    BulkPaymentIdsV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/BulkPaymentV2'
      - type: object
        properties:
          payments:
            type: array
            items:
              type: string
              format: uuid
    BulkPaymentV2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/BulkResponseType'
      discriminator:
        propertyName: type
        mapping:
          ids: '#/components/schemas/BulkPaymentIdsV2'
          full: '#/components/schemas/BulkPaymentFullV2'
    PaymentV2:
      required:
      - status
      - type
      type: object
      properties:
        id:
          type: string
          description: id of payment
          format: uuid
        spaceId:
          type: string
          description: Space id
          format: uuid
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE, if it
            has a parent. For BULK payments parentPaymentId should be null.
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        feeAmount:
          $ref: '#/components/schemas/AmountDto'
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        childrenPayments:
          type: array
          description: Children SINGLE payments in case current payment is of type
            BULK. For SINGLE payments, this will be null.
          items:
            $ref: '#/components/schemas/PaymentDetailsV2'
        balanceOffsets:
          uniqueItems: true
          type: array
          description: Balance offsets
          items:
            $ref: '#/components/schemas/BalanceOffsetResult'
        processingData:
          $ref: '#/components/schemas/JsonBMap'
    BulkPaymentRequestV2:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentRequestV2'
    PaymentRequestV2:
      required:
      - status
      - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PaymentType'
        operationType:
          $ref: '#/components/schemas/OperationType'
        parentPaymentId:
          type: string
          description: Id of parent payment, in case current payment is part of a
            bulk payment operation. Type of current payment should be SINGLE.
          format: uuid
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        feeAmount:
          $ref: '#/components/schemas/AmountDto'
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive.
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        paymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/NamedPaymentAccountDto'
    DocToDocPaymentRequestV2:
      required:
      - status
      type: object
      properties:
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        feeAmount:
          $ref: '#/components/schemas/AmountDto'
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        reference:
          type: string
          description: Reference details filled in by the payer when making the payment.
            It can have a fixed format depending on the country.
        status:
          $ref: '#/components/schemas/JsonBMap'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        balanceOffset:
          $ref: '#/components/schemas/CommonBalanceOffset'
        creditorDocument:
          $ref: '#/components/schemas/Document'
        debtorDocument:
          $ref: '#/components/schemas/Document'
    BulkUpdatePaymentRequestItemV2:
      type: object
      properties:
        id:
          type: string
        operations:
          $ref: '#/components/schemas/JsonPatch'
    BulkUpdatePaymentRequestV2:
      type: object
      properties:
        responseOptions:
          $ref: '#/components/schemas/BulkResponseOptions'
        payments:
          type: array
          description: List of payments to update
          items:
            $ref: '#/components/schemas/BulkUpdatePaymentRequestItemV2'
    ListPaymentsResponseV2:
      type: object
      properties:
        payments:
          type: array
          description: List of payments
          items:
            $ref: '#/components/schemas/PaymentV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListPaymentsParamsSingle:
      required:
      - type
      type: object
      properties:
        endToEndId:
          type: string
          description: End to end id, according to PSD2 directive
          example: 0a2e9932-a660-4354-82a9-b5c0897f5887
        operationType:
          $ref: '#/components/schemas/OperationType'
        originatingAmountValue[eq]:
          type: number
          description: Amount value equals
          example: 12.25
        originatingAmountValue[ne]:
          type: number
          description: Amount value not equals
          example: 12.25
        originatingAmountValue[gt]:
          type: number
          description: Amount value greater than
          example: 11.25
        originatingAmountValue[gte]:
          type: number
          description: Amount value greater than or equal
          example: 11.25
        originatingAmountValue[lt]:
          type: number
          description: Amount value less than
          example: 11.25
        originatingAmountValue[lte]:
          type: number
          description: Amount value less than or equal
          example: 13.25
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        reference:
          type: string
          description: Reference
          example: Invoice abc
        type:
          $ref: '#/components/schemas/PaymentType'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        balanceOffsets.aggregationStatus:
          $ref: '#/components/schemas/AggregationStatus'
        processingData:
          type: string
          description: processingData query param
          example: 
            processingData=spaceExtensions/com.unifiedpost.btx.payments/aggregation/unmatched=true
        counterpartyPaymentAccount.identifier[istart]:
          type: string
          description: Filter by counterparty payment account identifier having a
            specific prefix
          example: BE9
        counterpartyPaymentAccount.identifier[icont]:
          type: string
          description: Filter by counterparty payment account identifier containing
            a specific string
          example: '954'
        counterpartyPaymentAccount.ownerName:
          type: string
          description: Filter by counterparty payment account’s owner name
          example: Amazon
        createdAt[eq]:
          type: string
          description: Created at equals specific timestamp, iso datetime format
          format: date-time
        createdAt[ne]:
          type: string
          description: Created at does not equal specific timestamp, iso datetime
            format
          format: date-time
        createdAt[lt]:
          type: string
          description: Created is less than specific timestamp, iso datetime format
          format: date-time
        createdAt[lte]:
          type: string
          description: Created is less or equal than specific timestamp, iso datetime
            format
          format: date-time
        createdAt[gt]:
          type: string
          description: Created is greater than specific timestamp, iso datetime format
          format: date-time
        createdAt[gte]:
          type: string
          description: Created is greater than specific timestamp, iso datetime format
          format: date-time
        reconciliableReference:
          type: string
          description: List of payment's reconciliable references contains given value
        ql:
          type: string
    UpdatePaymentRequestV2:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/JsonBMapNullable'
        levelOfCertainty:
          $ref: '#/components/schemas/LevelOfCertainty'
        source:
          $ref: '#/components/schemas/PaymentSource'
        reconciliableReferences:
          type: array
          description: Specifies additional references that can be matched to this
            payment with 100% certainty.
          items:
            type: string
            description: Specifies additional references that can be matched to this
              payment with 100% certainty.
        originatingAmount:
          $ref: '#/components/schemas/AmountDto'
        counterpartyAmount:
          $ref: '#/components/schemas/AmountDto'
        feeAmount:
          $ref: '#/components/schemas/AmountDto'
        endToEndId:
          type: string
          description: End to end id.
    AssetResult:
      type: object
      properties:
        id:
          type: string
          description: file identifier
          example: 00000003-0000-0000-0000-000000000000
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type
          example: user
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14T19:58:47Z
        status:
          $ref: '#/components/schemas/AssetStatus'
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        contentUrl:
          type: string
          description: content URL
          example: https://storage.googleapis.com/this-bucket/this-object
        uploadUrl:
          type: string
          description: upload URL
          example: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/Category'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    AssetStatus:
      type: string
      description: Status of asset
      example: AWAITING_UPLOAD
      enum:
      - AWAITING_UPLOAD
      - VIRUS_SCANNING
      - VIRUS_SCANNED
      - VIRUS_ERROR
      - PROCESSING
      - PROCESSED
      - ERROR
    Category:
      type: string
      description: Category of asset
      example: BRAND
      enum:
      - BRAND
      - QUOTE
      - INVOICE
    AssetRequest:
      required:
      - category
      - contentType
      - fileType
      - filename
      type: object
      properties:
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14T19:58:47Z
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        contentType:
          type: string
          description: content type
          example: application/xml
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        fileType:
          type: string
          description: file type
          example: xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject. It is required if creator type is provided
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type. It is required if creator subject is provided
          example: user
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/Category'
    AllAssetResult:
      type: object
      properties:
        assets:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/AssetResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    CategoryResponse:
      type: object
      properties:
        value:
          type: string
          description: Category value
          example: '1'
    CategoryRequest:
      required:
      - value
      type: object
      properties:
        value:
          type: string
          description: Category value
          example: restaurant
    ListCategoriesResponse:
      type: object
      properties:
        values:
          type: array
          description: List of category values
          items:
            type: string
    CategoryStatusResponse:
      required:
      - active
      type: object
      properties:
        active:
          type: boolean
          description: Whether category value is active or inactive
          example: true
    ReplaceCategoryStatusRequest:
      required:
      - active
      type: object
      properties:
        active:
          type: boolean
          description: Whether category should be set as active or inactive
          example: true
    CategoryValueResponse:
      type: object
      properties:
        value:
          type: string
          description: Value of category
    UpdateCategoryValueRequest:
      type: object
      properties:
        oldValue:
          type: string
          description: Old value of category
        newValue:
          type: string
          description: New value of category
    BusinessConnectionDetailsResultV3:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionV3'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionV3:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionV3 / BusinessConnectionV3
          example: person
          enum:
          - business
          - person
        id:
          type: string
          description: Connection ID
          format: uuid
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LenientIso20022StructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          items:
            type: string
            description: Tags
        active:
          type: boolean
          description: Active / Not active
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Connectors of this connection.
          items:
            $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts linked to connection
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccountListItem'
        displayName:
          type: string
          description: Display name
      description: discriminator to determine PersonConnectionV3 / BusinessConnectionV3
      example: person
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessConnectionDetailsResultV3'
          person: '#/components/schemas/PersonConnectionDetailsResultV3'
    LenientIso20022StructuredAddress:
      type: object
      properties:
        country:
          type: string
          description: Nation with its own government, expressed as a two letter ISO
            3166 code (alpha-2) of the country. The country code is written in upper
            case.
          example: BE
        townName:
          type: string
          description: Name of a built-up area, with defined boundaries, and a local
            government.
          example: La Hulpe
        addressType:
          type: string
          description: Identifies the nature of the postal address.
          example: ADDR
          enum:
          - ADDR
          - PBOX
          - HOME
          - BIZZ
          - MLTO
          - DLVY
        streetName:
          maxLength: 140
          type: string
          description: Name of a street or thoroughfare.
          example: Avenue Reine Astrid
        buildingNumber:
          maxLength: 16
          type: string
          description: A unique number assigned to the building in the street or area
            //Number that identifies the position of a building on a street.
          example: '40'
        careOf:
          maxLength: 140
          type: string
          description: Identifies an addressee that is accepting the correspondence
            for the intended recipient. Using care of ensures the correspondence reaches
            the right recipient rather than getting returned to the sender.
          example: Finance
        department:
          maxLength: 70
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
        subDepartment:
          maxLength: 70
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
        buildingName:
          maxLength: 140
          type: string
          description: Name of the building or house.
          example: Empire State Building
        floor:
          maxLength: 70
          type: string
          description: Floor or storey within a building.
          example: ground
        unitNumber:
          maxLength: 16
          type: string
          description: Identifies a flat or dwelling within the building.
          example: '2'
        postBox:
          maxLength: 16
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1003'
        room:
          maxLength: 70
          type: string
          description: Building room number.
          example: '2.22'
        postCode:
          maxLength: 16
          type: string
          description: Identifier consisting of a group of letters and/or numbers
            that is added to a postal address to assist the sorting of mail.
          example: '1310'
        townLocationName:
          maxLength: 140
          type: string
          description: Specific location name within the town. eg Borough (USA), Village
            (GB).
          example: Miami Beach
        districtName:
          maxLength: 140
          type: string
          description: Identifies a subdivision within a country sub-division eg County
            (USA), Landkreis (DE).
          example: Miami-Dade, Coburg
        countrySubDivision:
          maxLength: 35
          type: string
          description: Identifies a subdivision of a country such as state (USA),
            Bundesland (DE), region, province,....
          example: Florida, Bayern, Wallonia, Hainaut
      description: Information that locates and identifies a specific address, as
        defined by postal services
      nullable: true
      externalDocs:
        description: More about EPC Interbank Structured Address Structure; see also
          PostalAddress27 type in https://www.iso20022.org/message/22905/download
        url: 
          https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
    PersonConnectionDetailsResultV3:
      required:
      - active
      - connectionStatus
      - displayName
      - id
      - spaceUrl
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionV3'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    BusinessConnectionRequestV3:
      required:
      - businessType
      - relationTypes
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequestV3'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionRequestV3:
      required:
      - relationTypes
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionRequestV3 / BusinessConnectionRequestV3
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        assignedAccountId:
          type: string
          description: Assigned Account Id
        alias:
          type: string
          description: Nickname for the connection
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LenientIso20022StructuredAddress'
          description: Connection addresses
        tags:
          type: array
          description: Tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: Tags
            example: '["tag1","tag2"]'
        active:
          type: boolean
          description: Active / Not active
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        connectors:
          type: array
          description: Array of connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
        paymentAccounts:
          uniqueItems: true
          type: array
          description: Payment accounts
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccountItemV2'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonConnectionRequestV3'
          business: '#/components/schemas/BusinessConnectionRequestV3'
    PersonConnectionRequestV3:
      required:
      - relationTypes
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionRequestV3'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    ListConnectionsResponseV3:
      type: object
      properties:
        connections:
          type: array
          description: List of connections
          items:
            $ref: '#/components/schemas/ConnectionV3'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    ListConnectionsQueryParamsSingleV3:
      type: object
      properties:
        name[eq]:
          type: string
          description: 'Exact match on name fields only (Case insensitive). Scope:
            Legal Name, Trade Name, First Name, Last Name.'
        search[eq]:
          type: string
          description: 'Exact match on names and identifiers (Case insensitive). Scope:
            Legal Name, Trade Name, First Name, Last Name, Alias, Local Identifier
            (Assigned Account ID), Global Identifiers.'
        search[cont]:
          type: string
          description: 'Substring (partial) match on names and identifiers (Case insensitive).
            Scope: Legal Name, Trade Name, First Name, Last Name, Alias, Local Identifier
            (Assigned Account ID), Global Identifiers.'
        search[has]:
          type: string
          description: 'Word/Token match on names and identifiers (Full Text Search).
            Finds records containing the input as a distinct word. Scope: Legal Name,
            Trade Name, First Name, Last Name, Alias, Local Identifier (Assigned Account
            ID), Global Identifiers.'
        identifierValue:
          type: string
          description: Connection identifier (e.g. VAT number)
        name:
          type: string
          description: Connection name for searching
        search:
          type: string
          description: Global search parameter. Supports partial matching for names
            (business/person) and strict matching for identifiers/aliases.
        type:
          type: string
        countryCode:
          type: string
          description: Connection address country code for searching
          example: BE
        assignedAccountId:
          type: string
          description: Assigned account id for searching (supports partial matches)
          example: '00044'
        businessType:
          type: string
        metadata[ql]:
          type: string
          description: Metadata query language DSL
          example: metadata[ql]=selfBilling[exists]=true
        ql:
          type: string
    ConnectorsRequestV3:
      type: object
      properties:
        connectors:
          type: array
          description: Array of connectors
          items:
            $ref: '#/components/schemas/JsonBMap'
    BusinessConnectionPatchRequestV3:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionPatchRequestV3'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
            nullable: true
          tradeName:
            type: string
            description: Trade name of business
            nullable: true
          businessType:
            $ref: '#/components/schemas/BusinessConnectionType'
    ConnectionPatchRequestV3:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: discriminator to determine PersonConnectionPatchRequestV3 /
            BusinessConnectionPatchRequestV3
          example: person
          enum:
          - business
          - person
        spaceUrl:
          type: string
          description: URL to the BTX Space endpoint of this connection in the connection's
            entity store
          nullable: true
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMapNullable'
        assignedAccountId:
          type: string
          description: Assigned Account Id
          nullable: true
        alias:
          type: string
          description: Nickname for the connection
          nullable: true
        connectionStatus:
          $ref: '#/components/schemas/ConnectionStatus'
        relationTypes:
          uniqueItems: true
          type: array
          description: Relation types of this connection
          nullable: true
          items:
            $ref: '#/components/schemas/ConnectionRelationType'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/LenientIso20022StructuredAddress'
          description: Connection addresses
          nullable: true
        tags:
          type: array
          description: Tags
          nullable: true
          example:
          - tag1
          - tag2
          items:
            type: string
        active:
          type: boolean
          description: Active / Not active
          nullable: true
        metadata:
          $ref: '#/components/schemas/JsonBMapNullable'
        paymentAccount:
          $ref: '#/components/schemas/ConnectionPaymentAccountData'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonConnectionPatchRequestV3'
          business: '#/components/schemas/BusinessConnectionPatchRequestV3'
    PersonConnectionPatchRequestV3:
      required:
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionPatchRequestV3'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
            nullable: true
          lastName:
            type: string
            description: Person last name
            nullable: true
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.uat.btx.fr.banqup.com/oauth2/auth
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
