openapi: 3.0.1
info:
  description: The Business Solution API
  title: Business Solution API
  version: 1.8.0
servers:
- description: Generated server url
  url: https://api.btx.fr.banqup.com/solution
- description: Generated server url
  url: https://api.btx.eu.banqup.com/solution
security:
- oauth2: []
paths:
  /business/v1/spaces:
    get:
      description: 'Get the list of spaces the current user has access to. <br/> Scope:
        []'
      operationId: listSpaces
      responses:
        '200':
          content:
            application/json:
              examples:
                SpaceBasicInfo:
                  description: SpaceBasicInfo
                  value: "{\n\"spaces\": [\n\t{\n\t\"baseUrl\": \"https://api.eu.btx.banqup.com/\"\
                    ,\n\t\"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n\
                    \t\"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n\t\"name\"\
                    : \"John\",\n\t\"region\": \"FR\",\n\t\"type\": \"APPLICATION\"\
                    \n\t},\n\t{\n\t\"baseUrl\": \"https://api.eu.btx.banqup.com/\"\
                    ,\n\t\"entityId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n\
                    \t\"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n\t\"name\"\
                    : \"Milo\",\n\t\"region\": \"FR\",\n\t\"type\": \"BUSINESS\",\n\
                    \t}\n],\n\"unavailableRegions\": [\n\t\"eu\"\n]\n}"
              schema:
                $ref: '#/components/schemas/SpacesListingResponse'
          description: The list of spaces
      summary: List spaces
      tags:
      - Spaces
  /business/v1/spaces/{spaceId}/documents/{documentId}/documentNumbers:create:
    post:
      description: |-
        Generates a unique document number for the document. The document numbers are sequential and unique within the space.
         <br/> Scope: space_read
      operationId: generateDocumentNumber
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: documentId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateDocumentNumberRequest'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentNumberResult'
          description: The generated number
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Access denied
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: No matching representation found
      security:
      - oauth2:
        - space_read
      summary: Generate the document number
      tags:
      - Documents
  /business/v1/spaces/{spaceId}/documents:calculate:
    post:
      description: 'Evaluates the provided document and calculates both the lines
        and document metadata. <br/> Scope: space_read'
      operationId: calculateDocument
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentCalculationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentCalculationResponse'
          description: The calculated document
      security:
      - oauth2:
        - space_read
      summary: Calculate document data
      tags:
      - Documents
  /business/v1/spaces/{spaceId}/documents:paymentSummary:
    post:
      description: |-
        For each indicated document, a list of payments linked to it is returned.
        Payments can be filtered by status so that clients can see all payments, already executed payments or payments that are planned or in progress but have not yet affected the open balance of the document.
         <br/> Scope: space_read
      operationId: createDocumentsPaymentSummary_1
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentSummaryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentSummaryResult'
          description: Document payment details
      security:
      - oauth2:
        - space_read
      summary: Provides a summary of the payments that the selected document(s) may
        have produced
      tags:
      - Documents
  /business/v1/spaces/{spaceId}/levelOfAssurance:ensure:
    post:
      description: 'Check the current Level of Assurance for the entity, and trigger
        a KYC flow <br/> Scope: []'
      operationId: checkLevelOfAssurance
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssuranceLevelRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssuranceLevelResultWithHttpStatus'
          description: Level of Assurance is already valid
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssuranceLevelResultWithHttpStatus'
          description: KYC flow started
      summary: Level of Assurance
      tags:
      - Spaces
  /business/v1/spaces/{spaceId}/network/connections:
    post:
      description: 'Created connection on the given space with generated local identifier
        <br/> Scope: space_write'
      operationId: createConnection
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            examples:
              BusinessConnection:
                description: BusinessConnection
                value:
                  type: BUSINESS
                  globalIdentifiers:
                    fr:siren: '530514157'
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:en: '0400282475'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  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
                    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
              PersonConnection:
                description: PersonConnection
                value:
                  type: PERSON
                  globalIdentifiers:
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  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
                  firstName: John
                  lastName: Doe
            schema:
              $ref: '#/components/schemas/ConnectionInput'
        description: Connection to add
        required: true
      responses:
        '201':
          content:
            application/json:
              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
              schema:
                $ref: '#/components/schemas/ConnectionDetails'
          description: Connection was created successfully.
        '403':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Permission Denied
        '409':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Conflicted space locked setting
        '422':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Unprocessable Entity
      security:
      - oauth2:
        - space_write
      summary: Create connection on the given space
      tags:
      - Connections
  /business/v1/spaces/{spaceId}/network/connections/template:
    get:
      description: "Download import business partners template on the given space.
        Use the Accept header to request the desired format: 'text/csv' (default)
        or 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' for
        Excel. <br/> Scope: space_read"
      operationId: downloadImportConnectionsTemplate
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: header
        name: Accept
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
            text/csv:
              schema:
                type: string
                format: binary
          description: Template file (CSV by default, or XLSX when requested via Accept
            header).
        '403':
          content:
            application/json:
              schema:
                type: string
                format: binary
          description: Permission Denied
        '422':
          content:
            application/json:
              schema:
                type: string
                format: binary
          description: Unprocessable Entity
      security:
      - oauth2:
        - space_read
      summary: Download import business partners template on the given space
      tags:
      - Connections
  /business/v1/spaces/{spaceId}/network/connections/{connectionId}:
    patch:
      description: 'Update the connection by its ID on the given space <br/> Scope:
        space_write'
      operationId: updateConnection
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: connectionId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            examples:
              BusinessUpdateConnection:
                description: BusinessUpdateConnection
                value:
                  type: business
                  globalIdentifiers:
                    fr:siren: '530514157'
                    fr:siret: '53051415700029'
                    nl:kvk: '87654321'
                    be:en: '0400282475'
                    be:vat: BE0400282475
                    global:email:
                    - john@example.com
                    global:phoneNumber:
                    - '+1234567890'
                  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
                  legalName: Unifiedpost Group
                  tradeName: unifiedpost
                  businessType: ENTERPRISE
              PersonUpdateConnection:
                description: PersonUpdateConnection
                value: "{\n  \"type\" : \"PERSON\",\n  \"globalIdentifiers\" : {\n\
                  \t\"global:email\" : [ \"john@example.com\" ],\n\t\"global:phoneNumber\"\
                  \ : [ \"+1234567890\" ]\n  },\n  \"alias\" : \"UP\",\n  \"connectionStatus\"\
                  \ : \"CONNECTED\",\n  \"relationTypes\" : [ \"CUSTOMER\" ],\n  \"\
                  addresses\" : {\n\t\"main\" : {\n\t  \"addressType\": \"BIZZ\",\n\
                  \t  \"streetName\": \"Milo Crossroad\",\n\t  \"buildingNumber\"
                  : \"80728\",\n\t  \"postCode\": \"3110\",\n\t  \"townName\": \"\
                  Fernandahaven\",\n\t  \"country\": \"BE\"\n  },\n  \"tags\" : [
                  \"favorite\", \"liked\" ],\n  \"active\" : true,\n  \"metadata\"\
                  \ : {\n\t\"channels\" : {\n\t  \"main\" : \"delivery_on_platform\"\
                  ,\n\t  \"secondary\" : \"email\"\n\t},\n\t\"department\" : \"Accounting\"\
                  ,\n\t\"logo\" : \"https://somelinks.com/logo.jpg\",\n\t\"website\"\
                  \ : \"https://mycompanywebsite.com\",\n\t\"notes\" : \"some notes\"\
                  ,\n\t\"industry\" : \"Agriculture, Forestry And Fishing\"\n  },\n\
                  \  \"firstName\" : \"John\",\n  \"lastName\" : \"Doe\"\n}"
            schema:
              $ref: '#/components/schemas/UpdateConnectionInput'
        description: Connection to update
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                Business Update Connection:
                  description: Business Update 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 Update Connection:
                  description: Person Update 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
              schema:
                $ref: '#/components/schemas/UpdateConnectionInput'
          description: Connection was updated successfully.
        '403':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Permission Denied
        '409':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Conflicted space locked setting
        '422':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ConnectionDetails'
                - $ref: '#/components/schemas/BusinessConnectionDetails'
                - $ref: '#/components/schemas/PersonConnectionDetails'
          description: Unprocessable Entity
      security:
      - oauth2:
        - space_write
      summary: Update the connection
      tags:
      - Connections
  /business/v1/spaces/{spaceId}/network/connections/{connectionId}/connectors:
    get:
      description: 'Returns a list of connectors that can be used to interact with
        the connection. <br/> Scope: space_read'
      operationId: listConnectionConnectors
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: connectionId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionConnectorResponse'
          description: Get connectors for a connection.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionConnectorResponse'
          description: Unprocessable Entity
      security:
      - oauth2:
        - space_read
      summary: Get connectors for a connection
      tags:
      - Connections
  /business/v1/spaces/{spaceId}/network/connections:import:
    post:
      description: 'Created or updated connections on the given space <br/> Scope:
        space_write'
      operationId: importConnections
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          multipart/form-data:
            encoding:
              file:
                contentType: text/csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
        description: File to import.
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConnectionsResponse'
          description: File csv was processed successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConnectionsResponse'
          description: Bad Request - e.g., file part is missing
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConnectionsResponse'
          description: Permission Denied
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConnectionsResponse'
          description: Unprocessable Entity
      security:
      - oauth2:
        - space_write
      summary: Import bulk connections on the given space
      tags:
      - Connections
  /business/v1/spaces/{spaceId}/payments/aggregations:
    get:
      description: 'Get list of aggregated payments on the given space. <br/> Scope:
        space_read'
      operationId: getAggregatedPayments
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - description: Zero-based page index, cannot be negative, default 0
        example: 0
        in: query
        name: page
        required: false
        schema:
          type: integer
          format: int32
          default: 0
          description: Zero-based page index, cannot be negative, default 0
          example: 0
          maximum: 10000
          minimum: 0
      - description: 'Page size. Minimum 1, maximum: 200, default 20'
        example: 20
        in: query
        name: size
        required: false
        schema:
          type: integer
          format: int32
          default: 20
          description: 'Page size. Minimum 1, maximum: 200, default 20'
          example: 20
          maximum: 200
          minimum: 1
      - description: Return the totalElements number of entries in the response
        example: true
        in: query
        name: includeTotalElements
        required: false
        schema:
          type: boolean
          default: true
          description: Return the totalElements number of entries in the response
          example: true
      - description: Sorting criteria
        in: query
        name: sortBy
        required: false
        schema:
          type: string
          description: Sorting criteria
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
          - createdAt
          - createdAt.asc
          - createdAt.desc
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAggregationsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAggregationsResponse'
          description: Bad Request
      security:
      - oauth2:
        - space_read
      summary: Get Aggregated Payments
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/payments/collect/consents:
    post:
      description: 'Send an e-mail to the given connection with details of the generated
        collect consent <br/> Scope: space_read'
      operationId: sendEmailWithCollectConsentDetails
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentCollectConsentRequest'
        required: true
      responses:
        '204':
          description: E-mail sent with the collect consent details
      security:
      - oauth2:
        - space_read
      summary: Generate a payment collect consent
      tags:
      - CollectConsents
  /business/v1/spaces/{spaceId}/payments/documents:execute:
    post:
      description: 'Executes a documents payment. <br/> Scope: space_read'
      operationId: executeDocumentsPayment_1
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentExecutionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentExecutionResult'
          description: The redirect url to the bank's payment page.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: The payment could not be executed due to an invalid request
      security:
      - oauth2:
        - space_read
      summary: Execute document payment
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/payments/documents:findCreditorAccount:
    post:
      description: 'Find a payment account stored on the spaced to which the payment
        of each of the selected documents should be made <br/> Scope: space_read'
      operationId: findCreditorAccountsForDocuments
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDocumentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsCreditorAccountsList'
          description: A list of pairs (docId, creditorAccountId)
      security:
      - oauth2:
        - space_read
      summary: Find document creditor account
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/payments/documents:paymentSummary:
    post:
      description: |-
        For each indicated document, a list of payments linked to it is returned.
        Payments can be filtered by status so that clients can see all payments, already executed payments or payments that are planned or in progress but have not yet affected the open balance of the document.
         <br/> Scope: space_read
      operationId: createDocumentsPaymentSummary
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentSummaryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentSummaryResult'
          description: Document payment details
      security:
      - oauth2:
        - space_read
      summary: Provides a summary of the payments that the selected document(s) may
        have produced
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/payments/documents:requestPayment:
    post:
      description: 'Creates payment requests for a list of documents <br/> Scope:
        space_read, space_write'
      operationId: createDocumentsPaymentRequests
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentRequestsCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentRequestsResponse'
          description: The list of payment requests
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: The payment requests could not be created due to an invalid
            request
      security:
      - oauth2:
        - space_read
        - space_write
      summary: Create documents payment requests
      tags:
      - DocumentsPaymentRequests
  /business/v1/spaces/{spaceId}/payments/documents:validate:
    post:
      description: 'Validate a document payment. <br/> Scope: space_read'
      operationId: validateDocumentsPaymentV1
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentValidationResultV1'
          description: The result of the validation
      security:
      - oauth2:
        - space_read
      summary: Validate document payment
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/payments/{paymentId}:
    get:
      description: 'Get the payment status and the associated documents. <br/> Scope:
        space_read'
      operationId: getPaymentDetails_1
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentV1'
          description: The payment details
      security:
      - oauth2:
        - space_read
      summary: Get Payment Details
      tags:
      - DocumentsPayment
  /business/v1/spaces/{spaceId}/users:
    get:
      description: 'Get a list of users that have access to the space <br/> Scope:
        space_read'
      operationId: listUsers
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: includePending
        required: false
        schema:
          type: boolean
          default: false
      - description: Optional fields to include in the response
        in: query
        name: include
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - permissions
            - groups
          uniqueItems: true
      - in: query
        name: resourceType
        required: false
        schema:
          type: string
          enum:
          - PAYMENT_ACCOUNT
      - in: query
        name: resourceId
        required: false
        schema:
          type: string
          format: uuid
      - in: query
        name: requiredPermissions
        required: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: strictPermissionRequirement
        required: false
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSpaceUsersResponse'
          description: The list of users
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: FORBIDDEN
      security:
      - oauth2:
        - space_read
      summary: List users
      tags:
      - Space Users
  /business/v1/spaces/{spaceId}/users/me:
    get:
      description: 'Get the user information of the current user within the space
        <br/> Scope: space_read'
      operationId: getCurrentUser_1
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - description: Optional fields to include in the response
        in: query
        name: include
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - permissions
            - groups
          uniqueItems: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceUser'
          description: The details of the current user
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: FORBIDDEN
      security:
      - oauth2:
        - space_read
      summary: Get current space user
      tags:
      - Space Users
  /business/v1/spaces/{spaceId}/users/{subject}:
    get:
      description: 'Get the user information of a single user within the space <br/>
        Scope: space_read'
      operationId: getUser
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: subject
        required: true
        schema:
          type: string
          format: uuid
      - description: Optional fields to include in the response
        in: query
        name: include
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - permissions
            - groups
          uniqueItems: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceUser'
          description: The details of the requested user
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: FORBIDDEN
      security:
      - oauth2:
        - space_read
      summary: Get user
      tags:
      - Space Users
  /business/v1/users/me:
    get:
      description: 'Get the user information of the current user <br/> Scope: []'
      operationId: getCurrentUser
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: The current user information
      summary: Get user
      tags:
      - Users
  /business/v2/spaces/{spaceId}/payments/documents:execute:
    post:
      description: 'Executes a documents payment. <br/> Scope: space_read'
      operationId: executeDocumentsPayment
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentExecutionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentExecutionResult'
          description: The redirect url to the bank's payment page.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: The payment could not be executed due to an invalid request
      security:
      - oauth2:
        - space_read
      summary: Execute document payment
      tags:
      - documents-payment-controller
  /business/v2/spaces/{spaceId}/payments/documents:validate:
    post:
      description: 'Validate a document payment. <br/> Scope: space_read'
      operationId: validateDocumentsPayment
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentsPaymentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPaymentValidationResult'
          description: The result of the validation
      security:
      - oauth2:
        - space_read
      summary: Validate document payment
      tags:
      - documents-payment-controller
  /business/v2/spaces/{spaceId}/payments/{paymentId}:
    get:
      description: 'Get the payment status and the associated documents. <br/> Scope:
        space_read'
      operationId: getPaymentDetails
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: paymentId
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsPayment'
          description: The payment details
      security:
      - oauth2:
        - space_read
      summary: Get Payment Details
      tags:
      - documents-payment-controller
  /partner/v1/spaces/{spaceId}/clients/{clientId}:invite:
    post:
      description: ' Invite a client to onboard their own company onto the platform.
        <br/> Scope: space_read'
      operationId: inviteClientOnboarding
      parameters:
      - in: path
        name: spaceId
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: clientId
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientSpaceInvitationRequest'
        required: true
      responses:
        '202':
          description: Invitation was initiated successfully
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: The partner could not be found or the user has no write access
            on the space
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
          description: Client has already done onboarding a business space through
            the invitation link
      security:
      - oauth2:
        - space_read
      summary: Invite client
      tags:
      - Space Clients
