openapi: 3.0.1
info:
  title: trust_entity API
  description: Merged OpenAPI spec for trust_entity domain
  version: 1.0.0
servers:
- url: https://api.cve.btx.eu.banqup.com/trust/entity
paths:
  /v1/directory/spaces:
    get:
      tags:
      - Public Directory
      summary: Lookup spaces
      description: Search for spaces using entity's global identifier
      operationId: getSpacesByBusinessEntityGlobalIdentifier
      parameters:
      - name: identifierValue
        in: query
        description: Global identifier (e.g. VAT number)
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Global identifier key/value pair
        schema:
          type: array
          items:
            type: string
        example: be:vat=BE123456789
      - name: name
        in: query
        description: Searched name
        schema:
          type: string
        example: UP
      - name: countryCode
        in: query
        description: Country code
        schema:
          type: string
        example: BE
      - name: spaceType
        in: query
        description: Space type. It can be multiple values separated by comma, or
          just one value.
        schema:
          type: string
      - name: entityType
        in: query
        description: Entity type
        schema:
          $ref: '#/components/schemas/EntityType'
      - name: sandbox
        in: query
        description: Entity has the flag `sandbox`
        schema:
          type: boolean
        example: true
      - name: entityId
        in: query
        description: Filter spaces belonging to the specified entity
        schema:
          type: string
          format: uuid
        example: d43d461a-a7e8-402a-b327-1c6458ab82d8
      - name: spaceId
        in: query
        description: Filter spaces by space id.
        schema:
          type: string
          format: uuid
        example: 120ee80b-cd74-4885-8796-022f9f07e9bd
      - name: isDefault
        in: query
        description: Filter spaces by whether they are set as default
        schema:
          type: boolean
        example: true
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllSpaceDirectoryResult'
              example:
                spaces:
                - id: 00000001-0000-0000-0000-000000000000
                  entity:
                    id: 00000002-0000-0000-0000-000000000000
                    type: business
                    legalName: Unifiedpost Group
                    tradeName: Unifiedpost
                    countryCode: BE
                    verified: true
                    description: This is a company
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        postBox: PO Box 1234
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    globalIdentifiers:
                      nl:kvk: '62196830'
                      fr:siret: '46802815115880'
                      be:vat: BE0417497106
                      global:email: john@example.com
                      global:phoneNumber: 0123456789
                      global:website: www.example.com
                  name: Invoices space
                  type: BUSINESS
                  isDefault: true
                  region: eu
                  status: ACTIVE
                  globalIdentifiers:
                    fr:siret: '46802815115880'
                totalElements: 10
                currentPage: 0
                pageSize: 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
  /v1/directory/entities/{entityId}:
    get:
      tags:
      - Public Directory
      summary: ⚠️Get public entity information
      description: Retrieve public entity information
      operationId: getEntityDirectory
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 199bf9b6-8c6a-4529-b72f-683135765957
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryEntityResult'
              examples:
                business:
                  description: business
                  value:
                    id: 00000002-0000-0000-0000-000000000000
                    type: business
                    legalName: Unifiedpost Group
                    tradeName: Unifiedpost
                    countryCode: BE
                    verified: true
                    description: This is a company
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        postBox: PO Box 1234
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    globalIdentifiers:
                      nl:kvk: '62196830'
                      fr:siret: '46802815115880'
                      be:vat: BE0417497106
                      global:email: john@example.com
                      global:phoneNumber: 0123456789
                      global:website: www.example.com
                personal:
                  description: personal
                  value:
                    id: 00000002-0000-0000-0000-000000000000
                    type: person
                    firstName: Steve
                    lastName: Doe
                    countryCode: BE
                    verified: true
                    description: This is a person
                    globalIdentifiers:
                      global:email: steve.doe@test.com
                      global:phoneNumber: '+32497805201'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      deprecated: true
      security:
      - oauth2: []
  /v1/directory/entities/{entityId}/spaces/{spaceId}:
    get:
      tags:
      - Public Directory
      summary: Get public space information
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve public space information along with entity details'
      operationId: getSpaceDirectoryDetails
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceDirectoryResult'
              examples:
                business:
                  description: business
                  value:
                    id: 00000001-0000-0000-0000-000000000000
                    entity:
                      id: 00000002-0000-0000-0000-000000000000
                      type: business
                      legalName: Unifiedpost Group
                      tradeName: Unifiedpost
                      countryCode: BE
                      verified: true
                      description: This is a company
                      addresses:
                        main:
                          streetName: Nitzsche Lodge
                          house: '80728'
                          postalCode: '3110'
                          postBox: PO Box 1234
                          city: Fernandahaven
                          country: Belgium
                          countryCode: BE
                      globalIdentifiers:
                        nl:kvk: '62196830'
                        fr:siret: '46802815115880'
                        be:vat: BE0417497106
                        global:email: john@example.com
                        global:phoneNumber: 0123456789
                        global:website: www.example.com
                    name: Invoices space
                    type: BUSINESS
                    isDefault: true
                    region: eu
                    status: ACTIVE
                    globalIdentifiers:
                      fr:siret: '46802815115880'
                personal:
                  description: personal
                  value:
                    id: 00000001-0000-0000-0000-000000000000
                    entity:
                      id: 00000002-0000-0000-0000-000000000000
                      type: person
                      firstName: Steve
                      lastName: Doe
                      countryCode: BE
                      verified: true
                      description: This is a person
                      globalIdentifiers:
                        global:email: steve.doe@test.com
                        global:phoneNumber: '+32497805201'
                    name: Personal space
                    type: PERSONAL
                    isDefault: false
                    region: eu
                    status: ACTIVE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
  /v1/entities:
    get:
      tags:
      - Entities
      summary: Get my entities
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve current user''s accessible entities. <br/> Scope: entity_read'
      operationId: getAllEntities
      parameters:
      - name: identifierValue
        in: query
        description: Global identifier (e.g. VAT number)
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Global identifier key/value pair
        schema:
          type: string
        example: be:vat=BE123456789
      - name: type
        in: query
        description: 'Entity type filter. Optional values: BUSINESS or PERSON'
        schema:
          $ref: '#/components/schemas/EntityType'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllEntityResult'
              example:
                entities:
                - sandbox: false
                  id: 00000011-0000-0000-0000-000000000000
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                  type: business
                  billingCurrency: EUR
                  legalName: Unifiedpost Group
                  tradeName: Unifiedpost
                - sandbox: false
                  id: 00000001-0000-0000-0000-000000000000
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      house: '7850'
                      postalCode: '3100'
                      city: Kubhaven
                      countryCode: BE
                  personalDataConsent: 2023-06-01 16:30:01+00:00
                  termsConditionsConsent: 2023-06-01 16:30:01+00:00
                  subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                  globalIdentifiers:
                    btx:kc_issuer: https://iam.devtest.unifiedpost.com/auth/realms/devtest-btx-sso
                    btx:kc_subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                    bqid:bqid_issuer: https://idp.dev.myid-idp.unifiedpost.com
                    bqid:bqid_subject: 6aedcc54-ea94-4a87-bdbe-fc61115199f6
                    global:email: steve.doe@test.com
                  type: person
                  billingCurrency: EUR
                  communicationData:
                    mobile: '+32497666002'
                    email: john@example.com
                    deviceId: '12345'
                    locale: en
                  firstName: Steve
                  lastName: Doe
                  nationality: British
                  picture: link_picture
                  verified: true
                  dateOfBirth: 1970-05-01
                totalElements: 10
                currentPage: 0
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - entity_read
  /v1/entities/{entityId}/permissions:
    get:
      tags:
      - Entities
      summary: Get granted permissions
      description: 'Retrieve all permissions granted on this entity <br/> Scope: onboarding_service'
      operationId: getEntityPermissions
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: granted
        in: query
        description: Whether to filter only granted/not granted permissions
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsWrapperResult'
              example:
                subjects:
                - requester: 00000001-0000-0000-0000-000000000000
                  permissions:
                  - id: 10000000-0000-0000-0000-000000000000
                    scope: entity_read
                    granted: true
                  - id: 20000000-0000-0000-0000-000000000000
                    scope: entity_write
                    granted: true
                - requester: 00000002-0000-0000-0000-000000000000
                  permissions:
                  - id: 30000000-0000-0000-0000-000000000000
                    scope: entity_read
                    granted: true
                  - id: 40000000-0000-0000-0000-000000000000
                    scope: entity_write
                    granted: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - onboarding_service
    post:
      tags:
      - Entities
      summary: Create permission on entity
      description: 'Create a permission (scope) on this entity to a user (requester)
        <br/> Scope: onboarding_service'
      operationId: createEntityPermission
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Permission to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionRequest'
            example:
              requester: 00000001-0000-0000-0000-000000000000
              permission: entity_read
              granted: true
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsResult'
              example:
                requester: 00000001-0000-0000-0000-000000000000
                id: 32026548-88a8-40bb-9e23-64dc2691cb2d
                scope: entity_read
                granted: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - onboarding_service
  /v1/entities/{entityId}:
    get:
      tags:
      - Entities
      summary: Get entity by uuid
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve entity by uuid <br/> Scope: entity_read'
      operationId: getEntity
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BtxEntityResult'
              examples:
                NaturalPerson:
                  description: NaturalPerson
                  value:
                    description: This is a person
                    sandbox: false
                    levelOfAssurance: urn:btx:L1
                    id: 00000001-0000-0000-0000-000000000000
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        house: '7850'
                        postalCode: '3100'
                        city: Kubhaven
                        countryCode: BE
                    personalDataConsent: 2023-06-01 16:30:01+00:00
                    termsConditionsConsent: 2023-06-01 16:30:01+00:00
                    subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                    globalIdentifiers:
                      btx:kc_issuer: https://iam.devtest.unifiedpost.com/auth/realms/devtest-btx-sso
                      btx:kc_subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                      bqid:bqid_issuer: https://idp.dev.myid-idp.unifiedpost.com
                      bqid:bqid_subject: 6aedcc54-ea94-4a87-bdbe-fc61115199f6
                      global:email: steve.doe@test.com
                      global:phoneNumber: '+32497805201'
                    type: person
                    billingCurrency: EUR
                    communicationData:
                      mobile: '+32497805201'
                      email: steve.doe@test.com
                      deviceId: '12345'
                      locale: en
                    paymentMetaData:
                      pxg:applicationAccountIdentifier: sdfgdfy-654-511
                      ocs:merchantId: '12345'
                    firstName: Steve
                    lastName: Doe
                    nationality: British
                    picture: link_picture
                    verified: true
                    dateOfBirth: 1970-05-01
                Business:
                  description: Business
                  value:
                    description: This is a business
                    sandbox: false
                    levelOfAssurance: urn:btx:L1
                    id: 00000011-0000-0000-0000-000000000000
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        house: '80728'
                        postalCode: '3110'
                        city: Fernandahaven
                        country: Belgium
                        countryCode: BE
                    personalDataConsent: 2023-06-01 16:30:01+00:00
                    termsConditionsConsent: 2023-06-01 16:30:01+00:00
                    globalIdentifiers:
                      fr:siret: '53051415700029'
                      nl:kvk: '87654321'
                    type: business
                    communicationData:
                      mobile: '+32497666003'
                      email: bob@example.com
                      deviceId: '12345'
                      locale: de
                    paymentMetaData:
                      pxg:applicationAccountIdentifier: sdfgdfy-654-511
                      ocs:merchantId: '12345'
                    legalName: Unifiedpost Group
                    tradeName: Unifiedpost
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - entity_read
  /v1/entities/{entityId}/permissions/{permissionId}:
    delete:
      tags:
      - Entities
      summary: Delete permission on entity
      description: 'Remove requester''s permission on entity <br/> Scope: onboarding_service'
      operationId: deleteEntityPermission
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: permissionId
        in: path
        description: The permission identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content - The permission was successfully deleted.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - oauth2:
        - onboarding_service
  /v1/entities/{entityId}/settings:
    get:
      tags:
      - Entities
      summary: Get entity settings
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get entity settings <br/> Scope: entity_read'
      operationId: getEntitySettings
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                vatChargeableMethod: payment_date
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_read
    patch:
      tags:
      - Entities
      summary: Update entity settings
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update entity''s settings using JSON patch <br/> Scope: entity_write'
      operationId: patchEntitySettings
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Settings patch request in JSON patch format
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: add
              path: /vatChargeableMethod
              value: payment_date
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                vatChargeableMethod: payment_date
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_write
  /v1/entities/{entityId}/communicationData:jsonpatch:
    patch:
      tags:
      - Entities
      summary: Update entity communicationData
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update entity''s communication data using JSON patch <br/> Scope: entity_write'
      operationId: patchEntityCommunicationData
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Communication data patch request in JSON patch format
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /email
              value: contact@belgocorp.be
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationDataDto'
              example:
                mobile: '+32497666003'
                email: bob@example.com
                deviceId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                locale: nl-BE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_write
  /v1/entities/{entityId}/spaces:
    get:
      tags:
      - Entities
      summary: Get current user's spaces on entity
      description: Retrieve all accessible spaces (on this entity) for current user
      operationId: getAllEntitySpaces
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: isDefault
        in: query
        description: Space has the flag `isDefault`
        schema:
          type: boolean
        example: true
      - name: spaceType
        in: query
        description: Space type
        schema:
          $ref: '#/components/schemas/SpaceType'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllEntitySpaceResult'
              example:
                spaces:
                - id: 00000001-0000-0000-0000-000000000000
                  link: https://locahost/v1/spaces/00000001-0000-0000-0000-000000000000
                  isDefault: true
                  spaceType: BUSINESS
                  status: ACTIVE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
    post:
      tags:
      - Entities
      summary: Create space
      description: 'Create a new space with type PERSONAL or BUSINESS <br/> Scope:
        entity_write'
      operationId: createSpace
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Space data to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceRequest'
            example:
              name: Invoices space
              type: BUSINESS
              segment: SME
              description: The best space for my invoices
              isDefault: true
              context:
                brand: Banqup
              globalIdentifiers:
                global:gln:
                - '1548079098355'
                fr:siren:suffixes:
                - RETAIL-001
                - TRADE-002
              settings:
                locale: nl-BE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceResult'
              example:
                id: 00000001-0000-0000-0000-000000000000
                name: Invoices space
                type: BUSINESS
                status: CREATING
                segment: SME
                region: eu
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_write
  /v1/entities/{entityId}/taxInfo:
    get:
      tags:
      - Entities
      summary: Get tax information
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve entity''s tax information <br/> Scope: entity_read'
      operationId: getTaxInfo
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: withTaxRegistrations
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                - percentage: 30.0
                  subsidiaryId: ENT002
                  subsidiaryName: Subsidiary 2
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    streetName: Milo Crossroad
                    house: '7850'
                    city: Kubhaven
                    country: Belgium
                    postalCode: '3100'
                    countryCode: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - entity_read
    post:
      tags:
      - Entities
      summary: Create tax information
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Register entity''s tax information <br/> Scope: entity_write'
      operationId: createEntityTaxInfo
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax Information to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxInfoRequest'
            example:
              corporateId: corporate456
              smallEnterprise: true
              deductionLimitations:
              - limit: 500.0
                startDate: 2024-01-23
                endDate: 2025-01-23
              parentEquityParticipations:
              - percentage: 30.0
                subsidiaryId: 00000001-0000-0000-0000-000000000000
                subsidiaryName: Sub 1
                startDate: 2024-01-23
                endDate: 2025-01-23
              - percentage: 30.0
                subsidiaryId: 00000003-0000-0000-0000-000000000000
                subsidiaryName: Sub 2
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                - percentage: 30.0
                  subsidiaryId: ENT002
                  subsidiaryName: Subsidiary 2
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    streetName: Milo Crossroad
                    house: '7850'
                    city: Kubhaven
                    country: Belgium
                    postalCode: '3100'
                    countryCode: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - entity_write
    delete:
      tags:
      - Entities
      summary: Delete tax information
      description: "<div class='my-preview'><span>Preview: The API is in development\
        \ or testing phases and the interface could still change slightly.</span></div>\
        \ <br/> Delete entity's tax information. Tax information cannot be deleted\
        \ if its tax registration is still linked to any space.\n <br/> Scope: entity_write"
      operationId: deleteTaxInfo
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - oauth2:
        - entity_write
    patch:
      tags:
      - Entities
      summary: Update tax information
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update tax information <br/> Scope: entity_write'
      operationId: updateTaxInfo
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax information to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxInfoRequest'
            example:
              corporateId: corporate456
              smallEnterprise: true
              deductionLimitations:
              - limit: 500.0
                startDate: 2024-01-23
                endDate: 2025-01-23
              parentEquityParticipations:
              - percentage: 30.0
                subsidiaryId: 00000001-0000-0000-0000-000000000000
                subsidiaryName: Sub 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '200':
          description: Tax information updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResult'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                - percentage: 30.0
                  subsidiaryId: ENT002
                  subsidiaryName: Subsidiary 2
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    streetName: Milo Crossroad
                    house: '7850'
                    city: Kubhaven
                    country: Belgium
                    postalCode: '3100'
                    countryCode: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - entity_write
  /v1/entities/{entityId}/taxRegistrations:
    post:
      tags:
      - Entities
      summary: Create tax registration (VAT ID)
      description: 'Register the tax registration (VAT ID) <br/> Scope: entity_write'
      operationId: createEntityTaxRegistration
      parameters:
      - name: entityId
        in: path
        description: The entity uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax registration data to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxRegistrationRequest'
            example:
              taxId: DE44444444
              country: US
              type: Corporate
              voluntaryTax: true
              oss: false
              startDate: 2024-01-23
              endDate: 2025-01-23
              vatGroup:
                name: Retail company 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxRegistrationResult'
              example:
                id: 1fa85f24-5717-4562-b3fc-2c963f66afa6
                taxId: DE44444444
                country: US
                type: Corporate
                voluntaryTax: true
                oss: false
                startDate: 2024-01-23
                endDate: 2025-01-23
                vatGroup:
                  name: Retail company 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                spaces:
                - id: 00000001-0000-0000-0000-000000000000
                  name: Business space
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - entity_write
  /v1/entities/{entityId}/taxRegistrations/{taxRegistrationId}:
    delete:
      tags:
      - Entities
      summary: Delete tax registration
      description: "Delete tax registration with ID. The tax registration cannot be\
        \ deleted if still linked to any space\n <br/> Scope: entity_write"
      operationId: deleteTaxRegistration
      parameters:
      - name: entityId
        in: path
        description: The entity uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: taxRegistrationId
        in: path
        description: The tax registration identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - oauth2:
        - entity_write
    patch:
      tags:
      - Entities
      summary: Update tax registration
      description: 'Update tax registration with ID <br/> Scope: entity_write'
      operationId: updateTaxRegistration
      parameters:
      - name: entityId
        in: path
        description: The entity uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: taxRegistrationId
        in: path
        description: The tax registration identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax registration to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxRegistrationRequest'
            example:
              taxId: DE44444444
              country: US
              type: Corporate
              voluntaryTax: true
              oss: false
              startDate: 2024-01-23
              endDate: 2025-01-23
              vatGroup:
                name: Retail company 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '200':
          description: Tax registration updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxRegistrationResult'
              example:
                id: 1fa85f24-5717-4562-b3fc-2c963f66afa6
                taxId: DE44444444
                country: US
                type: Corporate
                voluntaryTax: true
                oss: false
                startDate: 2024-01-23
                endDate: 2025-01-23
                vatGroup:
                  name: Retail company 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                spaces:
                - id: 00000001-0000-0000-0000-000000000000
                  name: Business space
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - entity_write
  /v2/directory/spaces:
    get:
      tags:
      - Public Directory
      summary: Lookup spaces (v2)
      description: Search for spaces using entity's global identifier. Returns ISO-20022
        structured addresses at both entity and space level.
      operationId: getSpacesByBusinessEntityGlobalIdentifierV2
      parameters:
      - name: identifierValue
        in: query
        description: Global identifier (e.g. VAT number)
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Global identifier key/value pair
        schema:
          type: array
          items:
            type: string
        example: be:vat=BE123456789
      - name: name
        in: query
        description: Searched name
        schema:
          type: string
        example: UP
      - name: countryCode
        in: query
        description: Country code
        schema:
          type: string
        example: BE
      - name: spaceType
        in: query
        description: Space type. It can be multiple values separated by comma, or
          just one value.
        schema:
          type: string
      - name: entityType
        in: query
        description: Entity type
        schema:
          $ref: '#/components/schemas/EntityType'
      - name: sandbox
        in: query
        description: Entity has the flag `sandbox`
        schema:
          type: boolean
        example: true
      - name: entityId
        in: query
        description: Filter spaces belonging to the specified entity
        schema:
          type: string
          format: uuid
        example: d43d461a-a7e8-402a-b327-1c6458ab82d8
      - name: spaceId
        in: query
        description: Filter spaces by space id.
        schema:
          type: string
          format: uuid
        example: 120ee80b-cd74-4885-8796-022f9f07e9bd
      - name: isDefault
        in: query
        description: Filter spaces by whether they are set as default
        schema:
          type: boolean
        example: true
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllSpaceDirectoryResultV2'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
  /v2/directory/entities/{entityId}:
    get:
      tags:
      - Public Directory
      summary: Get public entity information (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve public entity information. Returns addresses in ISO 20022 format.'
      operationId: getDirectoryEntityV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
        example: 199bf9b6-8c6a-4529-b72f-683135765957
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryEntityResponseV2'
              examples:
                business:
                  description: business
                  value:
                    id: 00000002-0000-0000-0000-000000000000
                    type: business
                    legalName: Unifiedpost Group
                    tradeName: Unifiedpost
                    countryCode: BE
                    verified: true
                    description: This is a company
                    addresses:
                      main:
                        addressType: BIZZ
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    globalIdentifiers:
                      nl:kvk: '62196830'
                      fr:siret: '46802815115880'
                      be:vat: BE0417497106
                      global:email: john@example.com
                      global:phoneNumber: 0123456789
                      global:website: www.example.com
                personal:
                  description: personal
                  value:
                    id: 00000002-0000-0000-0000-000000000000
                    type: person
                    firstName: Steve
                    lastName: Doe
                    countryCode: BE
                    verified: true
                    description: This is a person
                    globalIdentifiers:
                      global:email: steve.doe@test.com
                      global:phoneNumber: '+32497805201'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
  /v2/directory/entities/{entityId}/spaces/{spaceId}:
    get:
      tags:
      - Public Directory
      summary: Get public space information (v2)
      description: Retrieve public space information along with entity details. Returns
        ISO-20022 structured addresses at both entity and space level.
      operationId: getSpaceDirectoryDetailsV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceDirectoryResultV2'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2: []
  /v2/entities:
    get:
      tags:
      - Entities
      summary: List entities (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> GET list of current user''s accessible entities with ISO 20022 addresses.
        <br/> Scope: entity_read'
      operationId: listEntitiesV2
      parameters:
      - name: identifierValue
        in: query
        description: Global identifier (e.g. VAT number)
        schema:
          type: string
      - name: identifierKeyValue
        in: query
        description: Global identifier key/value pair
        schema:
          type: string
        example: be:vat=BE123456789
      - name: type
        in: query
        description: 'Entity type filter. Optional values: BUSINESS or PERSON'
        schema:
          $ref: '#/components/schemas/EntityType'
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntitiesResponseV2'
              example:
                entities:
                - sandbox: false
                  id: 00000011-0000-0000-0000-000000000000
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      buildingNumber: '80728'
                      postCode: '3110'
                      townName: Fernandahaven
                      country: BE
                  type: business
                  billingCurrency: EUR
                  legalName: Unifiedpost Group
                  tradeName: Unifiedpost
                - sandbox: false
                  id: 00000001-0000-0000-0000-000000000000
                  addresses:
                    main:
                      streetName: Milo Crossroad
                      buildingNumber: '7850'
                      postCode: '3100'
                      townName: Kubhaven
                      country: BE
                  personalDataConsent: 2023-06-01 16:30:01+00:00
                  termsConditionsConsent: 2023-06-01 16:30:01+00:00
                  subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                  globalIdentifiers:
                    btx:kc_issuer: https://iam.devtest.unifiedpost.com/auth/realms/devtest-btx-sso
                    btx:kc_subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                    bqid:bqid_issuer: https://idp.dev.myid-idp.unifiedpost.com
                    bqid:bqid_subject: 6aedcc54-ea94-4a87-bdbe-fc61115199f6
                    global:email: steve.doe@test.com
                  type: person
                  billingCurrency: EUR
                  communicationData:
                    mobile: '+32497666002'
                    email: john@example.com
                    deviceId: '12345'
                    locale: en
                  firstName: Steve
                  lastName: Doe
                  nationality: British
                  picture: link_picture
                  verified: true
                  dateOfBirth: 1970-05-01
                totalElements: 10
                currentPage: 0
                pageSize: 2
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_read
  /v2/entities/{entityId}:
    get:
      tags:
      - Entities
      summary: Get entity by uuid (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve entity by uuid with ISO 20022 addresses. <br/> Scope: entity_read'
      operationId: getEntityV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/BusinessResponseV2'
                - $ref: '#/components/schemas/NaturalPersonResponseV2'
              examples:
                NaturalPerson:
                  description: NaturalPerson
                  value:
                    description: This is a person
                    sandbox: false
                    levelOfAssurance: urn:btx:L1
                    id: 00000001-0000-0000-0000-000000000000
                    addresses:
                      main:
                        streetName: Milo Crossroad
                        buildingNumber: '7850'
                        postCode: '3100'
                        townName: Kubhaven
                        country: BE
                    personalDataConsent: 2023-06-01 16:30:01+00:00
                    termsConditionsConsent: 2023-06-01 16:30:01+00:00
                    subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                    globalIdentifiers:
                      btx:kc_issuer: https://iam.dev.unifiedpost.com/auth/realms/dev-btx-sso
                      btx:kc_subject: cdc799ef-28d3-4299-b05d-dfb12ebb7a56
                      bqid:bqid_issuer: https://idp.dev.myid-idp.unifiedpost.com
                      bqid:bqid_subject: 6aedcc54-ea94-4a87-bdbe-fc61115199f6
                      global:email: steve.doe@test.com
                      global:phoneNumber: '+32497805201'
                    type: person
                    billingCurrency: EUR
                    communicationData:
                      mobile: '+32497805201'
                      email: steve.doe@test.com
                      deviceId: '12345'
                      locale: en
                    firstName: Steve
                    lastName: Doe
                    nationality: British
                    picture: link_picture
                    verified: true
                    dateOfBirth: 1970-05-01
                Business:
                  description: Business
                  value:
                    description: This is a business
                    sandbox: false
                    levelOfAssurance: urn:btx:L1
                    id: 00000011-0000-0000-0000-000000000000
                    addresses:
                      main:
                        streetName: Nitzsche Lodge
                        buildingNumber: '80728'
                        postCode: '3110'
                        townName: Fernandahaven
                        country: BE
                    personalDataConsent: 2023-06-01 16:30:01+00:00
                    termsConditionsConsent: 2023-06-01 16:30:01+00:00
                    globalIdentifiers:
                      fr:siret: '53051415700029'
                      nl:kvk: '87654321'
                    type: business
                    communicationData:
                      mobile: '+32497666003'
                      email: bob@example.com
                      deviceId: '12345'
                      locale: de
                    legalName: Unifiedpost Group
                    tradeName: Unifiedpost
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_read
  /v2/entities/{entityId}/communicationData:jsonpatch:
    patch:
      tags:
      - Entities
      summary: Update entity communicationData (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update entity''s communication data using JSON patch (v2) <br/> Scope:
        entity_write'
      operationId: patchEntityCommunicationDataV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Communication data patch request in JSON patch format
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /email
              value: contact@belgocorp.be
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationDataDto'
              example:
                mobile: '+32497666003'
                email: bob@example.com
                deviceId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                locale: nl-BE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_write
  /v2/entities/{entityId}/spaces:
    post:
      tags:
      - Entities
      summary: Create a space (v2)
      description: 'Create a new space with type PERSONAL or BUSINESS <br/> Scope:
        entity_write'
      operationId: createSpaceV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Create space request (v2)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceRequestV2'
            example:
              name: Invoices space
              type: BUSINESS
              segment: SME
              description: The best space for my invoices
              isDefault: true
              context:
                brand: Banqup
              globalIdentifiers:
                global:gln:
                - '1548079098355'
                fr:siren:suffixes:
                - RETAIL-001
                - TRADE-002
              settings:
                locale: nl-BE
              addresses:
                main:
                  streetName: Rue Belliard
                  buildingNumber: '1'
                  postCode: '1040'
                  townName: Brussels
                  country: BE
              communicationData:
                mobile: '+32497666003'
                email: invoices@example.com
                deviceId: device-abc
                locale: nl-BE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceResponseV2'
              example:
                id: 00000001-0000-0000-0000-000000000000
                name: Invoices space
                description: Main invoicing space
                type: BUSINESS
                status: ACTIVE
                segment: SME
                region: eu
                isDefault: true
                globalIdentifiers:
                  be:vat: BE0123456789
                  fr:siren:suffixes:
                  - RETAIL-001
                  - TRADE-002
                addresses:
                  main:
                    streetName: Rue Belliard
                    buildingNumber: '1'
                    postCode: '1040'
                    townName: Brussels
                    country: BE
                timestamps:
                  createdAt: 2025-07-04 14:20:31.502921+00:00
                  updatedAt: 2025-07-04 14:20:31.502921+00:00
                communicationData:
                  mobile: '+32497666003'
                  email: invoices@example.com
                  deviceId: device-abc
                  locale: nl-BE
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - entity_write
  /v2/entities/{entityId}/taxInfo:
    get:
      tags:
      - Entities
      summary: Get tax information (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve entity''s tax information <br/> Scope: entity_read'
      operationId: getTaxInfoV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: withTaxRegistrations
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResponseV2'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    addressType: BIZZ
                    streetName: Nitzsche Lodge
                    buildingNumber: '80728'
                    postCode: '3110'
                    townName: Fernandahaven
                    country: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - entity_read
    post:
      tags:
      - Entities
      summary: Create tax information (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Register entity''s tax information <br/> Scope: entity_write'
      operationId: createEntityTaxInfoV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax Information to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxInfoRequest'
            example:
              corporateId: corporate456
              smallEnterprise: true
              deductionLimitations:
              - limit: 500.0
                startDate: 2024-01-23
                endDate: 2025-01-23
              parentEquityParticipations:
              - percentage: 30.0
                subsidiaryId: 00000001-0000-0000-0000-000000000000
                subsidiaryName: Sub 1
                startDate: 2024-01-23
                endDate: 2025-01-23
              - percentage: 30.0
                subsidiaryId: 00000003-0000-0000-0000-000000000000
                subsidiaryName: Sub 2
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResponseV2'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    addressType: BIZZ
                    streetName: Nitzsche Lodge
                    buildingNumber: '80728'
                    postCode: '3110'
                    townName: Fernandahaven
                    country: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - oauth2:
        - entity_write
    patch:
      tags:
      - Entities
      summary: Update tax information (v2)
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update tax information <br/> Scope: entity_write'
      operationId: updateTaxInfoV2
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Tax information to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxInfoRequest'
            example:
              corporateId: corporate456
              smallEnterprise: true
              deductionLimitations:
              - limit: 500.0
                startDate: 2024-01-23
                endDate: 2025-01-23
              parentEquityParticipations:
              - percentage: 30.0
                subsidiaryId: 00000001-0000-0000-0000-000000000000
                subsidiaryName: Sub 1
                startDate: 2024-01-23
                endDate: 2025-01-23
        required: true
      responses:
        '200':
          description: Tax information updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxInfoResponseV2'
              example:
                id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                corporateId: corporate456
                smallEnterprise: true
                deductionLimitations:
                - limit: 500.0
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                parentEquityParticipations:
                - percentage: 30.0
                  subsidiaryId: ENT001
                  subsidiaryName: Subsidiary 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    addressType: BIZZ
                    streetName: Nitzsche Lodge
                    buildingNumber: '80728'
                    postCode: '3110'
                    townName: Fernandahaven
                    country: BE
                taxRegistrations:
                - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taxId: DE44444444
                  country: US
                  type: Corporate
                  voluntaryTax: true
                  oss: false
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                  vatGroup:
                    name: Retail company 1
                    startDate: 2024-01-23
                    endDate: 2025-01-23
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - oauth2:
        - entity_write
  /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
components:
  schemas:
    JsonBMap:
      type: object
      additionalProperties: true
    PatchRequest:
      type: array
      items:
        $ref: '#/components/schemas/PatchDocument'
    PatchDocument:
      required:
      - op
      - path
      type: object
      properties:
        op:
          type: string
          description: The operation to be performed
          enum:
          - add
          - remove
          - replace
          - move
          - copy
          - test
        path:
          type: string
          description: A JSON-Pointer
        value:
          type: object
          description: The value to be used within the operations.
        from:
          type: string
          description: A string containing a JSON Pointer value.
      description: A JSONPatch document as defined by RFC 6902
    AllSpaceDirectoryResult:
      type: object
      properties:
        spaces:
          type: array
          description: List of spaces corresponding to business entity global identifier
          items:
            $ref: '#/components/schemas/SpaceDirectoryResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    DirectoryBusinessResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResult'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          addresses:
            $ref: '#/components/schemas/JsonBMap'
    DirectoryEntityResult:
      type: object
      properties:
        id:
          type: string
          description: Entity id
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        countryCode:
          type: string
          description: The country code of the entity
        description:
          type: string
          description: Text description of the entity
        verified:
          type: boolean
          description: Whether the entity is verified
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
      description: Entity information
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/DirectoryNaturalPersonResult'
          business: '#/components/schemas/DirectoryBusinessResult'
    DirectoryNaturalPersonResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResult'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    SpaceDirectoryResult:
      type: object
      properties:
        id:
          type: string
          description: Space id
          format: uuid
        entity:
          $ref: '#/components/schemas/DirectoryEntityResult'
        name:
          type: string
          description: The name of the space
        type:
          $ref: '#/components/schemas/SpaceType'
        isDefault:
          type: boolean
          description: Indicates whether this space is the default one
          example: true
        region:
          type: string
          description: The region of the space
          example: eu
        status:
          $ref: '#/components/schemas/SpaceStatus'
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
    SpaceStatus:
      type: string
      description: The status of the space
      example: CREATING
      enum:
      - CREATING
      - PROVISIONING
      - ACTIVE
      - SUSPENDED
    SpaceType:
      type: string
      description: The type of the space
      example: BUSINESS
      enum:
      - APPLICATION
      - BUSINESS
      - PERSONAL
      - PARTNER
    ApiErrorProblemDetail:
      required:
      - error
      - requestId
      - timestamp
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
          format: uri
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
    NestedProblem:
      required:
      - detail
      - error
      - title
      type: object
      properties:
        error:
          type: string
        title:
          type: string
        detail:
          type: string
        type:
          type: string
          format: uri
    EntityType:
      type: string
      description: The type of the entity
      example: BUSINESS
      enum:
      - BUSINESS
      - PERSON
    AllEntityResult:
      type: object
      properties:
        entities:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/BtxEntityResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    AssuranceLevel:
      type: string
      description: The level of assurance urn:btx:L1/L2/L3/L50/L100
      example: urn:btx:L1
      enum:
      - urn:btx:L1
      - urn:btx:L2
      - urn:btx:L3
      - urn:btx:L50
      - urn:btx:L100
    BtxEntityResult:
      type: object
      properties:
        id:
          type: string
          description: Entity ID
          format: uuid
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: Personal data consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        description:
          type: string
          description: Text description of the entity
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessResult'
          person: '#/components/schemas/NaturalPersonResult'
    BusinessResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BtxEntityResult'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
    CommunicationDataDto:
      type: object
      properties:
        mobile:
          type: string
          description: 'The phone number of user. Expecting E.164 international phone
            number format : +[country code][area code][local phone number]'
        email:
          type: string
          description: The email of user
        deviceId:
          type: string
          description: The device is used to push notifications
        locale:
          type: string
          description: The locale base on IETF BCP 47 standard - https://en.wikipedia.org/wiki/IETF_language_tag
      description: Communication data
    EntityMetadata:
      $ref: '#/components/schemas/JsonBMap'
    EntityPaymentMetaData:
      $ref: '#/components/schemas/JsonBMap'
    EntitySettings:
      $ref: '#/components/schemas/JsonBMap'
    NaturalPersonResult:
      type: object
      allOf:
      - $ref: '#/components/schemas/BtxEntityResult'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
          nationality:
            type: string
            description: Nationality
          picture:
            type: string
            description: 'Verified image link '
          verified:
            type: boolean
            description: Verification status
          dateOfBirth:
            type: string
            description: Date of birth
            format: date
          subject:
            type: string
            description: IAM Subject
            deprecated: true
    SepaStructuredAddress:
      type: object
      properties:
        streetName:
          type: string
          description: Name of the street
          example: Avenue Reine Astrid
        house:
          type: string
        buildingNumber:
          type: string
          description: A unique number assigned to the building in the street or area
          example: A22
        level:
          type: string
        postalCode:
          type: string
          description: Series of letters or digits or both, included in a postal address
          example: 12345-1A
        city:
          type: string
          description: Name of the city
          example: La Hulpe
        state:
          type: string
          description: Name of the state
          example: California
        country:
          type: string
          description: Name of the country
          example: Belgium
        countryCode:
          type: string
          description: Two-letter country code defined in ISO 3166
          example: BE
        province:
          type: string
        postalCodeExtension:
          type: string
        department:
          maxLength: 70
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
        subDepartment:
          maxLength: 70
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
        buildingName:
          maxLength: 35
          type: string
          description: Name of the building or house.
          example: Empire State Building
        floor:
          maxLength: 70
          type: string
          description: A unique number or name assigned to the floor within the building
          example: ground
        postBox:
          maxLength: 16
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1033'
        room:
          maxLength: 70
          type: string
          description: Building room number.
          example: '2.22'
        cityLocationName:
          maxLength: 35
          type: string
          description: Specific location name within the town.
          example: City center
        district:
          type: string
          description: Identifies a subdivision within a country sub-division
          example: Walloon Brabant
        subDistrict:
          maxLength: 35
          type: string
          description: Identifies a subdivision of a country such as state, region,
            county.
          example: Wallonia
      description: 'EPC Interbank Structured Address Structure. Structured addresses
        are address information split into several fields instead of one unstructured
        address field.

        From November 2023, all banks and PSPs will have to accept payment messages
        with structured addresses.

        From 2025, banks and PSPs will have to send all their messages with structured
        addresses.

        '
      externalDocs:
        description: More about EPC Interbank Structured Address Structure
        url: https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
    AccountIdentifier:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
    BankIdentifier:
      type: object
      properties:
        identifier:
          type: string
          description: Bank Identifier
          example: PANXBEB1XXX
        scheme:
          type: string
          description: Bank Identifier Scheme
          example: BIC
          enum:
          - BIC
          - CODE
          - ABA
          - CLABE
          - THIRD_PARTY
      description: Information about the issuer of the account
    PagedPaymentAccountResultList:
      type: object
      properties:
        paymentAccounts:
          type: array
          description: List of payment accounts
          items:
            $ref: '#/components/schemas/PaymentAccountResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    PaymentAccountResult:
      type: object
      properties:
        id:
          type: string
          description: PaymentAccount id
          format: uuid
        entityId:
          type: string
          description: Id of entity to which this PaymentAccount belongs to.
          format: uuid
        identifier:
          type: string
          description: Identifier of the payment account
        scheme:
          type: string
          description: Scheme of the payment account
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    AllDirectoryPersonResult:
      type: object
      properties:
        entities:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/DirectoryPersonResult'
    DirectoryPersonResult:
      type: object
      properties:
        id:
          type: string
          description: Entity ID
          format: uuid
        type:
          type: string
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        firstName:
          type: string
          description: Person first name
        lastName:
          type: string
          description: Person last name
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        subject:
          type: string
          description: IAM Subject
          deprecated: true
    BusinessTargetEntityResponse:
      required:
      - id
      - legalName
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/TargetEntityResponse'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of the business
            example: Acme Corporation
          tradeName:
            type: string
            description: Trade name of the business
            example: Acme
    EntityRelationResponse:
      type: object
      properties:
        id:
          type: string
          description: The relation's unique identifier
          format: uuid
        role:
          type: string
          description: The role of the relation
          example: HAS_LEGAL_REPRESENTATIVE
        targetEntity:
          $ref: '#/components/schemas/TargetEntityResponse'
        createdAt:
          type: string
          description: Creation timestamp
          format: date-time
        updatedAt:
          type: string
          description: Last update timestamp
          format: date-time
    PersonTargetEntityResponse:
      required:
      - firstName
      - id
      - lastName
      - type
      type: object
      allOf:
      - $ref: '#/components/schemas/TargetEntityResponse'
      - type: object
        properties:
          firstName:
            type: string
            description: First name of the person
            example: John
          lastName:
            type: string
            description: Last name of the person
            example: Doe
    TargetEntityResponse:
      required:
      - id
      - type
      type: object
      properties:
        id:
          type: string
          description: The target entity's unique identifier
          format: uuid
        type:
          type: string
          description: The type of the target entity
          example: person
      description: The target entity details
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/PersonTargetEntityResponse'
          business: '#/components/schemas/BusinessTargetEntityResponse'
    EntityRelationRequest:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/EntityRelationRole'
        targetEntityId:
          type: string
          description: The target entity's unique identifier
          format: uuid
          example: 27306bf6-d77b-4f10-b2c8-a0865d68e898
    EntityRelationRole:
      type: string
      description: The role of the entity relation
      example: HAS_LEGAL_REPRESENTATIVE
      enum:
      - HAS_LEGAL_REPRESENTATIVE
    ListEntityRelationsResponse:
      type: object
      properties:
        entityRelations:
          type: array
          description: List of entity relations
          items:
            $ref: '#/components/schemas/EntityRelationResponse'
    UpdateEntityRelationRequest:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/EntityRelationRole'
        targetEntityId:
          type: string
          description: The target entity's unique identifier
          format: uuid
          example: 27306bf6-d77b-4f10-b2c8-a0865d68e898
    BusinessRequest:
      type: object
      allOf:
      - $ref: '#/components/schemas/EntityRequest'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Colloquial name of business
    EntityRequest:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/NaturalPersonRequest'
          business: '#/components/schemas/BusinessRequest'
    NaturalPersonRequest:
      type: object
      allOf:
      - $ref: '#/components/schemas/EntityRequest'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
          nationality:
            type: string
            description: Nationality
          picture:
            type: string
            description: Verified image (link to cloud store)
          verified:
            type: boolean
            description: Verification status
          dateOfBirth:
            type: string
            description: Date of birth
            format: date
          subject:
            type: string
            description: IAM Subject
            deprecated: true
    PermissionListItem:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the permission.
        scope:
          type: string
          description: The scope name associated with the permission.
          example: entity_read
        granted:
          type: boolean
          description: Indicates whether the permission is granted or not (true/false).
    PermissionsResult:
      required:
      - requester
      type: object
      properties:
        requester:
          type: string
          description: the requester
        permissions:
          type: array
          description: the list of permissions
          items:
            $ref: '#/components/schemas/PermissionListItem'
    PermissionRequest:
      type: object
      properties:
        requester:
          type: string
          description: OIDC subject that identifies the user or service account for
            which the permission is granted.
        permission:
          type: string
          description: The permission will be added
        granted:
          type: boolean
          description: Whether the permission is granted
    EntityIdentityMetaData:
      type: object
      properties:
        empty:
          type: boolean
      additionalProperties:
        type: object
    PermissionsWrapperResult:
      type: object
      properties:
        subjects:
          type: array
          description: List of permissions
          items:
            $ref: '#/components/schemas/PermissionsResult'
    JsonPatch:
      type: object
    UpdateBusinessRequest:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        legalName:
          type: string
          description: Legal name of business
        tradeName:
          type: string
          description: Colloquial name of business
    UpdateEntityRequest:
      required:
      - type
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        type:
          type: string
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/UpdateNaturalPersonRequest'
          business: '#/components/schemas/UpdateBusinessRequest'
    UpdateNaturalPersonRequest:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        firstName:
          type: string
          description: Person first name
        lastName:
          type: string
          description: Person last name
        nationality:
          type: string
          description: Nationality
        picture:
          type: string
          description: Verified image (link to cloud store)
        verified:
          type: boolean
          description: Verification status
        dateOfBirth:
          type: string
          description: Date of birth
          format: date
        subject:
          type: string
          description: IAM Subject
          deprecated: true
    SpaceResult:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        name:
          type: string
          description: The name of the space
        type:
          $ref: '#/components/schemas/SpaceType'
        status:
          $ref: '#/components/schemas/SpaceStatus'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        region:
          type: string
          description: The region of the space
          example: eu
    SpaceSegment:
      type: string
      description: 'The segment of the space, depending on the type. Allowed values:
        PERSONAL -> CONSUMER, CARETAKER_CLIENT; BUSINESS -> SME, CORPORATE; PARTNER
        -> ACCOUNTING, RESELLER, CARETAKER, REFERRAL, SYSTEM_INTEGRATOR; APPLICATION
        -> null.'
      example: CONSUMER
      enum:
      - CONSUMER
      - CARETAKER_CLIENT
      - SME
      - CORPORATE
      - ACCOUNTING
      - RESELLER
      - CARETAKER
      - REFERRAL
      - SYSTEM_INTEGRATOR
    SpaceRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of space
        type:
          $ref: '#/components/schemas/SpaceType'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        description:
          type: string
          description: Description of space
        isDefault:
          type: boolean
          description: Default space?
        context:
          type: object
          additionalProperties:
            type: object
            description: Space context. The context modules will be ignored and always
              set to default values.
            example:
              brand: Banqup
          description: Space context. The context modules will be ignored and always
            set to default values.
          example:
            brand: Banqup
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
    AllEntitySpaceResult:
      type: object
      properties:
        spaces:
          type: array
          description: List of response spaces
          items:
            $ref: '#/components/schemas/EntitySpaceResult'
    EntitySpaceResult:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        link:
          type: string
          description: Space URL
        isDefault:
          type: boolean
          description: Indicates whether this space is the default one
          example: true
        spaceType:
          $ref: '#/components/schemas/SpaceType'
        status:
          $ref: '#/components/schemas/SpaceStatus'
    LinkedPaymentAccountResult:
      type: object
      properties:
        id:
          type: string
          description: PaymentAccount id
          format: uuid
        entityId:
          type: string
          description: Id of entity to which this PaymentAccount belongs to.
          format: uuid
        identifier:
          type: string
          description: Identifier of the payment account
        scheme:
          type: string
          description: Scheme of the payment account
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        spaces:
          type: array
          description: List of associated spaces
          items:
            $ref: '#/components/schemas/PaymentAccountSpaceDetails'
    PaymentAccountPaymentMetaData:
      $ref: '#/components/schemas/JsonBMap'
    PaymentAccountSpaceDetails:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        name:
          type: string
          description: Space name
      description: List of associated spaces
    SpacesList:
      type: object
      properties:
        spaces:
          type: array
          description: List of spaces ids
          items:
            type: string
            description: List of spaces ids
    LinkedPaymentAccountResultList:
      type: object
      properties:
        paymentAccounts:
          type: array
          description: List of payment account
          items:
            $ref: '#/components/schemas/LinkedPaymentAccountResult'
    GetBulkPaymentAccountsRequest:
      type: object
      properties:
        paymentAccounts:
          type: array
          description: List of data uniquely identifying payment accountsThe size
            must be between configured min and max. Eg min = 1, max = 100
          items:
            $ref: '#/components/schemas/AccountIdentifier'
    PaymentAccountRequest:
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        country:
          pattern: ^[a-zA-Z]{2}
          type: string
          example: BE
        currency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the currency used
          example: EUR
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
    PermissionResult:
      type: object
      properties:
        requester:
          type: string
          description: The identifier of the requester who is requesting the permission.
        id:
          type: string
          description: The unique identifier for the permission.
        scope:
          type: string
          description: The scope name associated with the permission.
          example: entity_read
        granted:
          type: boolean
          description: Indicates whether the permission is granted or not (true/false).
    UpdatePaymentAccountRequest:
      type: object
      properties:
        parent:
          $ref: '#/components/schemas/AccountIdentifier'
    DeductionLimitation:
      type: object
      properties:
        limit:
          type: number
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
      description: Deduction Limitations
    Equityparticipation:
      type: object
      properties:
        percentage:
          type: number
        subsidiaryId:
          type: string
        subsidiaryName:
          type: string
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
      description: Parent Equity participations
    SepaStructuredAddressBook:
      type: object
      description: Addresses
    TaxInfoResult:
      type: object
      properties:
        id:
          type: string
          description: TaxInfo id
          format: uuid
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        smallEnterprise:
          type: boolean
          description: Small enterprise
        deductionLimitations:
          type: array
          description: Deduction Limitations
          items:
            $ref: '#/components/schemas/DeductionLimitation'
        parentEquityParticipations:
          type: array
          description: Parent Equity participations
          items:
            $ref: '#/components/schemas/Equityparticipation'
        addresses:
          $ref: '#/components/schemas/SepaStructuredAddressBook'
        taxRegistrations:
          type: array
          items:
            $ref: '#/components/schemas/TaxRegistrationResult'
    TaxRegistrationResult:
      type: object
      properties:
        id:
          type: string
          description: Tax Registration ID
        taxId:
          type: string
          description: Tax ID
        country:
          type: string
          description: Country
        type:
          type: string
          description: Tax type
        voluntaryTax:
          type: boolean
          description: Is voluntary tax?
        oss:
          type: boolean
          description: OSS?
        startDate:
          type: string
          description: Start Date
          format: date
        endDate:
          type: string
          description: End Date
          format: date
        vatGroup:
          $ref: '#/components/schemas/VatGroup'
        spaces:
          type: array
          description: List of associated spaces
          items:
            $ref: '#/components/schemas/TaxRegistrationSpaceDetails'
    TaxRegistrationSpaceDetails:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        name:
          type: string
          description: Space name
      description: List of associated spaces
    VatGroup:
      type: object
      properties:
        name:
          type: string
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
      description: VAT group
    TaxInfoRequest:
      type: object
      properties:
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        smallEnterprise:
          type: boolean
          description: Small enterprise
        deductionLimitations:
          type: array
          description: Deduction Limitations
          items:
            $ref: '#/components/schemas/DeductionLimitation'
        parentEquityParticipations:
          type: array
          description: Parent Equity participations
          items:
            $ref: '#/components/schemas/Equityparticipation'
    UpdateTaxInfoRequest:
      type: object
      properties:
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        smallEnterprise:
          type: boolean
          description: Small enterprise
        deductionLimitations:
          type: array
          description: Deduction Limitations
          items:
            $ref: '#/components/schemas/DeductionLimitation'
        parentEquityParticipations:
          type: array
          description: Parent Equity participations
          items:
            $ref: '#/components/schemas/Equityparticipation'
    TaxRegistrationRequest:
      type: object
      properties:
        taxId:
          type: string
          description: Tax ID
        country:
          type: string
          description: Country
        type:
          type: string
          description: Tax type
        voluntaryTax:
          type: boolean
          description: Is voluntary tax?
        oss:
          type: boolean
          description: OSS?
        startDate:
          type: string
          description: Start Date
          format: date
        endDate:
          type: string
          description: End date
          format: date
        vatGroup:
          $ref: '#/components/schemas/VatGroup'
    UpdateTaxRegistrationRequest:
      type: object
      properties:
        taxId:
          type: string
          description: Tax ID
        country:
          type: string
          description: Country
        type:
          type: string
          description: Tax type
        voluntaryTax:
          type: boolean
          description: Is voluntary tax?
        oss:
          type: boolean
          description: OSS?
        startDate:
          type: string
          description: Start Date
          format: date
        endDate:
          type: string
          description: End Date
          format: date
        vatGroup:
          $ref: '#/components/schemas/VatGroup'
    AllSpaceDirectoryResultV2:
      type: object
      properties:
        spaces:
          type: array
          description: List of spaces corresponding to business entity global identifier
          items:
            $ref: '#/components/schemas/SpaceDirectoryResultV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    DirectoryBusinessResultV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResultV2'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
    DirectoryEntityResultV2:
      type: object
      properties:
        id:
          type: string
          description: Entity id
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        countryCode:
          type: string
          description: The country code of the entity
        description:
          type: string
          description: Text description of the entity
        verified:
          type: boolean
          description: Whether the entity is verified
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
            description: Global identifiers
          description: Global identifiers
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Map of ISO-20022 addresses for the entity
      description: Entity information
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/DirectoryNaturalPersonResultV2'
          business: '#/components/schemas/DirectoryBusinessResultV2'
    DirectoryNaturalPersonResultV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResultV2'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    Iso20022StructuredAddress:
      type: object
      properties:
        country:
          type: string
          description: Nation with its own government, expressed as a two letter ISO
            3166 code (alpha-2) of the country. The country code is written in upper
            case.
          example: BE
        townName:
          type: string
          description: Name of a built-up area, with defined boundaries, and a local
            government.
          example: La Hulpe
        addressType:
          type: string
          description: Identifies the nature of the postal address.
          example: ADDR
          enum:
          - ADDR
          - PBOX
          - HOME
          - BIZZ
          - MLTO
          - DLVY
        streetName:
          maxLength: 140
          type: string
          description: Name of a street or thoroughfare.
          example: Avenue Reine Astrid
        buildingNumber:
          maxLength: 16
          type: string
          description: A unique number assigned to the building in the street or area
            //Number that identifies the position of a building on a street.
          example: '40'
        careOf:
          maxLength: 140
          type: string
          description: Identifies an addressee that is accepting the correspondence
            for the intended recipient. Using care of ensures the correspondence reaches
            the right recipient rather than getting returned to the sender.
          example: Finance
        department:
          maxLength: 70
          type: string
          description: Identification of a division of a large organisation or building.
          example: Finance
        subDepartment:
          maxLength: 70
          type: string
          description: Identification of a sub-division of a large organisation or
            building.
          example: Accounting
        buildingName:
          maxLength: 140
          type: string
          description: Name of the building or house.
          example: Empire State Building
        floor:
          maxLength: 70
          type: string
          description: Floor or storey within a building.
          example: ground
        unitNumber:
          maxLength: 16
          type: string
          description: Identifies a flat or dwelling within the building.
          example: '2'
        postBox:
          maxLength: 16
          type: string
          description: Numbered box in a post office, assigned to a person or organisation,
            where letters are kept until called for.
          example: '1003'
        room:
          maxLength: 70
          type: string
          description: Building room number.
          example: '2.22'
        postCode:
          maxLength: 16
          type: string
          description: Identifier consisting of a group of letters and/or numbers
            that is added to a postal address to assist the sorting of mail.
          example: '1310'
        townLocationName:
          maxLength: 140
          type: string
          description: Specific location name within the town. eg Borough (USA), Village
            (GB).
          example: Miami Beach
        districtName:
          maxLength: 140
          type: string
          description: Identifies a subdivision within a country sub-division eg County
            (USA), Landkreis (DE).
          example: Miami-Dade, Coburg
        countrySubDivision:
          maxLength: 35
          type: string
          description: Identifies a subdivision of a country such as state (USA),
            Bundesland (DE), region, province,....
          example: Florida, Bayern, Wallonia, Hainaut
      description: Information that locates and identifies a specific address, as
        defined by postal services
      externalDocs:
        description: More about EPC Interbank Structured Address Structure; see also
          PostalAddress27 type in https://www.iso20022.org/message/22905/download
        url: https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2022-10/EPC153-22%20EPC%20guidance%20document%20-%20Use%20of%20Structured%20Address%20under%20the%20SEPA%20Payment%20Schemes%20as%20of%20Nov%202025.pdf
    SpaceDirectoryResultV2:
      type: object
      properties:
        id:
          type: string
          description: Space id
          format: uuid
        entity:
          $ref: '#/components/schemas/DirectoryEntityResultV2'
        name:
          type: string
          description: The name of the space
        type:
          $ref: '#/components/schemas/SpaceType'
        isDefault:
          type: boolean
          description: Indicates whether this space is the default one
          example: true
        region:
          type: string
          description: The region of the space
          example: eu
        status:
          $ref: '#/components/schemas/SpaceStatus'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Map of ISO-20022 addresses for the space
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
            description: Space-level global identifiers, complementing the entity's
              global identifiers
          description: Space-level global identifiers, complementing the entity's
            global identifiers
    DirectoryBusinessResponseV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResponseV2'
      - type: object
        properties:
          legalName:
            type: string
            description: Legal name of business
          tradeName:
            type: string
            description: Trade name of business
          addresses:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/Iso20022StructuredAddress'
            description: Addresses
    DirectoryEntityResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Entity id
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        countryCode:
          type: string
          description: The country code of the entity
        description:
          type: string
          description: Text description of the entity
        verified:
          type: boolean
          description: Whether the entity is verified
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/DirectoryNaturalPersonResponseV2'
          business: '#/components/schemas/DirectoryBusinessResponseV2'
    DirectoryNaturalPersonResponseV2:
      type: object
      allOf:
      - $ref: '#/components/schemas/DirectoryEntityResponseV2'
      - type: object
        properties:
          firstName:
            type: string
            description: Person first name
          lastName:
            type: string
            description: Person last name
    BtxEntityResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Entity identifier
          format: uuid
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses of the entity
        personalDataConsent:
          type: string
          description: Personal data consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        description:
          type: string
          description: Text description of the entity
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          business: '#/components/schemas/BusinessResponseV2'
          person: '#/components/schemas/NaturalPersonResponseV2'
    BusinessResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Entity identifier
          format: uuid
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses of the entity
        personalDataConsent:
          type: string
          description: Personal data consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        description:
          type: string
          description: Text description of the entity
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        legalName:
          type: string
          description: Legal name of business
        tradeName:
          type: string
          description: Trade name of business
    ListEntitiesResponseV2:
      type: object
      properties:
        entities:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/BtxEntityResponseV2'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    NaturalPersonResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Entity identifier
          format: uuid
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses of the entity
        personalDataConsent:
          type: string
          description: Personal data consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        description:
          type: string
          description: Text description of the entity
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        firstName:
          type: string
          description: Person first name
        lastName:
          type: string
          description: Person last name
        nationality:
          type: string
          description: Nationality
        picture:
          type: string
          description: Verified image link
        verified:
          type: boolean
          description: Verification status
        dateOfBirth:
          type: string
          description: Date of birth
          format: date
    BusinessRequestV2:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        legalName:
          type: string
          description: Legal name of business
        tradeName:
          type: string
          description: Colloquial name of business
    EntityRequestV2:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/NaturalPersonRequestV2'
          business: '#/components/schemas/BusinessRequestV2'
    NaturalPersonRequestV2:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        type:
          type: string
          description: Type of entity distinguishing between Natural Person and Business
          example: person
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        sandbox:
          type: boolean
          description: Whether this is a is a sandbox company where levelOfAssurance
            is not been validated.
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        firstName:
          type: string
          description: Person first name
        lastName:
          type: string
          description: Person last name
        nationality:
          type: string
          description: Nationality
        picture:
          type: string
          description: Verified image (link to cloud store)
        verified:
          type: boolean
          description: Verification status
        dateOfBirth:
          type: string
          description: Date of birth
          format: date
    UpdateBusinessRequestV2:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        legalName:
          type: string
          description: Legal name of business
        tradeName:
          type: string
          description: Colloquial name of business
    UpdateEntityRequestV2:
      required:
      - type
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        type:
          type: string
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/UpdateNaturalPersonRequestV2'
          business: '#/components/schemas/UpdateBusinessRequestV2'
    UpdateNaturalPersonRequestV2:
      type: object
      properties:
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses
        personalDataConsent:
          type: string
          description: GDPR consent date
          format: date-time
        termsConditionsConsent:
          type: string
          description: Terms and conditions consent date
          format: date-time
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        sandbox:
          type: boolean
          description: Toggle sandbox state
        levelOfAssurance:
          $ref: '#/components/schemas/AssuranceLevel'
        description:
          type: string
          description: Text description of the entity
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        communicationData:
          $ref: '#/components/schemas/CommunicationDataDto'
        firstName:
          type: string
          description: Person first name
        lastName:
          type: string
          description: Person last name
        nationality:
          type: string
          description: Nationality
        picture:
          type: string
          description: Verified image (link to cloud store)
        verified:
          type: boolean
          description: Verification status
        dateOfBirth:
          type: string
          description: Date of birth
          format: date
    SpaceCommunicationDataDto:
      type: object
      properties:
        mobile:
          type: string
          description: 'The phone number for the space. Expecting E.164 international
            phone number format : +[country code][area code][local phone number]'
        email:
          type: string
          description: The email for the space
          format: email
        deviceId:
          type: string
          description: The device ID used for push notifications
        locale:
          type: string
          description: The locale based on IETF BCP 47 standard
      description: Communication data for the space. Optional, default null.
      example:
        mobile: '+32497666003'
        email: invoices@example.com
        deviceId: device-abc
        locale: nl-BE
    SpaceResponseV2:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        name:
          type: string
          description: The name of the space
        type:
          $ref: '#/components/schemas/SpaceType'
        status:
          $ref: '#/components/schemas/SpaceStatus'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        region:
          type: string
          description: The region of the space
          example: eu
        description:
          type: string
          description: Description of the space
        isDefault:
          type: boolean
          description: Whether this is the default space
        globalIdentifiers:
          type: object
          additionalProperties:
            type: object
            description: Global identifiers of the space
          description: Global identifiers of the space
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Map of addresses for the space
        timestamps:
          $ref: '#/components/schemas/Timestamps'
        communicationData:
          $ref: '#/components/schemas/SpaceCommunicationDataDto'
    Timestamps:
      type: object
      properties:
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
      description: Creation and last-update timestamps of the space
    SpaceRequestV2:
      type: object
      properties:
        name:
          type: string
          description: Name of space
        type:
          $ref: '#/components/schemas/SpaceType'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        description:
          type: string
          description: Description of space
        isDefault:
          type: boolean
          description: Default space?
        context:
          type: object
          additionalProperties:
            type: object
            description: Space context. The context modules will be ignored and always
              set to default values.
            example:
              brand: Banqup
          description: Space context. The context modules will be ignored and always
            set to default values.
          example:
            brand: Banqup
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Map of addresses for the space. Optional, default {}.
          example:
            main:
              streetName: Rue Belliard
              buildingNumber: '1'
              postCode: '1040'
              townName: Brussels
              country: BE
        communicationData:
          $ref: '#/components/schemas/SpaceCommunicationDataDto'
    TaxInfoResponseV2:
      type: object
      properties:
        id:
          type: string
          description: TaxInfo id
          format: uuid
        corporateId:
          type: string
          description: Trade register number or corporate tax id (different from VAT
            ID)
        smallEnterprise:
          type: boolean
          description: Small enterprise
        deductionLimitations:
          type: array
          description: Deduction Limitations
          items:
            $ref: '#/components/schemas/DeductionLimitation'
        parentEquityParticipations:
          type: array
          description: Parent Equity participations
          items:
            $ref: '#/components/schemas/Equityparticipation'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Iso20022StructuredAddress'
          description: Addresses in ISO 20022 format
        taxRegistrations:
          type: array
          items:
            $ref: '#/components/schemas/TaxRegistrationResult'
    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
    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'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.cve.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
tags:
- name: Entities
  description: 'Entities are legal organizations (companies) or natural persons (private
    individuals)  that become part of the Banqup platform upon successful onboarding.

    Every entity in Banqup has a unique identifier, which will be needed to perform
    a number of API calls on the Banqup Developer Portal.'
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Spaces
  description: "During the onboarding process of a Banqup entity, a first space is\
    \ created.  Spaces are virtual environments (work spaces) where all relevant resources\
    \ of an entity are managed.  Spaces can also facilitate document exchange and\
    \ communication among entities, depending on the space type.\nThe role of spaces\
    \ is to gather all relevant data of an entity into one accessible setting.  Such\
    \ data can include: invoices, connections, cards, clients, payments, users, installed\
    \ apps etc.  The capabilities offered by a space depends on the space type and\
    \ the active subscription. \nEvery space in Banqup has a unique identifier that\
    \ is needed when performing certain API calls on that space."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Public Directory
  description: "A Public Directory of all Entities registered on the BTX network.\
    \ \nThis set of APIs allows application to search for a company or his space and\
    \ get public available information."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Internal Onboarding
  description: 'This is a set of internal API call only intended to be used by BTX
    Onboarding service. They are restricted to ensure only verified information is
    stored on entities.

    The higher level public APIs create and update entities are provided by the BTX
    Onboarding service.'
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal Billing
  description: 'This is a set of internal API call only intended to be used by BTX
    Billing service. They are restricted to ensure all subscription changes go through
    the BTX Billing service.

    The higher level public APIs for changing billing information are provided by
    the BTX Billing service.'
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal Payments
  description: 'This is a set of internal API call only intended to be used by BTX
    Payments service. They are restricted to ensure all payment account operations
    go through the BTX Payments service.

    The higher level public APIs for add/changing payment accounts are provided by
    the BTX Payments service.'
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal Banqup Store
  description: 'This is a set of internal API call only intended to be used by BTX
    Banqup Store service. They are restricted to ensure operations related to adding
    or changing space extensions go through the BTX Banqup Store services.

    The higher level public APIs for add/changing space extensions are provided by
    the BTX Banqup Store service.'
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal Notification Service
  description: "This is a set of internal API call only intended to be used by BTX\
    \ Notification Service. They are restricted to ensure access to communication\
    \ data is limited to Notification Service. \nThe higher level public APIs for\
    \ notifying owners of space/entity will be provided by the BTX Notification service."
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal
  description: This is a set of pure internal API.  It contains for example callback
    endpoints that get registered to receive messages.
  x-BTX:
    unDocumented: 'true'
    internal: 'true'
security:
- oauth2: []