components:
  schemas:
    AccountIdentifier:
      type: object
      properties:
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          type: string
          example: BE
          pattern: ^[a-zA-Z]{2}
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
          minLength: 1
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
      required:
      - currency
      - identifier
      - scheme
    AllowanceCharge:
      type: object
      properties:
        baseAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        percentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - netAmount
    AllowanceChargeInput:
      type: object
      properties:
        baseAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        percentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
    AmountDto:
      type: object
      properties:
        currency:
          type: string
          description: International code of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        value:
          type: string
          description: Amount value with a maximum of 14 integer digits and 2 fractional
            digits
          example: '10.05'
      required:
      - currency
      - value
    ApiErrorProblemDetail:
      type: object
      properties:
        detail:
          type: string
        error:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
        requestId:
          type: string
        status:
          type: integer
          format: int32
        timestamp:
          type: string
          format: date-time
        title:
          type: string
        type:
          type: string
          format: uri
      required:
      - error
      - requestId
      - timestamp
    ApplicationSpaceBasicInfo:
      type: object
      allOf:
      - $ref: '#/components/schemas/SpaceBasicInfo'
      required:
      - baseUrl
      - entityId
      - id
      - name
      - region
      - type
    AssuranceLevelRequest:
      type: object
      properties:
        requiredLevelOfAssurance:
          type: string
          enum:
          - urn:btx:L1
          - urn:btx:L50
          - urn:btx:L100
      required:
      - requiredLevelOfAssurance
    AssuranceLevelResultWithHttpStatus:
      type: object
      properties:
        currentLevelOfAssurance:
          type: string
          enum:
          - urn:btx:L1
          - urn:btx:L50
          - urn:btx:L100
        kycProcessUrl:
          type: string
      required:
      - currentLevelOfAssurance
    BalanceOffset:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        id:
          type: string
          format: uuid
      required:
      - id
    BalanceOffsetSummary:
      type: object
      description: Balance offset summary
      properties:
        id:
          type: string
          format: uuid
      required:
      - id
    BankIdentifier:
      type: object
      description: Information about the issuer of the account
      properties:
        identifier:
          type: string
          description: Bank Identifier
          example: PANXBEB1XXX
          minLength: 1
        scheme:
          type: string
          description: Bank Identifier Scheme
          enum:
          - BIC
          - CODE
          - ABA
          - CLABE
          - THIRD_PARTY
          example: BIC
      required:
      - identifier
      - scheme
    BulkDocumentRequest:
      type: object
      properties:
        documentIds:
          type: array
          items:
            type: string
            format: uuid
    BusinessConnectionDetails:
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetails'
      - type: object
        properties:
          businessType:
            type: string
            enum:
            - GOVERNMENT
            - ENTERPRISE
            - PRIVATE_PERSON
          legalName:
            type: string
          tradeName:
            type: string
      required:
      - active
      - addresses
      - assignedAccountId
      - businessType
      - connectionStatus
      - connectors
      - createdAt
      - globalIdentifiers
      - id
      - legalName
      - metadata
      - relationTypes
      - tags
      - type
    BusinessConnectionInput:
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionInput'
      - type: object
        properties:
          legalName:
            type: string
            minLength: 1
          tradeName:
            type: string
      required:
      - addresses
      - businessType
      - globalIdentifiers
      - legalName
      - metadata
      - relationTypes
      - tags
      - type
    BusinessSpaceBasicInfo:
      type: object
      allOf:
      - $ref: '#/components/schemas/SpaceBasicInfo'
      - type: object
        properties:
          segment:
            type: string
            enum:
            - SME
            - CORPORATE
      required:
      - baseUrl
      - entityId
      - id
      - name
      - region
      - segment
      - type
    BusinessUpdateConnectionInput:
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateConnectionInput'
      - type: object
        properties:
          legalName:
            type: string
          tradeName:
            type: string
      required:
      - type
    ClientSpaceInvitationRequest:
      type: object
      properties:
        email:
          type: string
          minLength: 1
        firstName:
          type: string
          minLength: 1
        lastName:
          type: string
          minLength: 1
        locale:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        phoneNumber:
          type: string
      required:
      - email
      - firstName
      - lastName
      - locale
      - message
    ConnectionConnector:
      type: object
      properties:
        active:
          type: boolean
        extensionId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        namespace:
          type: string
          minLength: 1
        searchResults:
          type: array
          items:
            $ref: '#/components/schemas/SearchResult'
        settings:
          type: object
          additionalProperties:
            type: object
      required:
      - active
      - extensionId
      - name
      - namespace
    ConnectionConnectorResponse:
      type: object
      properties:
        connectors:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionConnector'
      required:
      - connectors
    ConnectionDetails:
      type: object
      description: discriminator to determine PersonConnectionDetails / BusinessConnectionDetails
      discriminator:
        mapping:
          BUSINESS: '#/components/schemas/BusinessConnectionDetails'
          PERSON: '#/components/schemas/PersonConnectionDetails'
        propertyName: type
      example: PERSON
      properties:
        active:
          type: boolean
        addresses:
          $ref: '#/components/schemas/SepaStructuredAddressBook'
        alias:
          type: string
        assignedAccountId:
          type: string
          minLength: 1
        connectionStatus:
          type: string
          enum:
          - INVITED
          - PENDING
          - CONNECTED
          - DISCONNECTED
          - CREATED
        connectors:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionConnector'
        createdAt:
          type: string
          format: date-time
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
        id:
          type: string
          format: uuid
        metadata:
          type: object
          additionalProperties:
            type: object
        relationTypes:
          type: array
          items:
            type: string
            enum:
            - CUSTOMER
            - SUPPLIER
            - ACCOUNTANT
            - PARTNER
            - GROUP
          minItems: 1
          uniqueItems: true
        spaceUrl:
          type: string
        tags:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
          - BUSINESS
          - PERSON
      required:
      - active
      - addresses
      - assignedAccountId
      - connectionStatus
      - connectors
      - createdAt
      - globalIdentifiers
      - id
      - metadata
      - relationTypes
      - tags
      - type
    ConnectionInput:
      type: object
      discriminator:
        mapping:
          BUSINESS: '#/components/schemas/BusinessConnectionInput'
          PERSON: '#/components/schemas/PersonConnectionInput'
        propertyName: type
      properties:
        active:
          type: boolean
        addresses:
          $ref: '#/components/schemas/SepaStructuredAddressBook'
        alias:
          type: string
        businessType:
          type: string
          enum:
          - GOVERNMENT
          - ENTERPRISE
          - PRIVATE_PERSON
        connectionStatus:
          type: string
          enum:
          - INVITED
          - PENDING
          - CONNECTED
          - DISCONNECTED
          - CREATED
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
        metadata:
          type: object
          additionalProperties:
            type: object
        paymentAccounts:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccount'
          uniqueItems: true
        relationTypes:
          type: array
          items:
            type: string
            enum:
            - CUSTOMER
            - SUPPLIER
            - ACCOUNTANT
            - PARTNER
            - GROUP
          minItems: 1
          uniqueItems: true
        tags:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
          - BUSINESS
          - PERSON
      required:
      - addresses
      - globalIdentifiers
      - metadata
      - relationTypes
      - tags
      - type
    ConnectionPaymentAccount:
      type: object
      properties:
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          type: string
          example: BE
          pattern: ^[a-zA-Z]{2}
        currency:
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
          pattern: '[A-Z]{3}'
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
          minLength: 1
        isDefault:
          type: boolean
          default: true
          description: Is default payment account of connection. If multiple with
            default=true => 400 response. If one without isDefault set, will consider
            'true'.
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
      required:
      - currency
      - identifier
      - scheme
    Creditor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
      required:
      - id
      - name
    DirectoryPerson:
      type: object
      properties:
        firstName:
          type: string
          minLength: 1
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
        id:
          type: string
          format: uuid
        lastName:
          type: string
          minLength: 1
        paymentMetaData:
          type: object
          additionalProperties:
            type: object
        region:
          type: string
          minLength: 1
      required:
      - firstName
      - globalIdentifiers
      - id
      - lastName
      - paymentMetaData
      - region
    DirectoryPersonResponse:
      type: object
      properties:
        entities:
          type: array
          items:
            $ref: '#/components/schemas/DirectoryPerson'
    DocumentAllowanceCharge:
      type: object
      properties:
        baseAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        percentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - netAmount
      - vatCategory
      - vatPercentage
    DocumentAllowanceChargeInput:
      type: object
      properties:
        baseAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        percentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
    DocumentCalculationRequest:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/LineInput'
        metadata:
          $ref: '#/components/schemas/DocumentMetadataInput'
        options:
          $ref: '#/components/schemas/Options'
      required:
      - lines
      - metadata
    DocumentCalculationResponse:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/Line'
        metadata:
          $ref: '#/components/schemas/DocumentMetadata'
      required:
      - lines
      - metadata
    DocumentCreditorAccountSuggestion:
      type: object
      properties:
        creditorAccountId:
          type: string
          format: uuid
        documentId:
          type: string
          format: uuid
    DocumentMetadata:
      type: object
      properties:
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAllowanceCharge'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAllowanceCharge'
        documentTotals:
          $ref: '#/components/schemas/DocumentTotals'
        vatDetails:
          type: array
          items:
            $ref: '#/components/schemas/DocumentVatDetails'
      required:
      - allowances
      - charges
      - documentTotals
      - vatDetails
    DocumentMetadataInput:
      type: object
      properties:
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAllowanceChargeInput'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAllowanceChargeInput'
        documentTotals:
          $ref: '#/components/schemas/DocumentTotalsInput'
        vatDetails:
          type: array
          items:
            $ref: '#/components/schemas/DocumentVatDetailsInput'
    DocumentNumberResult:
      type: object
      properties:
        documentNumber:
          type: string
          minLength: 1
      required:
      - documentNumber
    DocumentPaymentRequest:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        documentId:
          type: string
          format: uuid
        paymentId:
          type: string
          format: uuid
        paymentRequestId:
          type: string
          format: uuid
        paymentRequestLinks:
          $ref: '#/components/schemas/PaymentRequestLinks'
        status:
          type: string
          enum:
          - OPEN
          - PAID
          - PARTIALLY_PAID
          - ALMOST_DUE
          - PAST_DUE
          - SUSPENDED
          - EXPIRED
          - SUBMITTED
          - UNKNOWN
          - FAILED
          - PAID_REQUESTED
          - CANCELLED
      required:
      - amount
      - documentId
      - paymentId
      - paymentRequestId
      - paymentRequestLinks
      - status
    DocumentPaymentSummary:
      type: object
      properties:
        documentId:
          type: string
          format: uuid
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentSummary'
      required:
      - documentId
      - payments
    DocumentTotals:
      type: object
      properties:
        allowancesNetAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        chargesNetAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        grossAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        linesNetAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        payableAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        prepaidAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        roundingAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - grossAmount
      - linesNetAmount
      - netAmount
      - payableAmount
      - vatAmount
    DocumentTotalsInput:
      type: object
      properties:
        allowancesNetAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        chargesNetAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        grossAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        linesNetAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        netAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        payableAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        prepaidAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        roundingAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        vatAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
    DocumentValidationActionPayload:
      type: object
      properties:
        documentId:
          type: string
          format: uuid
        spaceId:
          type: string
          format: uuid
        validationId:
          type: string
          format: uuid
      required:
      - documentId
      - spaceId
      - validationId
    DocumentValidationMessage:
      type: object
      properties:
        code:
          type: string
          enum:
          - MISSING_CREDITOR_ACCOUNT
          - NEGATIVE_OPEN_BALANCE
          - CURRENCY_MISMATCH
          - NOT_PAYABLE
          - DUPLICATE_E2E_IDENTIFICATION
          - PARTIAL_AMOUNT_GREATER_THAN_PAYABLE
          - OPEN_PAYMENT_EXISTS
          - PLANNED_PAYMENT_EXISTS
          - DOCUMENT_SUGGESTED_PAYMENT_ACCOUNTS_PRESENT_BUT_IGNORED
          - NEW_PAYMENT_MEANS_ACCOUNT_DETECTED
        data:
          type: object
        type:
          type: string
          enum:
          - INFO
          - WARNING
          - ERROR
      required:
      - code
      - type
    DocumentValidationMessageV1:
      type: object
      properties:
        code:
          type: string
          enum:
          - MISSING_CREDITOR_ACCOUNT
          - NEGATIVE_OPEN_BALANCE
          - CURRENCY_MISMATCH
          - NOT_PAYABLE
          - DUPLICATE_E2E_IDENTIFICATION
          - PARTIAL_AMOUNT_GREATER_THAN_PAYABLE
          - OPEN_PAYMENT_EXISTS
          - PLANNED_PAYMENT_EXISTS
          - DOCUMENT_SUGGESTED_PAYMENT_ACCOUNTS_PRESENT_BUT_IGNORED
          - NEW_PAYMENT_MEANS_ACCOUNT_DETECTED
        data:
          type: object
        type:
          type: string
          enum:
          - INFO
          - WARNING
          - ERROR
      required:
      - code
      - type
    DocumentValidationMessages:
      type: object
      properties:
        id:
          type: string
          format: uuid
        messages:
          type: array
          items:
            $ref: '#/components/schemas/DocumentValidationMessage'
      required:
      - id
      - messages
    DocumentValidationMessagesV1:
      type: object
      properties:
        id:
          type: string
          format: uuid
        messages:
          type: array
          items:
            $ref: '#/components/schemas/DocumentValidationMessageV1'
      required:
      - id
      - messages
    DocumentVatDetails:
      type: object
      properties:
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - netAmount
      - vatAmount
      - vatCategory
      - vatPercentage
    DocumentVatDetailsInput:
      type: object
      properties:
        netAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        vatAmount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
    DocumentsCreditorAccountsList:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentCreditorAccountSuggestion'
    DocumentsPayment:
      type: object
      properties:
        counterPartyAmount:
          $ref: '#/components/schemas/AmountDto'
        documents:
          type: array
          description: The list of documents that were paid in this payment. Note
            that this list can be empty if aggregation is still ongoing.
          items:
            $ref: '#/components/schemas/DocumentsPaymentDocument'
        id:
          type: string
          format: uuid
        originatingPartyAmount:
          $ref: '#/components/schemas/AmountDto'
        requestedExecutionDate:
          type: string
          format: date
        status:
          type: string
          enum:
          - RECEIVED
          - OPEN
          - IN_TRANSIT
          - SUCCESSFUL
          - FAILED
          - CANCELED
          - UNKNOWN
          - PLANNED
        statusReason:
          type: array
          items:
            type: string
      required:
      - counterPartyAmount
      - documents
      - id
      - originatingPartyAmount
      - status
      - statusReason
    DocumentsPaymentDocument:
      type: object
      description: The list of documents that were paid in this payment. Note that
        this list can be empty if aggregation is still ongoing.
      properties:
        creditor:
          $ref: '#/components/schemas/Creditor'
        documentNumber:
          type: string
          minLength: 1
        id:
          type: string
          format: uuid
        paymentRelatedBalanceOffset:
          $ref: '#/components/schemas/BalanceOffset'
      required:
      - creditor
      - documentNumber
      - id
      - paymentRelatedBalanceOffset
    DocumentsPaymentExecutionRequest:
      type: object
      properties:
        acceptedFeeId:
          type: string
          format: uuid
          description: |-
            Identifier of the fee associated with the payment.
            If applicable, will be returned by the validation endpoint.
        bulk:
          type: boolean
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentsPaymentRequestDocument'
          minItems: 1
        language:
          type: string
          deprecated: true
          description: This field is deprecated, please use locale instead.
        locale:
          type: string
          description: The locale to use on web pages presented to the user
          example: nl, NL, NL-NL, nl-NL, nl-BE, NL-BE
        paymentAccountId:
          type: string
          format: uuid
        redirectUrl:
          type: string
          format: uri
          description: URL to redirect the user to, once the flow is completed
          example: https://app.btx.banqup.com/paymentAccounts
        requestedExecutionDate:
          type: string
          format: date
          description: The requested execution date
          example: 2024-10-10
      required:
      - documents
      - paymentAccountId
      - redirectUrl
    DocumentsPaymentExecutionResult:
      type: object
      properties:
        paymentId:
          type: string
          format: uuid
        redirectUrl:
          type: string
          minLength: 1
      required:
      - paymentId
      - redirectUrl
    DocumentsPaymentRequest:
      type: object
      properties:
        acceptedFeeId:
          type: string
          format: uuid
          description: |-
            Identifier of the fee associated with the payment.
            If applicable, will be returned by the validation endpoint.
        bulk:
          type: boolean
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentsPaymentRequestDocument'
          minItems: 1
        language:
          type: string
          deprecated: true
          description: This field is deprecated, please use locale instead.
        locale:
          type: string
          description: The locale to use on web pages presented to the user
          example: nl, NL, NL-NL, nl-NL, nl-BE, NL-BE
        paymentAccountId:
          type: string
          format: uuid
        requestedExecutionDate:
          type: string
          format: date
          description: The requested execution date
          example: 2024-10-10
      required:
      - documents
      - paymentAccountId
    DocumentsPaymentRequestDocument:
      type: object
      properties:
        creditorPaymentAccountId:
          type: string
          format: uuid
        creditorVerificationId:
          type: string
        endToEndIdentification:
          type: string
          maxLength: 35
          minLength: 0
        id:
          type: string
          format: uuid
        partialPaymentAmount:
          type: string
          description: Partial Payment Amount value specified in the same currency
            as the document's open balance
          example: '1.99'
          exclusiveMinimum: true
          maximum: 99999999999999.98
          minimum: 0
          pattern: ^\d{1,14}(\.\d{1,2})?$
      required:
      - id
    DocumentsPaymentRequestsCreateRequest:
      type: object
      properties:
        collect:
          $ref: '#/components/schemas/PaymentCollectInstruction'
        documentIds:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
      required:
      - documentIds
    DocumentsPaymentRequestsResponse:
      type: object
      properties:
        documentsPaymentRequests:
          type: array
          items:
            $ref: '#/components/schemas/DocumentPaymentRequest'
          minItems: 1
      required:
      - documentsPaymentRequests
    DocumentsPaymentSummaryRequest:
      type: object
      properties:
        acceptedPaymentStatuses:
          type: array
          description: Specify the status of payments included into the summary. When
            null, all payments related to document are included
          items:
            type: string
            description: Specify the status of payments included into the summary.
              When null, all payments related to document are included
            enum:
            - RECEIVED
            - OPEN
            - IN_TRANSIT
            - SUCCESSFUL
            - FAILED
            - CANCELED
            - UNKNOWN
            - PLANNED
          uniqueItems: true
        documentIds:
          type: array
          description: List of documents for which the summary is requested
          items:
            type: string
            format: uuid
            description: List of documents for which the summary is requested
          maxItems: 100
          minItems: 0
      required:
      - documentIds
    DocumentsPaymentSummaryResult:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentPaymentSummary'
          minItems: 1
      required:
      - documents
    DocumentsPaymentV1:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        documents:
          type: array
          description: The list of documents that were paid in this payment. Note
            that this list can be empty if aggregation is still ongoing.
          items:
            $ref: '#/components/schemas/DocumentsPaymentDocument'
        id:
          type: string
          format: uuid
        requestedExecutionDate:
          type: string
          format: date
        status:
          type: string
          enum:
          - RECEIVED
          - OPEN
          - IN_TRANSIT
          - SUCCESSFUL
          - FAILED
          - CANCELED
          - UNKNOWN
          - PLANNED
        statusReason:
          type: array
          items:
            type: string
      required:
      - amount
      - documents
      - id
      - status
      - statusReason
    DocumentsPaymentValidationMessages:
      type: object
      properties:
        documentsMessages:
          type: array
          items:
            $ref: '#/components/schemas/DocumentValidationMessages'
        paymentMessages:
          type: array
          items:
            $ref: '#/components/schemas/PaymentValidationMessage'
      required:
      - documentsMessages
      - paymentMessages
    DocumentsPaymentValidationMessagesV1:
      type: object
      properties:
        documentsMessages:
          type: array
          items:
            $ref: '#/components/schemas/DocumentValidationMessagesV1'
        documentsPaymentErrors:
          type: array
          items:
            type: string
            enum:
            - MISSING_DEBTOR_ACCOUNT
            - INVALID_CURRENCY
            - PIS_NOT_SUPPORTED
            - FINANCIAL_PLATFORM_UNKNOWN
            - MISSING_PAYABLE_ITEM
            - BULK_PAYMENT_NOT_SUPPORTED
            - DUPLICATE_PAYABLE_ITEM_ID
            - FUTURE_EXECUTION_DATE_NOT_SUPPORTED
            - UNACCEPTABLE_FUTURE_EXECUTION_DATE
            - PARTIAL_PAYMENT_NOT_SUPPORTED
            - NEW_FEE_DETECTED
            - FEE_MISMATCH_OR_EXPIRED
            - FAILED_CONTEXT_VALIDATION
      required:
      - documentsMessages
      - documentsPaymentErrors
    DocumentsPaymentValidationResult:
      type: object
      properties:
        status:
          type: string
          enum:
          - VALID
          - VALID_WITH_WARNINGS
          - INVALID
        validationResult:
          $ref: '#/components/schemas/DocumentsPaymentValidationMessages'
      required:
      - status
      - validationResult
    DocumentsPaymentValidationResultV1:
      type: object
      properties:
        status:
          type: string
          enum:
          - VALID
          - VALID_WITH_WARNINGS
          - INVALID
        validationResult:
          $ref: '#/components/schemas/DocumentsPaymentValidationMessagesV1'
      required:
      - status
      - validationResult
    GenerateDocumentNumberRequest:
      type: object
      properties:
        prefix:
          type: string
    Group:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        resourceId:
          type: string
          format: uuid
        resourceType:
          type: string
          enum:
          - ENTITY
          - SPACE
        type:
          type: string
          enum:
          - DEFAULT_SYSTEM_GROUP
          - DEFAULT_OPEN_GROUP
          - CUSTOM
          - PERSONAL
        updatedAt:
          type: string
          format: date-time
      required:
      - createdAt
      - id
      - name
      - resourceId
      - resourceType
      - type
      - updatedAt
    ImportConnectionsResponse:
      type: object
      properties:
        numberOfFailures:
          type: integer
          format: int32
        numberOfSuccesses:
          type: integer
          format: int32
        resultUrl:
          type: string
        totalRows:
          type: integer
          format: int32
    Line:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/LineMetadata'
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        pricing:
          $ref: '#/components/schemas/LinePricing'
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        quantity:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatDetails:
          $ref: '#/components/schemas/LineVatDetails'
      required:
      - metadata
      - netAmount
      - pricing
      - productIdentifiers
      - quantity
      - vatDetails
    LineInput:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/LineMetadataInput'
        netAmount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        pricing:
          $ref: '#/components/schemas/LinePricingInput'
        productIdentifiers:
          $ref: '#/components/schemas/ProductIdentifiers'
        quantity:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        vatDetails:
          $ref: '#/components/schemas/LineVatDetailsInput'
    LineMetadata:
      type: object
      properties:
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/AllowanceCharge'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/AllowanceCharge'
      required:
      - allowances
      - charges
    LineMetadataInput:
      type: object
      properties:
        allowances:
          type: array
          items:
            $ref: '#/components/schemas/AllowanceChargeInput'
        charges:
          type: array
          items:
            $ref: '#/components/schemas/AllowanceChargeInput'
    LinePricing:
      type: object
      properties:
        itemGrossPrice:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        itemNetPrice:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        itemPriceDiscount:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
        itemPriceQuantity:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - itemNetPrice
      - itemPriceQuantity
    LinePricingInput:
      type: object
      properties:
        itemGrossPrice:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        itemNetPrice:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        itemPriceDiscount:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
        itemPriceQuantity:
          type: string
          example: '123.45'
          pattern: ^-?[0-9]+(\.[0-9]+)?$
    LineVatDetails:
      type: object
      properties:
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
      required:
      - vatCategory
      - vatPercentage
    LineVatDetailsInput:
      type: object
      properties:
        vatCategory:
          type: string
          enum:
          - S
          - L
          - M
          - Z
          - AE
          - K
          - G
          - O
          - E
        vatPercentage:
          type: string
          example: '123.45'
          pattern: ^[0-9]+(\.[0-9]+)?$
    ListSpaceUsersResponse:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/SpaceUser'
      required:
      - users
    NestedProblem:
      type: object
      properties:
        detail:
          type: string
        error:
          type: string
        title:
          type: string
        type:
          type: string
          format: uri
      required:
      - detail
      - error
      - title
    Options:
      type: object
      properties:
        allowCorrections:
          type: boolean
        baseLineDescription:
          type: string
        recreateInvoiceLines:
          type: boolean
    PartnerSpaceBasicInfo:
      type: object
      allOf:
      - $ref: '#/components/schemas/SpaceBasicInfo'
      - type: object
        properties:
          segment:
            type: string
            enum:
            - ACCOUNTING
            - RESELLER
            - CARETAKER
            - REFERRAL
            - SYSTEM_INTEGRATOR
            - OTHER
      required:
      - baseUrl
      - entityId
      - id
      - name
      - region
      - segment
      - type
    PaymentAggregation:
      type: object
      description: Payment aggregation with matching details
      properties:
        aggregationStatus:
          type: string
          description: Aggregation status
          enum:
          - PROPOSED
          - UNMATCHED
          - MATCHED
        amount:
          $ref: '#/components/schemas/AmountDto'
        availableOperations:
          type: array
          items:
            type: string
            description: Available operations for payment aggregation
            enum:
            - ACCEPT
            - REJECT
            - MATCH
            - UNMATCH
            - EDIT
          minItems: 1
        balanceOffset:
          $ref: '#/components/schemas/BalanceOffsetSummary'
        counterpartyPaymentAccount:
          $ref: '#/components/schemas/AccountIdentifier'
        createdAt:
          type: string
          format: date-time
        document:
          $ref: '#/components/schemas/PaymentAggregationDocument'
        id:
          type: string
          format: uuid
        paymentAccount:
          $ref: '#/components/schemas/AccountIdentifier'
      required:
      - aggregationStatus
      - amount
      - availableOperations
      - createdAt
      - id
    PaymentAggregationConnection:
      type: object
      properties:
        displayName:
          type: string
        id:
          type: string
          format: uuid
      required:
      - displayName
      - id
    PaymentAggregationDocument:
      type: object
      properties:
        connections:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAggregationConnection'
          minItems: 1
        folder:
          type: string
          enum:
          - PURCHASES
          - SALES
          - DRAFTS
          - INBOX
          - STATEMENTS
          - FILES
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/PaymentAggregationDocumentMetadata'
      required:
      - connections
      - folder
      - id
      - metadata
    PaymentAggregationDocumentMetadata:
      type: object
      properties:
        currencyCode:
          type: string
        documentNumber:
          type: string
        documentTotals:
          $ref: '#/components/schemas/PaymentAggregationDocumentTotals'
    PaymentAggregationDocumentTotals:
      type: object
      properties:
        payableAmount:
          type: number
    PaymentAggregationsResponse:
      type: object
      properties:
        currentPage:
          type: integer
          format: int32
          description: Current page
        pageSize:
          type: integer
          format: int32
          description: Response page size
        paymentAggregations:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAggregation'
        totalElements:
          type: integer
          format: int64
          description: Total number of items in the database that correspond to this
            search criteria
    PaymentCollectConsentRequest:
      type: object
      properties:
        connectionId:
          type: string
          format: uuid
          description: Identifier of the Connection who should receive this consent,
            as defined in the current Space
        currency:
          type: string
          description: Currency of the consent. If not provided, the currency of the
            collect account will be used
          example: EUR
        description:
          type: string
          description: The description of the consent
          minLength: 1
        locale:
          type: string
          description: The locale to use on web pages presented to the user
          example: nl, NL, NL-NL, nl-NL, nl-BE, NL-BE
      required:
      - connectionId
      - description
    PaymentCollectInstruction:
      type: object
      properties:
        consentId:
          type: string
          format: uuid
          description: Identifier of the consent to be used to automatically initiate
            a transaction for the document.
        requestedExecutionDate:
          type: string
          format: date
          description: The requested execution date for the payment collect transaction
      required:
      - consentId
    PaymentRequestLinks:
      type: object
      properties:
        checkoutUrl:
          type: string
          description: URL to redirect the payer to initiate the payment
          example: https://app.btx.banqup.com/payments/payment-feedback
        statusImageUrl:
          type: string
          description: URL of the real time status image of the payment request
          example: https://app.btx.banqup.com/payments/payment-feedback
        statusTextUrl:
          type: string
          description: URL of the real time status of the payment request
          example: https://app.btx.banqup.com/payments/payment-feedback
    PaymentSummary:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountDto'
        paymentId:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - RECEIVED
          - OPEN
          - IN_TRANSIT
          - SUCCESSFUL
          - FAILED
          - CANCELED
          - UNKNOWN
          - PLANNED
      required:
      - amount
      - paymentId
      - status
    PaymentValidationMessage:
      type: object
      properties:
        code:
          type: string
          enum:
          - MISSING_DEBTOR_ACCOUNT
          - INVALID_CURRENCY
          - PIS_NOT_SUPPORTED
          - FINANCIAL_PLATFORM_UNKNOWN
          - MISSING_PAYABLE_ITEM
          - BULK_PAYMENT_NOT_SUPPORTED
          - DUPLICATE_PAYABLE_ITEM_ID
          - FUTURE_EXECUTION_DATE_NOT_SUPPORTED
          - UNACCEPTABLE_FUTURE_EXECUTION_DATE
          - PARTIAL_PAYMENT_NOT_SUPPORTED
          - NEW_FEE_DETECTED
          - FEE_MISMATCH_OR_EXPIRED
          - CAF_PAYMENT
          - FX_PAYMENT
          - FAILED_CONTEXT_VALIDATION
          - CONTEXT_VALIDATION_WARNING
          - PAYMENT_EXECUTION_METHOD_PROVIDER_OUT_OF_WORKING_HOURS
          - PAYMENT_EXECUTION_NOT_SUPPORTED
          - SERVICE_UNAVAILABLE
        data:
          type: object
        type:
          type: string
          enum:
          - INFO
          - WARNING
          - ERROR
      required:
      - code
      - type
    PermissionTree:
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/Group'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
    PersonConnectionDetails:
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionDetails'
      - type: object
        properties:
          firstName:
            type: string
          lastName:
            type: string
      required:
      - active
      - addresses
      - assignedAccountId
      - connectionStatus
      - connectors
      - createdAt
      - firstName
      - globalIdentifiers
      - id
      - lastName
      - metadata
      - relationTypes
      - tags
      - type
    PersonConnectionInput:
      type: object
      allOf:
      - $ref: '#/components/schemas/ConnectionInput'
      - type: object
        properties:
          firstName:
            type: string
            maxLength: 128
            minLength: 0
          lastName:
            type: string
            maxLength: 128
            minLength: 0
      required:
      - addresses
      - firstName
      - globalIdentifiers
      - lastName
      - metadata
      - relationTypes
      - tags
      - type
    PersonUpdateConnectionInput:
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateConnectionInput'
      - type: object
        properties:
          firstName:
            type: string
          lastName:
            type: string
      required:
      - type
    PersonalSpaceBasicInfo:
      type: object
      allOf:
      - $ref: '#/components/schemas/SpaceBasicInfo'
      - type: object
        properties:
          segment:
            type: string
            enum:
            - CONSUMER
            - CARETAKER_CLIENT
      required:
      - baseUrl
      - entityId
      - id
      - name
      - region
      - segment
      - type
    ProblemDetail:
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
          format: uri
        properties:
          type: object
          additionalProperties:
            type: object
        status:
          type: integer
          format: int32
        title:
          type: string
        type:
          type: string
          format: uri
    ProductIdentifiers:
      type: object
      properties:
        itemCategory:
          type: string
        itemDescription:
          type: string
        itemId:
          type: string
        itemName:
          type: string
    Resource:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        name:
          type: string
        scopes:
          type: array
          items:
            type: string
            minLength: 1
          minItems: 1
        type:
          type: string
          minLength: 1
        uxHint:
          type: boolean
      required:
      - id
      - scopes
      - type
    SearchResult:
      type: object
      properties:
        description:
          type: string
        name:
          type: string
          minLength: 1
        settings:
          type: object
          additionalProperties:
            type: object
      required:
      - name
      - settings
    SepaStructuredAddressBook:
      type: object
    SpaceBasicInfo:
      type: object
      discriminator:
        mapping:
          APPLICATION: '#/components/schemas/ApplicationSpaceBasicInfo'
          BUSINESS: '#/components/schemas/BusinessSpaceBasicInfo'
          PARTNER: '#/components/schemas/PartnerSpaceBasicInfo'
          PERSONAL: '#/components/schemas/PersonalSpaceBasicInfo'
        propertyName: type
      properties:
        baseUrl:
          type: string
          minLength: 1
        entityId:
          type: string
          format: uuid
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        region:
          type: string
          minLength: 1
        type:
          type: string
          enum:
          - PERSONAL
          - BUSINESS
          - PARTNER
          - APPLICATION
      required:
      - baseUrl
      - entityId
      - id
      - name
      - region
      - type
    SpaceUser:
      type: object
      properties:
        email:
          type: string
        firstName:
          type: string
          minLength: 1
        lastName:
          type: string
          minLength: 1
        partnerIds:
          type: array
          items:
            type: string
            format: uuid
        permissionRequirementMet:
          type: boolean
        permissionTree:
          $ref: '#/components/schemas/PermissionTree'
        status:
          type: string
        subject:
          type: string
          format: uuid
      required:
      - firstName
      - lastName
      - partnerIds
      - status
    SpacesListingResponse:
      type: object
      properties:
        spaces:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/ApplicationSpaceBasicInfo'
            - $ref: '#/components/schemas/BusinessSpaceBasicInfo'
            - $ref: '#/components/schemas/PartnerSpaceBasicInfo'
            - $ref: '#/components/schemas/PersonalSpaceBasicInfo'
        unavailableRegions:
          type: array
          items:
            type: string
            minLength: 1
          uniqueItems: true
      required:
      - spaces
      - unavailableRegions
    UpdateConnectionInput:
      type: object
      discriminator:
        mapping:
          BUSINESS: '#/components/schemas/BusinessUpdateConnectionInput'
          PERSON: '#/components/schemas/PersonUpdateConnectionInput'
        propertyName: type
      properties:
        active:
          type: boolean
        addresses:
          $ref: '#/components/schemas/SepaStructuredAddressBook'
        alias:
          type: string
        assignedAccountId:
          type: string
        businessType:
          type: string
          enum:
          - GOVERNMENT
          - ENTERPRISE
          - PRIVATE_PERSON
        connectionStatus:
          type: string
          enum:
          - INVITED
          - PENDING
          - CONNECTED
          - DISCONNECTED
          - CREATED
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
        metadata:
          type: object
          additionalProperties:
            type: object
        paymentAccounts:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionPaymentAccount'
          uniqueItems: true
        relationTypes:
          type: array
          items:
            type: string
            enum:
            - CUSTOMER
            - SUPPLIER
            - ACCOUNTANT
            - PARTNER
            - GROUP
          uniqueItems: true
        spaceUrl:
          type: string
        tags:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
          - BUSINESS
          - PERSON
      required:
      - type
    User:
      type: object
      properties:
        email:
          type: string
        firstName:
          type: string
          minLength: 1
        lastName:
          type: string
          minLength: 1
        partnerIds:
          type: array
          items:
            type: string
            format: uuid
        status:
          type: string
        subject:
          type: string
          format: uuid
      required:
      - firstName
      - lastName
      - partnerIds
      - status
      - subject
    UserSpaceInvitationRequest:
      type: object
      properties:
        email:
          type: string
          minLength: 1
        firstName:
          type: string
          minLength: 1
        lastName:
          type: string
          minLength: 1
        permissions:
          type: object
          additionalProperties:
            type: object
      required:
      - email
      - firstName
      - lastName
      - permissions
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.btx.fr.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.btx.fr.banqup.com/oauth2/auth
          tokenUrl: https://api.btx.fr.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
