openapi: 3.0.1
info:
  title: Entity Store REST Service API Specification
  description: The Entity Store REST Service provides API endpoints to interact with
    data related to entites.
  version: 1.11.0
servers:
- description: ''
  url: https://api.btx.fr.banqup.com/entitystore
- description: ''
  url: https://api.btx.eu.banqup.com/entitystore
tags:
- name: Entities
  description: "Entities are legal organizations (companies) or natural persons (private
    individuals)  that become part of the Banqup platform upon successful onboarding.\n
    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.\nThe 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.\nThe 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.\nThe 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.\nThe 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'
paths:
  /v1/spaces/{spaceId}/groups/{groupId}:assignRoles:
    post:
      tags:
      - Spaces
      summary: Assign roles to group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Assign roles to group <br/> Scope: space_write"
      operationId: assignRolesToGroup
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of role ids to assign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignRolesToGroupRequest'
            example:
              roles:
              - 91e0f228-8dc4-47b2-bc3d-c58452678e59
              - 15fe17ca-cf92-4e3e-a714-b43c65d9127f
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRoleIdsResponse'
              example:
                roles:
                - 91e0f228-8dc4-47b2-bc3d-c58452678e59
                - 15fe17ca-cf92-4e3e-a714-b43c65d9127f
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/groups/{groupId}:assignUsers:
    post:
      tags:
      - Spaces
      summary: Add users to group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Add users to group <br/> Scope: space_write"
      operationId: assignUsersToGroup
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of user subjects(not the space subject IDs) to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignUsersToGroupRequest'
            example:
              users:
              - e1db2101-3c49-4267-ba6f-c7e6e53cf833
              - 49d2e81f-2e81-4323-8041-bd73e9d217d9
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResultWithSpaceSubjects'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: SPACE
                permissionSubjects:
                - createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  subject: e1db2101-3c49-4267-ba6f-c7e6e53cf833
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Appleseed
                - createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  subject: 49d2e81f-2e81-4323-8041-bd73e9d217d9
                  type: APPLICATION
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Application
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/groups:
    get:
      tags:
      - Spaces
      summary: Get all groups
      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 all  (default & custom) groups for this space <br/> Scope:
        space_read"
      operationId: listGroups
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListGroupsResult'
              example:
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: Finance Responbile
                  type: CUSTOM
                  resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                  resourceType: SPACE
                - id: 20000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: Legal Representative
                  type: BUILDIN_SYSTEM_GROUP
                  resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                  resourceType: SPACE
        '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
                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:
      - entity_store:
        - space_read
    post:
      tags:
      - Spaces
      summary: Create custom group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create new group of type CUSTOM in this space <br/> Scope: space_write"
      operationId: createGroup
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Group data to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupRequest'
            example:
              name: Space Administrators
        required: true
      responses:
        '201':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResult'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: 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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/groups/{groupId}:
    get:
      tags:
      - Spaces
      summary: Get group
      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 default or custom group info on this space <br/> Scope: space_read"
      operationId: getGroup
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResult'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: SPACE
        '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
                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:
      - entity_store:
        - space_read
    delete:
      tags:
      - Spaces
      summary: Delete custom group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove a custom group on this space <br/> Scope: space_write"
      operationId: deleteGroup
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_write
    patch:
      tags:
      - Spaces
      summary: Update custom group
      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 custom group info on this space <br/> Scope: space_write"
      operationId: updateGroup
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Space data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGroupRequest'
            example:
              name: Space Administrators
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResult'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: 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
                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
                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:
      - entity_store:
        - space_write
  /v1/entities/{entityId}/groups/{groupId}:
    get:
      tags:
      - Entities
      summary: Get group info on an entity
      description: 'Retrieve group info for an entity <br/> Scope: entity_read'
      operationId: getEntityGroup
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResult'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: ENTITY
        '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
                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:
      - entity_store:
        - entity_read
  /v1/entities/{entityId}/groups:
    get:
      tags:
      - Entities
      summary: Get list of groups for an entity
      description: 'Retrieve all groups for an entity <br/> Scope: entity_read'
      operationId: listEntityGroups
      parameters:
      - name: entityId
        in: path
        description: The entity's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/ListGroupsResponse'
              example:
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: Finance Responsible
                  type: CUSTOM
                  resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                  resourceType: ENTITY
                - id: 20000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: users
                  type: DEFAULT_SYSTEM_GROUP
                  resourceId: cd2098e6-941e-40f3-a0e0-c1da5ca052c4
                  resourceType: ENTITY
                totalElements: 2
                currentPage: 0
                pageSize: 20
        '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
                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:
      - entity_store:
        - entity_read
  /v1/spaces/{spaceId}/groups/{groupId}/roles:
    get:
      tags:
      - Spaces
      summary: List all roles of a group
      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/> List all roles of a group for a space <br/> Scope: space_read"
      operationId: listRoles
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifer
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/ListRolesResponse'
              example:
                roles:
                - id: 10000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  resourceId: 015a38d4-14fb-4f07-914f-08a51f5a2d03
                  resourceType: SPACE
                  name: Finance Manager
                  type: CUSTOM
                  permissions:
                  - id: 20000000-0000-0000-0000-000000000000
                    type: accounts:payment
                    scopes:
                    - payment_account_read
                    name: BE19519469892112
                    uxHint: true
                totalElements: 1
                currentPage: 0
                pageSize: 20
        '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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/groups/{groupId}/users:
    get:
      tags:
      - Spaces
      summary: List all users of a group
      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/> List all users of a group for a space <br/> Scope: space_read"
      operationId: listUsers
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/ListUsersResponse'
              example:
                users:
                - subject: e1db2101-3c49-4267-ba6f-c7e6e53cf833
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Appleseed
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                - subject: 49d2e81f-2e81-4323-8041-bd73e9d217d9
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Application
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                totalElements: 2
                currentPage: 0
                pageSize: 20
        '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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/groups/{groupId}:unassignRoles:
    post:
      tags:
      - Spaces
      summary: Unassign roles from group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Unassign roles from group <br/> Scope: space_write"
      operationId: unassignRolesFromGroup
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of role ids to unassign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnassignRolesFromGroupRequest'
            example:
              roles:
              - e1db2101-3c49-4267-ba6f-c7e6e53cf833
              - 49d2e81f-2e81-4323-8041-bd73e9d217d9
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResultWithRoles'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: SPACE
                roles:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Manager
                  type: CUSTOM
                  permissions:
                  - id: 20000000-0000-0000-0000-000000000000
                    type: accounts:payment
                    scopes:
                    - payment_account_read
                    name: BE19519469892112
                    uxHint: true
                  resourceId: 015a38d4-14fb-4f07-914f-08a51f5a2d03
                  resourceType: SPACE
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/groups/{groupId}:unassignUsers:
    post:
      tags:
      - Spaces
      summary: Unassign users from group
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Unassign users from group <br/> Scope: space_write"
      operationId: unassignUsersFromGroup
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: groupId
        in: path
        description: The group's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of subjects to unassign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnassignUsersFromGroupRequest'
            example:
              users:
              - e1db2101-3c49-4267-ba6f-c7e6e53cf833
              - 49d2e81f-2e81-4323-8041-bd73e9d217d9
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResultWithSpaceSubjects'
              example:
                id: 10000000-0000-0000-0000-000000000000
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
                name: Finance Responsible
                type: CUSTOM
                resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                resourceType: SPACE
                permissionSubjects:
                - createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  subject: e1db2101-3c49-4267-ba6f-c7e6e53cf833
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Appleseed
                - createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  subject: 49d2e81f-2e81-4323-8041-bd73e9d217d9
                  type: APPLICATION
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Application
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/roles:
    get:
      tags:
      - Spaces
      summary: Get roles on space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of all roles for a space <br/> Scope: space_read"
      operationId: listRoles_1
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRolesResponse'
              example:
                roles:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Responsible
                  type: CUSTOM
                  permissions:
                  - id: 20000000-0000-0000-0000-000000000000
                    spaceId: 4cad95dd-4a6d-4077-bc4e-0d7e1e7df9ef
                    type: accounts:payment
                    scopes:
                    - payment_account_read
                    name: BE19519469892112
                    uxHint: true
                - id: 30000000-0000-0000-0000-000000000000
                  name: Account Manager
                  type: DEFAULT
                  permissions:
                  - id: 40000000-0000-0000-0000-000000000000
                    type: accounts:payment
                    scopes:
                    - payment_account_read
                    name: BE28473846364338
                    uxHint: true
        '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
                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:
      - entity_store:
        - space_read
    post:
      tags:
      - Spaces
      summary: Create new custom role
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create new role of type CUSTOM on space <br/> Scope: space_write"
      operationId: createRole
      parameters:
      - name: spaceId
        in: path
        description: The space's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Role data to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleRequest'
            example:
              name: Finance Responsible
              permissions:
              - id: 10000000-0000-0000-0000-000000000000
                type: accounts:payment
                scopes:
                - payment_account_read
                name: BE19519469892112
                uxHint: true
        required: true
      responses:
        '201':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
              example:
                id: 10000000-0000-0000-0000-000000000000
                name: Finance Responsible
                type: CUSTOM
                permissions:
                - id: 00000002-0000-0000-0000-000000000000
                  type: accounts:payment
                  scopes:
                  - payment_account_read
                  name: BE19519469892112
                  uxHint: true
                resourceId: abbf9959-c5aa-49ac-9032-f417c636fc5d
                resourceType: SPACE
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/roles/{roleId}:
    get:
      tags:
      - Spaces
      summary: Get role details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get role info on a space <br/> Scope: space_read"
      operationId: getRole
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: roleId
        in: path
        description: The role's identifer
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
              example:
                id: 10000000-0000-0000-0000-000000000000
                name: Finance Responsible
                type: CUSTOM
                permissions:
                - id: 00000002-0000-0000-0000-000000000000
                  type: accounts:payment
                  scopes:
                  - payment_account_read
                  name: BE19519469892112
                  uxHint: true
                resourceId: abbf9959-c5aa-49ac-9032-f417c636fc5d
                resourceType: SPACE
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
        '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
                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:
      - entity_store:
        - space_read
    delete:
      tags:
      - Spaces
      summary: Delete custom role
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove custom role on a space <br/> Scope: space_write"
      operationId: deleteRole
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: roleId
        in: path
        description: The role's identifer
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_write
    patch:
      tags:
      - Spaces
      summary: Update custom role
      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 custom role info on a space <br/> Scope: space_write"
      operationId: updateRole
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: roleId
        in: path
        description: The role's identifer
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Role data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RolePatchRequest'
            example:
              name: Administrators
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
              example:
                id: 10000000-0000-0000-0000-000000000000
                name: Finance Responsible
                type: CUSTOM
                permissions:
                - id: 00000002-0000-0000-0000-000000000000
                  type: accounts:payment
                  scopes:
                  - payment_account_read
                  name: BE19519469892112
                  uxHint: true
                resourceId: abbf9959-c5aa-49ac-9032-f417c636fc5d
                resourceType: SPACE
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/roles/{roleId}/permissions:
    put:
      tags:
      - Spaces
      summary: Update custom role's permissions
      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 custom role's permissions. Permissions must be subset of space's
        permission tree <br/> Scope: space_write"
      operationId: replaceRolePermissions
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: roleId
        in: path
        description: The role's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Role data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceRolePermissionsRequest'
            example:
              permissions:
              - id: 00000002-0000-0000-0000-000000000000
                type: accounts:payment
                scopes:
                - payment_account_read
                name: BE19519469892112
                uxHint: true
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
              example:
                id: 10000000-0000-0000-0000-000000000000
                name: Finance Responsible
                type: CUSTOM
                permissions:
                - id: 00000002-0000-0000-0000-000000000000
                  type: accounts:payment
                  scopes:
                  - payment_account_read
                  name: BE19519469892112
                  uxHint: true
                resourceId: abbf9959-c5aa-49ac-9032-f417c636fc5d
                resourceType: SPACE
                createdAt: 2025-01-01 15:51:28.071000
                updatedAt: 2025-01-01 15:51:28.071000
        '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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/{subjectType}:
    get:
      tags:
      - Spaces
      summary: Get all users on space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of users on a space <br/> Scope: space_read"
      operationId: listUsersOnSpace
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPermissionSubjectResult'
              example:
                users:
                - subject: e1db2101-3c49-4267-ba6f-c7e6e53cf833
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Appleseed
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                - subject: 49d2e81f-2e81-4323-8041-bd73e9d217d9
                  type: USER
                  resourceId: 00000001-0000-0000-0000-000000000000
                  resourceType: SPACE
                  name: John Application
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
        '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
                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:
      - entity_store:
        - space_read
    post:
      tags:
      - Spaces
      summary: Add user to space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Add user to space <br/> Scope: space_write"
      operationId: addUserToSpace
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      requestBody:
        description: Space subject to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceSubjectRequest'
            example:
              subject: e1db2101-3c49-4267-ba6f-c7e6e53cf833
              name: John Appleseed
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionSubjectResult'
              example: "{\n   \"subject\": \"e1db2101-3c49-4267-ba6f-c7e6e53cf833\"\
                ,\n   \"type\": \"USER\",\n   \"resourceId\": \"00000001-0000-0000-0000-000000000000\"\
                ,\n   \"resourceType\": \"SPACE\"\n   \"name\": \"John Appleseed\"\
                ,\n   \"createdAt\": \"2025-01-01T15:51:28.071Z\",\n   \"updatedAt\"\
                : \"2025-01-01T15:51:28.071Z\"\n }"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/{subjectType}/{subject}:
    get:
      tags:
      - Spaces
      summary: Get user details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get user details on a space <br/> Scope: space_read"
      operationId: getUserDetails
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      - name: subject
        in: path
        description: The subject's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionSubjectResult'
              example: "{\n   \"subject\": \"e1db2101-3c49-4267-ba6f-c7e6e53cf833\"\
                ,\n   \"type\": \"USER\",\n   \"resourceId\": \"00000001-0000-0000-0000-000000000000\"\
                ,\n   \"resourceType\": \"SPACE\"\n   \"name\": \"John Appleseed\"\
                ,\n   \"createdAt\": \"2025-01-01T15:51:28.071Z\",\n   \"updatedAt\"\
                : \"2025-01-01T15:51:28.071Z\"\n }"
        '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
                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:
      - entity_store:
        - space_read
    delete:
      tags:
      - Spaces
      summary: Remove user from space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove user from space <br/> Scope: space_write"
      operationId: deleteUserFromSpace
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      - name: subject
        in: path
        description: The subject's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_write
    patch:
      tags:
      - Spaces
      summary: Update user details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update user details <br/> Scope: space_write"
      operationId: updateUserDetails
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      - name: subject
        in: path
        description: The subject's identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Space subject data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionSubjectPatchRequest'
            example:
              name: John Appleseed
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionSubjectResult'
              example: "{\n   \"subject\": \"e1db2101-3c49-4267-ba6f-c7e6e53cf833\"\
                ,\n   \"type\": \"USER\",\n   \"resourceId\": \"00000001-0000-0000-0000-000000000000\"\
                ,\n   \"resourceType\": \"SPACE\"\n   \"name\": \"John Appleseed\"\
                ,\n   \"createdAt\": \"2025-01-01T15:51:28.071Z\",\n   \"updatedAt\"\
                : \"2025-01-01T15:51:28.071Z\"\n }"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/{subjectType}/{subject}/groups:
    get:
      tags:
      - Spaces
      summary: Get all groups of a user
      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 groups of a user on a space <br/> Scope: space_read"
      operationId: listUserGroups
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subjectType
        in: path
        description: Subject type
        required: true
        schema:
          $ref: '#/components/schemas/SubjectTypePathParam'
      - name: subject
        in: path
        description: The keycloak subject which is stored in permission subject
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/ListGroupsResponse'
              example:
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: Finance Responsible
                  type: CUSTOM
                  resourceId: 797ebb15-c15d-49c7-a566-9a770304a9ea
                  resourceType: SPACE
                - id: 20000000-0000-0000-0000-000000000000
                  createdAt: 2025-01-01 15:51:28.071000
                  updatedAt: 2025-01-01 15:51:28.071000
                  name: users
                  type: DEFAULT_SYSTEM_GROUP
                  resourceId: cd2098e6-941e-40f3-a0e0-c1da5ca052c4
                  resourceType: SPACE
                totalElements: 2
                currentPage: 0
                pageSize: 20
        '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
                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:
      - entity_store:
        - space_read
  /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
      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
        '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store: []
  /v1/directory/entities/{entityId}:
    get:
      tags:
      - Public Directory
      summary: Get public entity 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 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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store: []
  /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
                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
        '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store: []
  /v1/entities:
    get:
      tags:
      - Entities
      summary: Get my entities
      description: "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
      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
                  termsConditionsConsent: 2023-06-01 16:30:01
                  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
        '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - entity_read
  /v1/entities/{entityId}/permissions:
    get:
      tags:
      - Entities
      summary: Get granted permissions
      description: 'Retrieve all permissions granted on this entity <br/> Scope: entity_read'
      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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - entity_store:
        - entity_read
    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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - entity_store:
        - onboarding_service
  /v1/entities/{entityId}:
    get:
      tags:
      - Entities
      summary: Get entity by uuid
      description: '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
                    termsConditionsConsent: 2023-06-01 16:30:01
                    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
                    termsConditionsConsent: 2023-06-01 16:30:01
                    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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - entity_read
  /v1/entities/{entityId}/permissions/{permissionId}:
    delete:
      tags:
      - Entities
      summary: Delete permission on entity
      description: "Remove requester's permission on entity <br/> Scope: entity_write"
      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
                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
                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
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - entity_store:
        - 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
      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
        '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store: []
    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:
                flwb: BE0417497106
                flwp: PRC-0f937f87-3f21-11ef-9196-62a7624c431a
                companyType: BE006
                companyIdentifier: BE0417497106
                dateOfIncorporation: 1900-01-01
                countryOfIncorporation: BE
                primaryBusinessActivity: '474'
                onboardingProcessInstanceId: PRC-0f937f87-3f21-11ef-9196-62a7624c431a
                provisioningProcessInstanceId: PRC-13a55e8d-3f21-11ef-9196-62a7624c431a
              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
                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
                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:
      - entity_store:
        - entity_write
  /v1/entities/{entityId}/taxInfo:
    get:
      tags:
      - Entities
      summary: Get tax information
      description: "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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - entity_store:
        - entity_read
    post:
      tags:
      - Entities
      summary: Create tax information
      description: "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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - entity_store:
        - entity_write
    delete:
      tags:
      - Entities
      summary: Delete tax information
      description: "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
                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
                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
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - entity_store:
        - entity_write
    patch:
      tags:
      - Entities
      summary: Update tax information
      description: '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - 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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
      security:
      - entity_store:
        - 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
                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
                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
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
      security:
      - entity_store:
        - 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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - entity_write
  /v1/spaces/{spaceId}/extensions/{extensionId}/clients:
    get:
      tags:
      - Spaces
      summary: Get extension clients
      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 all extension clients of space <br/> Scope: space_read"
      operationId: getAllExtensionClients
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension's app ID
        required: true
        schema:
          type: string
          format: uuid
      - name: clientId
        in: query
        description: "The client\u2019s identifier"
        schema:
          type: string
          format: uuid
        example: 209f5481-58ca-4bd6-b56a-b7ad7abce548
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/AllExtensionClientResult'
              example: "{\n   clients: [\n\t\t{\n\t\t   \"id\": \"209f5481-58ca-4bd6-b56a-b7ad7abce548\"\
                ,\n\t\t   \"appCallbacks\": {\n\t\t\t \"activationUrl\": \"https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/32026548-88a8-40bb-9e23-64dc2691cb2d/extensions/0ca2797b-6365-4bf2-a490-247075e3cede/clients/abbf9959-c5aa-49ac-9032-f417c636fc5d/activate\"\
                ,\n\t\t\t \"deactivationUrl\": \"https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/32026548-88a8-40bb-9e23-64dc2691cb2d/extensions/0ca2797b-6365-4bf2-a490-247075e3cede/clients/abbf9959-c5aa-49ac-9032-f417c636fc5d/deactivate\"\
                ,\n\t\t\t \"configureUrl\": \"https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/32026548-88a8-40bb-9e23-64dc2691cb2d/extensions/0ca2797b-6365-4bf2-a490-247075e3cede/clients/abbf9959-c5aa-49ac-9032-f417c636fc5d/configure\"\
                \n\t\t   },\n\t\t   \"settings\": {\n\t\t\t \"email\": \"example@chorus.com\"\
                ,\n\t\t\t \"locale\": \"en\"\n\t\t   },\n\t\t   \"status\": \"ACTIVE\"\
                \n\t\t}\n\t],\n\t\"totalElements\": 100,\n    \"currentPage\": 0,\n\
                \    \"pageSize\": 10\n}"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_read
    post:
      tags:
      - Spaces
      summary: Active client's extension
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Activate extension for client of a partner space <br/> Scope: space_write"
      operationId: activateClientExtension
      parameters:
      - name: spaceId
        in: path
        description: The partner space's identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The partner extension's app ID
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Client's data for extension activation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtensionClientRequest'
            example:
              clientId: 00000001-0001-0000-0000-000000000000
              clientSpaceUrl: 
                https://api.dev.btx.eu.banqup.com/entitystore/v1/directory/entities/00000001-0000-0000-0000-000000000000/spaces/00000002-0001-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionClientResponse'
              example: "\t\t{\n\t\t  \"clientId\": \"209f5481-58ca-4bd6-b56a-b7ad7abce548\"\
                ,\n\t\t  \"appCallbacks\": {\n\t\t    \"activationUrl\": \"https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/activate\"\
                ,  // return if status != ACTIVE\n\t\t    \"deactivationUrl\": \"\
                https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/deactivate\"\
                , // return if status == ACTIVE\n\t\t    \"configureUrl\": \"https://api.test.btx.eu.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/configure\"\
                \  // always return\n\t\t  },\n\t\t  \"settings\": {\n\t\t    \"email\"\
                : \"example@chorus.com\",\n\t\t    \"locale\": \"en\"\n\t\t  },\n\t\
                \t  \"status\": \"ACTIVE\"\n\t\t}\n"
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/extensions/{extensionId}/clients/{clientId}:
    get:
      tags:
      - Spaces
      summary: Get extension client
      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 extension client details <br/> Scope: space_read"
      operationId: getExtensionClient
      parameters:
      - name: spaceId
        in: path
        description: The partner space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The partner's extension identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: clientId
        in: path
        description: Client's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionClientResult'
              examples:
                Active extension client:
                  description: Active extension client
                  value:
                    id: 00000001-0001-0000-0000-000000000000
                    appCallbacks:
                      deactivationUrl: 
                        https://api.btx.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/deactivate
                      configureUrl: 
                        https://api.btx.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/configure
                    settings:
                      email: example@chorus.com
                      locale: en
                    status: ACTIVE
                Inactive extension client:
                  description: Inactive extension client
                  value:
                    id: 00000001-0001-0000-0000-000000000000
                    appCallbacks:
                      activationUrl: 
                        https://api.btx.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/activate
                      configureUrl: 
                        https://api.btx.banqup.com/entitycallback/v1/spaces/{partnerSpaceId}/extensions/{extensionId}/clients/{clientId}/configure
                    settings:
                      email: example@chorus.com
                      locale: en
                    status: INACTIVE
        '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
                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
                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:
      - entity_store:
        - space_read
    delete:
      tags:
      - Spaces
      summary: Delete client extension
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete client extension with ID <br/> Scope: space_write"
      operationId: deleteClientExtension
      parameters:
      - name: spaceId
        in: path
        description: The partner space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The partner's extension identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: clientId
        in: path
        description: Client'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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/extensions/{extensionId}/clients/{clientId}/settings:
    patch:
      tags:
      - Spaces
      summary: Update settings for the extension client
      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 settings for the extension client via JSON patch <br/> Scope:
        extension_config"
      operationId: patchExtensionClientSettings
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension's app identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: clientId
        in: path
        description: The client identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Json patch operations to be applied to the settings
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /email
              value: user@extension.com
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                email: user@extension.com
                iban: '12345'
        '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
                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
                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:
      - entity_store:
        - extension_config
  /v1/spaces/{spaceId}/extensions/{extensionId}/clients/{clientId}:updateStatus:
    put:
      tags:
      - Spaces
      summary: Update client extension's status
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update extension status for a client <br/> Scope: extension_config"
      operationId: updateClientExtensionStatus
      parameters:
      - name: spaceId
        in: path
        description: The partner space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The partner's extension identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: clientId
        in: path
        description: Client's unique identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Status to change
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtensionStatusDto'
            example:
              status: ACTIVE
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionStatusDto'
              example:
                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
                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
                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:
      - entity_store:
        - extension_config
  /v1/entities/{entityId}/taxRegistrations/{taxRegistrationId}:assignSpaces:
    post:
      tags:
      - Entities
      summary: Assign one ore more spaces to a taxRegistration
      description: 'Assign one ore more spaces to a taxRegistration <br/> Scope: entity_write'
      operationId: taxRegistrationAssignSpaces
      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 uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of space ids to assign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpacesList'
            example:
              spaces:
              - 00000001-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: ok
          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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - entity_write
  /v1/entities/{entityId}/taxRegistrations/{taxRegistrationId}:unassignSpaces:
    post:
      tags:
      - Entities
      summary: Unassign one or more spaces from a taxRegistration
      description: 'Unassign one or more spaces from a taxRegistration <br/> Scope:
        entity_write'
      operationId: taxRegistrationUnassignSpaces
      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 uuid identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: List of space ids to unassign
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpacesList'
            example:
              spaces:
              - 00000001-0000-0000-0000-000000000000
        required: true
      responses:
        '200':
          description: ok
          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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
      security:
      - entity_store:
        - entity_write
  /v1/spaces/{spaceId}/extensions:
    get:
      tags:
      - Spaces
      summary: Get extensions
      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 all extensions of space <br/> Scope: space_read"
      operationId: getAllExtensions
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        schema:
          $ref: '#/components/schemas/ExtensionCategory'
      - name: status
        in: query
        schema:
          $ref: '#/components/schemas/ExtensionStatus'
      - name: name
        in: query
        description: Extension name for searching
        schema:
          type: string
      - name: clientId
        in: query
        description: Extension client id
        schema:
          type: string
          format: uuid
      - name: supportClients
        in: query
        description: Extension support client
        schema:
          type: boolean
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        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/AllExtensionResult'
        '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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/extensions/{extensionId}/permissions:
    post:
      tags:
      - Spaces
      summary: Grant permission on extension
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Grant a permission (scope) on this extension to a user (requester) <br/>
        Scope: extension_write"
      operationId: createExtensionPermission
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension 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: extension_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-0000-40bb-9e23-64dc2691cb2d
                scope: extension_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
                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:
      - entity_store:
        - extension_write
  /v1/spaces/{spaceId}/extensions/{extensionId}:
    get:
      tags:
      - Spaces
      summary: Get details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve extension details <br/> Scope: space_read"
      operationId: getExtension
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension's app ID
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionResult'
        '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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/extensions:count:
    get:
      tags:
      - Spaces
      summary: Count extensions
      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/> Count extensions by statuses <br/> Scope: space_read"
      operationId: getExtensionCounts
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        description: Category for searching. Can be multiple values separated by comma,
          or just one value.
        schema:
          type: string
      - name: status
        in: query
        description: Status for searching. Can be multiple values separated by comma,
          or just one value.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllExtensionStatusCountResult'
              example:
                counts:
                - status: ACTIVE
                  count: 5
                - status: INACTIVE
                  count: 10
        '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
                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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/extensions/{extensionId}/settings:
    get:
      tags:
      - Spaces
      summary: Get 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/> Retrieve extension's settings <br/> Scope: space_read"
      operationId: getExtensionSettings
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                email: test@extension.com
                iban: '12345'
        '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
                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
                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:
      - entity_store:
        - space_read
    patch:
      tags:
      - Spaces
      summary: Update 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 extension's settings via JSON patch <br/> Scope: extension_config"
      operationId: patchExtensionSettings
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Settings to configure - JSON patch format
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /email
              value: xyz@gmail.com
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              example:
                email: user@extension.com
                iban: '12345'
        '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
                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
                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:
      - entity_store:
        - extension_config
  /v1/spaces/{spaceId}/extensions/{extensionId}:markForDeletion:
    post:
      tags:
      - Spaces
      summary: Mark for deletion
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Mark an extension for deletion. Will not have any effect if extension
        is already marked for deletion. <br/> Scope: extension_write"
      operationId: markExtensionForDeletion
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension 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
                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
                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:
      - entity_store:
        - extension_write
  /v1/spaces/{spaceId}/extensions/{extensionId}:updateStatus:
    put:
      tags:
      - Spaces
      summary: Update extension status
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update extension's status <br/> Scope: extension_config"
      operationId: updateExtensionStatus
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: extensionId
        in: path
        description: The extension identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Status to change
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtensionStatusDto'
            example:
              status: ACTIVE
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionStatusDto'
              example:
                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
                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
                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:
      - entity_store:
        - extension_config
  /v1/spaces/{spaceId}/permissionTree:
    get:
      tags:
      - Spaces
      summary: Get the permission tree for a space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get the permissions tree a space <br/> Scope: space_write"
      operationId: getPermissionTree
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionTreeResult'
              example:
                resources:
                - id: 10000000-0000-0000-0000-000000000000
                  name: The space
                  scopes:
                  - space_read
                  - space_write
                  - space_foundation_manage_users
                  - space_foundation_manage_extensions
                  - space_foundation_manage_subscription
                  uxHint: true
                  type: spaces:business
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Responsible
                  type: CUSTOM
        '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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/partners:
    get:
      tags:
      - Spaces
      summary: Get partners
      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 all partners of space <br/> Scope: space_read"
      operationId: getAllPartners
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          type: integer
          format: int32
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          type: integer
          format: int32
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - partnerExtensions
        example: partnerExtensions
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllPartnerResult'
        '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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/permissions:
    get:
      tags:
      - Spaces
      summary: Get space permissions
      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 all permissions (granted/not granted) on this space <br/> Scope:
        space_read"
      operationId: getSpacePermissions
      parameters:
      - name: spaceId
        in: path
        description: The space 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: space_read
                    granted: true
                  - id: 20000000-0000-0000-0000-000000000000
                    scope: space_write
                    granted: true
                - requester: 00000002-0000-0000-0000-000000000000
                  permissions:
                  - id: 30000000-0000-0000-0000-000000000000
                    scope: space_read
                    granted: true
                  - id: 40000000-0000-0000-0000-000000000000
                    scope: space_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
                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:
      - entity_store:
        - space_read
    post:
      tags:
      - Spaces
      summary: Grant permission on space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Grant a permission (scope) on this space to a user (requester) <br/>
        Scope: space_write"
      operationId: createSpacePermission
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Permission to create
        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/PermissionResult'
              example:
                requester: 00000001-0000-0000-0000-000000000000
                id: 32026548-88a8-40bb-9e23-64dc2691cb2d
                scope: space_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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/partners/{partnerId}:
    delete:
      tags:
      - Spaces
      summary: Remove partner link
      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 given space's partner link <br/> Scope: space_write"
      operationId: deletePartnerLink
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: partnerId
        in: path
        description: The partner's identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content - successfully deleted.
        '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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}:
    get:
      tags:
      - Spaces
      summary: Get space details
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve data about this space, including some information of space's
        owning entity <br/> Scope: space_read"
      operationId: getSpace
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceWithEntityResult'
              example:
                id: 00000001-0000-0000-0000-000000000000
                entity:
                  id: 00000002-0000-0000-0000-000000000000
                  name: The Four cubes Antwerp
                  countryCode: BE
                  verified: true
                  description: This is a company
                  globalIdentifiers:
                    nl:kvk: '62196830'
                    fr:siret: '46802815115880'
                  addresses:
                    main:
                      streetName: Nitzsche Lodge
                      house: '80728'
                      postalCode: '3110'
                      postBox: PO Box 1234
                      city: Fernandahaven
                      country: Belgium
                      countryCode: BE
                name: Invoices space
                type: BUSINESS
                region: eu
                paymentMetaData:
                  ocs:merchantAccountId: '12345'
                globalIdentifiers:
                  flwb: BE0417497106
                  flwp: PRC-0f937f87-3f21-11ef-9196-62a7624c431a
                  companyType: BE006
                  companyIdentifier: BE0417497106
                  dateOfIncorporation: 1900-01-01
                  countryOfIncorporation: BE
                  primaryBusinessActivity: '474'
                  onboardingProcessInstanceId: PRC-0f937f87-3f21-11ef-9196-62a7624c431a
                  provisioningProcessInstanceId: PRC-13a55e8d-3f21-11ef-9196-62a7624c431a
        '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
                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
                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:
      - entity_store:
        - space_read
    patch:
      tags:
      - Spaces
      summary: Update space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update space <br/> Scope: space_write"
      operationId: updateSpace
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Space data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSpaceRequest'
            example:
              name: New name
        required: true
      responses:
        '200':
          description: Space updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceResult'
              example:
                id: 00000001-0000-0000-0000-000000000000
                name: Invoices space
                type: BUSINESS
                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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/permissions/{permissionId}:
    delete:
      tags:
      - Spaces
      summary: Revoke permission
      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/> Revoke granted permission (scope) to user (requester) on this space
        <br/> Scope: space_write"
      operationId: deleteSpacePermission
      parameters:
      - name: spaceId
        in: path
        description: The space 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
                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
                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
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - entity_store:
        - space_write
  /v1/spaces:
    get:
      tags:
      - Spaces
      summary: Get current user's spaces
      description: Retrieve all accessible spaces (on all accessible entities) for
        current user
      operationId: getAllSpaces
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllSpaceResult'
              example:
                spaces:
                - id: 00000001-0000-0000-0000-000000000000
                  name: Invoices space
                  type: BUSINESS
                  region: eu
                  entityId: 00000002-0000-0000-0000-000000000000
      security:
      - entity_store: []
  /v1/spaces/{spaceId}/context:
    get:
      tags:
      - Spaces
      summary: Get current user's space context (deprecated)
      description: Retrieve current user's context for this space (deprecated)
      operationId: getSpaceContextDeprecated
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserContextResult'
              example:
                context:
                  brand: Banqup
                  modules:
                  - home
                  - subscriptions
                  - store
                  countryCode: BE
                  type: PERSONAL
        '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
                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
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      deprecated: true
      security:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/myPermissionTree:
    get:
      tags:
      - Spaces
      summary: Get my permission tree
      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 my permission tree <br/> Scope: space_read"
      operationId: getMySpacePermissionTree
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - groups
        example: groups
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionTreeResult'
              example:
                resources:
                - id: 10000000-0000-0000-0000-000000000000
                  name: The space
                  scopes:
                  - space_read
                  - space_write
                  - space_foundation_manage_users
                  - space_foundation_manage_extensions
                  - space_foundation_manage_subscription
                  uxHint: true
                  type: spaces:business
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Responsible
                  type: CUSTOM
        '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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/spaceContext:
    get:
      tags:
      - Spaces
      summary: Get space's context
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get space's context <br/> Scope: service_store"
      operationId: getSpaceContext
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceContextResult'
              example:
                brand: Banqup
                type: BUSINESS
                segment: SME
                country: BE
                entityId: 00000001-0000-0000-0000-000000000000
                extensions:
                - id: 00000001-0000-0000-0000-000000000000
                  version: 1.0.0
        '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
                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
                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:
      - entity_store:
        - service_store
  /v1/spaces/{spaceId}/settings:
    get:
      tags:
      - Spaces
      summary: Get 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/> Retrieve space's settings <br/> Scope: space_read"
      operationId: getSpaceSettings
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Space settings retrieved successfully
          content:
            application/json:
              schema:
                type: string
              examples:
                Space's Preferences:
                  description: Space's Preferences
                  value:
                    email: john@example.com
                    locale: EN
        '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
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Space UUID could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                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:
      - entity_store:
        - space_read
    patch:
      tags:
      - Spaces
      summary: Update space 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 space's settings using JSON patch <br/> Scope: space_write"
      operationId: updateSpaceSettings
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Space settings patch request in JSON patch format
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PatchRequest'
            example:
            - op: replace
              path: /locale
              value: nl-BE
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonBMap'
              examples:
                Space settings:
                  description: Space settings
                  value:
                    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
                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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/permissionTree/{subject}:
    get:
      tags:
      - Spaces
      summary: Get the permission tree for a space subject
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get the permissions tree a space subject <br/> Scope: space_write"
      operationId: getSpaceSubjectPermissionTree
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subject
        in: path
        description: The subject identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: include
        in: query
        description: What extra data to include in the response.
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - groups
        example: groups
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionTreeResult'
              example:
                resources:
                - id: 10000000-0000-0000-0000-000000000000
                  name: The space
                  scopes:
                  - space_read
                  - space_write
                  - space_foundation_manage_users
                  - space_foundation_manage_extensions
                  - space_foundation_manage_subscription
                  uxHint: true
                  type: spaces:business
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Responsible
                  type: CUSTOM
        '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
                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:
      - entity_store:
        - space_write
    put:
      tags:
      - Spaces
      summary: Overwrite the permission tree for a subject
      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/> Overwrite the permission tree for a subject <br/> Scope: space_write"
      operationId: overwritePermissionTree
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: subject
        in: path
        description: The subject identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermissionTreeRequest'
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPermissionTreeResult'
              example:
                resources:
                - id: 10000000-0000-0000-0000-000000000000
                  scopes:
                  - space_read
                  - space_write
                  - space_foundation_manage_users
                  - space_foundation_manage_extensions
                  - space_foundation_manage_subscription
                  type: spaces:business
                groups:
                - id: 20000000-0000-0000-0000-000000000000
                  name: users
                  type: DEFAULT_SYSTEM_GROUP
        '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
                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:
      - entity_store:
        - space_write
  /v1/spaces/{spaceId}/taxInfo:
    get:
      tags:
      - Spaces
      summary: Get tax info
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve space's tax-related information <br/> Scope: space_read"
      operationId: getSpaceTaxInfo
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceTaxInfoResult'
              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: 00000001-0000-0000-0000-000000000000
                  subsidiaryName: Sub 1
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                - percentage: 30.0
                  subsidiaryId: 00000002-0000-0000-0000-000000000000
                  subsidiaryName: Sub 2
                  startDate: 2024-01-23
                  endDate: 2025-01-23
                addresses:
                  main:
                    streetName: Milo Crossroad
                    house: '7850'
                    city: Kubhaven
                    countryCode: BE
                taxRegistration:
                  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
        '204':
          description: No Content - No tax registration associated
        '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
                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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/userContext:
    get:
      tags:
      - Spaces
      summary: Get current user's context for this space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Retrieve current user's context for this space <br/> Scope: space_read"
      operationId: getUserContext
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserContextResult'
              example:
                context:
                  brand: Banqup
                  modules:
                  - home
                  - subscriptions
                  - store
                  countryCode: BE
                  type: PERSONAL
        '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
                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
                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:
      - entity_store:
        - space_read
  /v1/spaces/{spaceId}/permissions/{permissionId}:grant:
    post:
      tags:
      - Spaces
      summary: Grant permission
      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/> Grant a previously not granted permission (scope) on this space to a
        user (requester) <br/> Scope: space_write"
      operationId: grantSpacePermission
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: permissionId
        in: path
        description: Permission identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content - The permission was successfully granted.
        '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
                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:
      - entity_store:
        - space_write
  /v2/spaces/{spaceId}/permissionTree:
    get:
      tags:
      - Spaces
      summary: Get the permission tree v2 for a space
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get the permissions tree v2 for a space <br/> Scope: space_write"
      operationId: getPermissionTreeV2
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionTreeResultV2'
              example:
                resources:
                - id: 10000000-0000-0000-0000-000000000000
                  name: The space
                  scopes:
                  - name: space_read
                  - name: space_write
                  - name: space_foundation_manage_users
                  - name: space_foundation_manage_extensions
                  - name: space_foundation_manage_subscription
                  - name: space_payments_manage_payment_accounts
                  - name: space_foundation_todo_write
                  type: spaces:business
                groups:
                - id: 10000000-0000-0000-0000-000000000000
                  name: Finance Responsible
                  type: CUSTOM
        '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
                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:
      - entity_store:
        - space_write
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
    ListRoleIdsResponse:
      required:
      - roles
      type: object
      properties:
        roles:
          uniqueItems: true
          type: array
          items:
            type: string
            description: List of role ids
            format: uuid
    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
    AssignRolesToGroupRequest:
      required:
      - roles
      type: object
      properties:
        roles:
          uniqueItems: true
          type: array
          items:
            type: string
            description: List of role ids
            format: uuid
    GroupResultWithSpaceSubjects:
      type: object
      properties:
        id:
          type: string
          description: Group id
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        name:
          type: string
          description: Group name
          example: Space Administrators
        createdAt:
          type: string
          description: Date & time of group creation
          format: date-time
        updatedAt:
          type: string
          description: Date & time of when group was last updated
          format: date-time
        type:
          $ref: '#/components/schemas/GroupType'
        resourceId:
          type: string
          description: Resource id of group
          format: uuid
          example: bdbf9959-c5ac-12ac-9032-f417c636cc5d
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        permissionSubjects:
          type: array
          items:
            $ref: '#/components/schemas/PermissionSubjectResult'
    GroupType:
      type: string
      description: The type of group
      example: CUSTOM
    PermissionSubjectResult:
      type: object
      properties:
        subject:
          type: string
          description: Identifier of subject
        resourceId:
          type: string
          description: Resource id of subject
          format: uuid
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        name:
          type: string
          description: Name of subject
          example: John Appleseed
        type:
          $ref: '#/components/schemas/SpaceSubjectType'
        createdAt:
          type: string
          description: Creation datetime.
          format: date-time
        updatedAt:
          type: string
          description: Datetime of last update.
          format: date-time
    ResourceType:
      type: string
      description: Resource type
      example: SPACE
      enum:
      - SPACE
      - ENTITY
    SpaceSubjectType:
      type: string
      description: The type of space subject
      example: USER
      enum:
      - USER
      - APPLICATION
      - EXTENSION
      - CORE
      - PARTNER_SPACE
    AssignUsersToGroupRequest:
      required:
      - users
      type: object
      properties:
        users:
          uniqueItems: true
          type: array
          items:
            type: string
            description: List of space subjects(not the space subject IDs)
            format: uuid
    GroupResult:
      type: object
      properties:
        id:
          type: string
          description: Group id
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        name:
          type: string
          description: Group name
          example: Space Administrators
        type:
          $ref: '#/components/schemas/GroupType'
      description: the list of groups
    GroupRequest:
      required:
      - name
      type: object
      properties:
        name:
          type: string
          description: Name of group
          example: Space Administrators
    ListGroupsResponse:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupResult'
        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
    ListGroupsResult:
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupResult'
    ListRolesResponse:
      type: object
      properties:
        roles:
          type: array
          items:
            $ref: '#/components/schemas/RoleResponse'
    PermissionTreeItem:
      required:
      - id
      - scopes
      - type
      type: object
      properties:
        id:
          type: string
          description: The BTX id of the resource
        type:
          type: string
          description: The type of the resource.
        scopes:
          type: array
          description: The scope names associated with the permission.
          items:
            type: string
            description: The scope names associated with the permission.
        name:
          type: string
          description: The display name of the resource.
        uxHint:
          type: boolean
          description: UX hint whether to display scopes of a resource as separate
            lines
      description: the list of permissions
    RoleResponse:
      type: object
      properties:
        id:
          type: string
          description: Role id
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        name:
          type: string
          description: Role name
          example: Finance Responsible
        type:
          $ref: '#/components/schemas/RoleType'
        resourceId:
          type: string
          description: Id of resource where role belongs
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        createdAt:
          type: string
          description: Date & time of role creation
          format: date-time
        updatedAt:
          type: string
          description: Date & time of when role was last updated
          format: date-time
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItem'
    RoleType:
      type: string
      description: The type of role
      example: CUSTOM
      enum:
      - DEFAULT
      - CUSTOM
      - PERSONAL
    ListUsersResponse:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/PermissionSubjectResult'
        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
    GroupResultWithRoles:
      type: object
      properties:
        id:
          type: string
          description: Group id
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        name:
          type: string
          description: Group name
          example: Space Administrators
        createdAt:
          type: string
          description: Date & time of group creation
          format: date-time
        updatedAt:
          type: string
          description: Date & time of when group was last updated
          format: date-time
        type:
          $ref: '#/components/schemas/GroupType'
        resourceId:
          type: string
          description: Resource id of group
          format: uuid
          example: bdbf9959-c5ac-12ac-9032-f417c636cc5d
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/RoleResponse'
    UnassignRolesFromGroupRequest:
      required:
      - roles
      type: object
      properties:
        roles:
          uniqueItems: true
          type: array
          items:
            type: string
            description: List of role IDs
            format: uuid
    UnassignUsersFromGroupRequest:
      required:
      - users
      type: object
      properties:
        users:
          uniqueItems: true
          type: array
          items:
            type: string
            description: List of space subjects(not the space subject IDs)
            format: uuid
    UpdateGroupRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of group
          example: Space Administrators
    RoleRequest:
      required:
      - name
      - permissions
      type: object
      properties:
        name:
          type: string
          description: Name of role
          example: Finance Responsible
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItem'
    ReplaceRolePermissionsRequest:
      required:
      - permissions
      type: object
      properties:
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItem'
    RolePatchRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of role
          example: Administrators
    SubjectTypePathParam:
      type: string
      description: The type of space subject
      example: users
      enum:
      - users
      - applications
    SpaceSubjectRequest:
      required:
      - subject
      type: object
      properties:
        subject:
          type: string
          description: Identifier of subject
          format: uuid
          example: 00000011-0000-0000-0000-000000000000
        name:
          type: string
          description: Subject name
          example: John Appleseed
    ListPermissionSubjectResult:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/PermissionSubjectResult'
    PermissionSubjectPatchRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of subject
          example: John Appleseed
    SubscriptionResult:
      type: object
      properties:
        id:
          type: string
          description: Subscription ID
          format: uuid
        planName:
          type: string
          description: The name of the plan
        planId:
          type: string
          description: The billing engine ID of the plan
      description: List of subscription results
    SubscriptionExtension:
      required:
      - name
      - namespace
      type: object
      properties:
        name:
          type: string
        namespace:
          type: string
      description: The extensions of the subscription
      example: "[\n  {\n    \"name\" :\"OCR\",\n    \"namespace\": \"com.unifiedpost.ocr\"\
        ,\n  }\n]"
    SubscriptionRequest:
      required:
      - extensions
      - planId
      - planName
      type: object
      properties:
        planName:
          type: string
          description: The name of the subscription
          example: Premium
        extensions:
          type: array
          description: The extensions of the subscription
          example: "[\n  {\n    \"name\" :\"OCR\",\n    \"namespace\": \"com.unifiedpost.ocr\"\
            ,\n  }\n]"
          items:
            $ref: '#/components/schemas/SubscriptionExtension'
        planId:
          type: string
          description: The billing engine subscription ID
          example: premium_100-Ljxtcvjsqza5ec2G
    AllSubscriptionResult:
      type: object
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionResult'
    ApplicationDeletedMessage:
      required:
      - category
      - data
      - type
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/ApplicationDeletedMessageData'
        categoryValid:
          type: boolean
        typeValid:
          type: boolean
    ApplicationDeletedMessageData:
      required:
      - applicationId
      - name
      - namespace
      type: object
      properties:
        applicationId:
          type: string
        namespace:
          type: string
        name:
          type: string
    ApplicationUpdateMessage:
      required:
      - category
      - type
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/ApplicationUpdateMessageData'
        valid:
          type: boolean
    ApplicationUpdateMessageData:
      type: object
      properties:
        applicationId:
          type: string
        namespace:
          type: string
        name:
          type: string
        version:
          type: string
        forceUpdate:
          type: boolean
        valid:
          type: boolean
    PlanInfo:
      required:
      - extensions
      - planId
      - planName
      type: object
      properties:
        planName:
          type: string
          description: The name of the subscription
          example: Premium
        extensions:
          type: array
          description: The extensions of the subscription
          example: "[\n  {\n    \"name\" :\"OCR\",\n    \"namespace\": \"com.unifiedpost.ocr\"\
            ,\n  }\n]"
          items:
            $ref: '#/components/schemas/SubscriptionExtension'
        planId:
          type: string
    PlanUpdatedMessage:
      required:
      - category
      - data
      - type
      type: object
      properties:
        resourceId:
          type: string
        scope:
          type: string
        category:
          type: string
        type:
          type: string
        orderGroup:
          type: string
        data:
          $ref: '#/components/schemas/PlanUpdatedMessageData'
        categoryValid:
          type: boolean
        typeValid:
          type: boolean
    PlanUpdatedMessageData:
      type: object
      properties:
        plans:
          type: array
          items:
            $ref: '#/components/schemas/PlanInfo'
    SpacesUsersCount:
      type: object
      properties:
        usersCount:
          type: array
          items:
            type: object
            additionalProperties:
              type: integer
              description: Object containing spaceIds as keys and users count as values.
              format: int64
            description: Object containing spaceIds as keys and users count as values.
    SpacesList:
      required:
      - spaces
      type: object
      properties:
        spaces:
          type: array
          description: List of spaces ids
          items:
            type: string
            description: List of spaces ids
    AllSpaceDirectoryResult:
      type: object
      properties:
        spaces:
          type: array
          items:
            $ref: '#/components/schemas/SpaceDirectoryResult'
    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: Entity type
        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: discriminator to determine DirectoryNaturalPersonResult / DirectoryBusinessResult
      example: person
      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
    SpaceType:
      type: string
      description: The type of the space
      example: BUSINESS
      enum:
      - APPLICATION
      - BUSINESS
      - PERSONAL
      - PARTNER
    EntityType:
      type: string
      description: The type of the entity
      example: BUSINESS
      enum:
      - BUSINESS
      - PERSON
    AllDirectoryPersonResult:
      type: object
      properties:
        entities:
          type: array
          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
      description: List of response entities
    EntityPaymentMetaData:
      $ref: '#/components/schemas/JsonBMap'
    BankIdentifier:
      required:
      - identifier
      - scheme
      type: object
      properties:
        identifier:
          type: string
          description: Bank Identifier
          example: PANXBEB1XXX
        scheme:
          type: string
          description: Bank Identifier Scheme
          example: BIC
          enum:
          - BIC
          - CODE
      description: Information about the issuer of the account
    PagedPaymentAccountResultList:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        paymentAccounts:
          type: array
          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
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    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
        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'
      description: discriminator to determine NaturalPersonResult / BusinessResult
      example: person
      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: The communication data
    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:
      required:
      - city
      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.\nFrom November 2023, all banks and PSPs will have to accept
        payment messages with structured addresses.\nFrom 2025, banks and PSPs will
        have to send all their messages with structured addresses.\n"
      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
    BusinessRequest:
      required:
      - addresses
      - legalName
      - tradeName
      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:
      required:
      - addresses
      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: discriminator to determine NaturalPersonRequest / BusinessRequest
          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
      description: discriminator to determine NaturalPersonRequest / BusinessRequest
      example: person
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/NaturalPersonRequest'
          business: '#/components/schemas/BusinessRequest'
    NaturalPersonRequest:
      required:
      - addresses
      - firstName
      - lastName
      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).
      description: the list of permissions
    PermissionsResult:
      required:
      - permissions
      - requester
      type: object
      properties:
        requester:
          type: string
          description: the requester
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/PermissionListItem'
      description: List of permissions
    PermissionRequest:
      required:
      - permission
      - requester
      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
    AllEntityResult:
      type: object
      properties:
        entities:
          type: array
          items:
            $ref: '#/components/schemas/BtxEntityResult'
    PermissionsWrapperResult:
      required:
      - subjects
      type: object
      properties:
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/PermissionsResult'
    JsonPatch:
      type: object
    UpdateBusinessRequest:
      required:
      - legalName
      - tradeName
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateEntityRequest'
      - type: object
        properties:
          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
        type:
          type: string
      description: discriminator to determine UpdateNaturalPersonRequest / UpdateBusinessRequest
      example: person
      discriminator:
        propertyName: type
        mapping:
          person: '#/components/schemas/UpdateNaturalPersonRequest'
          business: '#/components/schemas/UpdateBusinessRequest'
    UpdateNaturalPersonRequest:
      type: object
      allOf:
      - $ref: '#/components/schemas/UpdateEntityRequest'
      - 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
    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'
        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; APPLICATION -> null.'
      example: CONSUMER
      enum:
      - CONSUMER
      - CARETAKER_CLIENT
      - SME
      - CORPORATE
      - ACCOUNTING
      - RESELLER
      - CARETAKER
    SpaceRequest:
      required:
      - name
      - type
      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
          items:
            $ref: '#/components/schemas/EntitySpaceResult'
    EntitySpaceResult:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        link:
          type: string
          description: Space URL
      description: List of response spaces
    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
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
        country:
          type: string
          description: Country for the payment account
        currency:
          type: string
          description: Currency for the payment account
        bank:
          $ref: '#/components/schemas/BankIdentifier'
        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
    PaymentAccountRequest:
      required:
      - currency
      - identifier
      - scheme
      type: object
      properties:
        identifier:
          type: string
          description: Account Identifier
          example: BE83504010119715
        scheme:
          type: string
          description: Account Scheme
          example: IBAN
          enum:
          - IBAN
          - BBAN
          - ANB
          - SE_BANKGIRO
          - SE_PLUSGIRO
        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
    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).
    LinkedPaymentAccountResultList:
      type: object
      properties:
        paymentAccounts:
          type: array
          items:
            $ref: '#/components/schemas/LinkedPaymentAccountResult'
    DeductionLimitation:
      required:
      - limit
      type: object
      properties:
        limit:
          type: number
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
      description: Deduction Limitations
    Equityparticipation:
      required:
      - percentage
      - subsidiaryId
      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'
      description: taxRegistration
    TaxRegistrationSpaceDetails:
      type: object
      properties:
        id:
          type: string
          description: Space ID
          format: uuid
        name:
          type: string
          description: Space name
      description: List of associated spaces
    VatGroup:
      required:
      - name
      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:
      required:
      - country
      - taxId
      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'
    ExtensionClientResponse:
      required:
      - clientId
      type: object
      properties:
        clientId:
          type: string
          description: The client's ID
          format: uuid
          example: 00000001-0001-0000-0000-000000000000
        appCallbacks:
          $ref: '#/components/schemas/JsonBMap'
        status:
          $ref: '#/components/schemas/ExtensionStatus'
        settings:
          $ref: '#/components/schemas/JsonBMap'
    ExtensionStatus:
      type: string
      description: Extension's functional statuses
      example: INACTIVE
      enum:
      - ACTIVE
      - INACTIVE
      - PENDING
      - ERROR
    ExtensionClientRequest:
      required:
      - clientId
      type: object
      properties:
        clientId:
          type: string
          description: The client's ID
          format: uuid
          example: 00000001-0001-0000-0000-000000000000
        clientSpaceUrl:
          type: string
          description: URL to the client's space in entity store
    AllExtensionClientResult:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        clients:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionClientResult'
        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
    ExtensionClientResult:
      type: object
      properties:
        id:
          type: string
          description: The extension client ID.
          format: uuid
          example: 00000001-0001-0000-0000-000000000000
        appCallbacks:
          $ref: '#/components/schemas/JsonBMap'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        status:
          $ref: '#/components/schemas/ExtensionStatus'
    ExtensionStatusDto:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExtensionStatus'
    ExtensionAccessManagement:
      type: object
      properties:
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionPermission'
        customResources:
          type: array
          items:
            type: object
        permissionRoles:
          type: array
          items:
            type: object
        roleGroups:
          type: array
          items:
            type: string
        defaultGroups:
          type: array
          items:
            type: string
      description: Access management for the extension
      example: "{\n\"permissions\" : [\n\t{\n\t\t\"resource\": \"space\",\n\t\t\"\
        scope\": \"space_write\"\n\t},\n\t{\n\t\t\"resource\": \"space\",\n\t\t\"\
        scope\": \"space_read\"\n\t}\n],\ncustomResources : [],\npermissionRoles :
        [],\nroleGroups : [],\ndefaultGroups: [\"users\", \"space_admins\"]\n}"
    ExtensionCategory:
      type: string
      description: Extension's functional category
      example: CONNECTOR
      enum:
      - APPLICATION
      - CONNECTOR
      - SERVICE
    ExtensionClientConfigurationsResponse:
      $ref: '#/components/schemas/JsonBMap'
    ExtensionPermission:
      type: object
      properties:
        resource:
          $ref: '#/components/schemas/ExtensionPermissionResource'
        scope:
          type: string
      description: The permissions required by service account
      nullable: true
      example:
      - resource: space
        scope: space_write
      - resource: space
        scope: space_read
      deprecated: true
    ExtensionPermissionResource:
      type: string
      description: Extension permission resource
      example: entity
      enum:
      - entity
      - space
      - client
    ExtensionResult:
      type: object
      properties:
        extensionId:
          type: string
          description: The extension ID.
          format: uuid
          example: 00000001-0001-0000-0000-000000000000
        version:
          type: string
          description: The extension's version.
          example: 1.5.0
        namespace:
          type: string
          description: The namespace of the extension.
          example: com.unifiedpost.btx
        name:
          type: string
          description: The name of the extension.
          example: Chorus Pro
        category:
          $ref: '#/components/schemas/ExtensionCategory'
        status:
          $ref: '#/components/schemas/ExtensionStatus'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        pluginExtensions:
          type: array
          description: The plugin's extensions data.
          example:
          - extensionPoint:
              name: lineitem-assistant
              namespace: com.unifiedpost.btx
              version: 1.0.0
            data:
              basePath: http://app.valitax.com/btx
          items:
            type: object
            additionalProperties:
              type: object
              description: The plugin's extensions data.
              example:
              - extensionPoint:
                  name: lineitem-assistant
                  namespace: com.unifiedpost.btx
                  version: 1.0.0
                data:
                  basePath: http://app.valitax.com/btx
            description: The plugin's extensions data.
            example:
            - extensionPoint:
                name: lineitem-assistant
                namespace: com.unifiedpost.btx
                version: 1.0.0
              data:
                basePath: http://app.valitax.com/btx
        additionalScopes:
          $ref: '#/components/schemas/JsonBMap'
        dependencies:
          type: array
          description: Extension's dependencies on other extensions.
          example:
          - namespace: com.unifiedpost.btx
            name: valitax
            minVersion: 1.2.0
          items:
            type: object
            additionalProperties:
              type: object
              description: Extension's dependencies on other extensions.
              example:
              - namespace: com.unifiedpost.btx
                name: valitax
                minVersion: 1.2.0
            description: Extension's dependencies on other extensions.
            example:
            - namespace: com.unifiedpost.btx
              name: valitax
              minVersion: 1.2.0
        frontendModules:
          type: array
          description: List of frontend modules required by extension. Elements could
            be either strings or objects.
          example:
          - MyApp
          - name: Purchase
            type: Application
            basePath: purchase-invoices
            supportedDevices:
            - web
            - mobile
            module: invoices
            moduleUrl: /assets/{version}/micro-frontends/purchase/something.js
            mobileUrl: /assets/{version}/micro-frontends/purchase/something.js
            minAppVersion: 1.1.1
          items:
            type: object
            description: List of frontend modules required by extension. Elements
              could be either strings or objects.
            example:
            - MyApp
            - name: Purchase
              type: Application
              basePath: purchase-invoices
              supportedDevices:
              - web
              - mobile
              module: invoices
              moduleUrl: /assets/{version}/micro-frontends/purchase/something.js
              mobileUrl: /assets/{version}/micro-frontends/purchase/something.js
              minAppVersion: 1.1.1
        minAssuranceLevels:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssuranceLevel'
          description: The minimal levels of assurance required for this extension.
          example:
            entity: urn:btx:L50
            user: urn:btx:L100
        appCallbacks:
          $ref: '#/components/schemas/JsonBMap'
        serviceAccount:
          type: string
          description: The service account of the extension.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        permissions:
          type: array
          description: The permissions to be granted to extension's service account.
          example:
          - resource: space
            scope: space_read
          - resource: entity
            scope: entity_write
          items:
            $ref: '#/components/schemas/ExtensionPermission'
        supportClients:
          type: boolean
          description: Whether the extension supports clients.
          example: true
        accessManagement:
          $ref: '#/components/schemas/ExtensionAccessManagement'
        clientConfigurations:
          $ref: '#/components/schemas/JsonBMap'
        errorReason:
          type: string
          description: The error reason of status ERROR.
          example: error reason
        hasNewVersion:
          type: boolean
          description: Indicates whether the extension has a new version.
          example: true
        createdAt:
          type: string
          description: Creation datetime.
          format: date-time
        updatedAt:
          type: string
          description: Datetime of last update.
          format: date-time
    AppCallbacks:
      $ref: '#/components/schemas/JsonBMap'
    ExtensionClientConfigurations:
      $ref: '#/components/schemas/JsonBMap'
    ExtensionRequest:
      required:
      - extensionId
      - name
      - namespace
      - version
      type: object
      properties:
        extensionId:
          type: string
          description: The extension ID
          format: uuid
          example: 00000001-0001-0000-0000-000000000000
        version:
          type: string
          description: The extension's version
          example: 1.5.0
        namespace:
          type: string
          description: The namespace of the extension
          example: com.unifiedpost.btx
        name:
          type: string
          description: The name of the extension
          example: Chorus Pro
        category:
          $ref: '#/components/schemas/ExtensionCategory'
        settings:
          $ref: '#/components/schemas/JsonBMap'
        pluginExtensions:
          type: array
          description: The plugin's extensions data
          example:
          - extensionPoint:
              name: lineitem-assistant
              namespace: com.unifiedpost.btx
              version: 1.0.0
            data:
              basePath: http://app.valitax.com/btx
          items:
            type: object
            additionalProperties:
              type: object
              description: The plugin's extensions data
              example:
              - extensionPoint:
                  name: lineitem-assistant
                  namespace: com.unifiedpost.btx
                  version: 1.0.0
                data:
                  basePath: http://app.valitax.com/btx
            description: The plugin's extensions data
            example:
            - extensionPoint:
                name: lineitem-assistant
                namespace: com.unifiedpost.btx
                version: 1.0.0
              data:
                basePath: http://app.valitax.com/btx
        additionalScopes:
          $ref: '#/components/schemas/JsonBMap'
        dependencies:
          type: array
          description: Extension's dependecies on other extensions
          example:
          - namespace: com.unifiedpost.btx
            name: valitax
            minVersion: 1.2.0
          items:
            type: object
            additionalProperties:
              type: object
              description: Extension's dependecies on other extensions
              example:
              - namespace: com.unifiedpost.btx
                name: valitax
                minVersion: 1.2.0
            description: Extension's dependecies on other extensions
            example:
            - namespace: com.unifiedpost.btx
              name: valitax
              minVersion: 1.2.0
        frontendModules:
          type: array
          description: List of frontend modules required by extension
          example:
          - module: mod3
            version: 3
          items:
            type: object
            description: List of frontend modules required by extension
            example:
            - module: mod3
              version: 3
        minAssuranceLevels:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssuranceLevel'
          description: The minimal levels of assurance required for this extension
          example:
            entity: urn:btx:L50
            user: urn:btx:L100
        appCallbacks:
          $ref: '#/components/schemas/JsonBMap'
        serviceAccount:
          type: string
          description: The extension's service account id
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        accessManagement:
          $ref: '#/components/schemas/ExtensionAccessManagement'
        permissions:
          type: array
          description: The permissions required by service account
          nullable: true
          example:
          - resource: space
            scope: space_write
          - resource: space
            scope: space_read
          deprecated: true
          items:
            $ref: '#/components/schemas/ExtensionPermission'
        clientConfigurations:
          $ref: '#/components/schemas/JsonBMap'
    AllExtensionResult:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        extensions:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionResult'
        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
    AllExtensionStatusCountResult:
      required:
      - counts
      type: object
      properties:
        counts:
          type: array
          description: Result of all extension status counts
          items:
            $ref: '#/components/schemas/ExtensionStatusCountResult'
    ExtensionStatusCountResult:
      required:
      - count
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExtensionStatus'
        count:
          type: integer
          description: Count of extension having the status
          format: int64
          example: 5
      description: Result of all extension status counts
    UpdateExtensionRequest:
      type: object
      properties:
        version:
          type: string
          description: The extension's version
          example: 1.5.0
        namespace:
          type: string
          description: The namespace of the extension
          example: com.unifiedpost.btx
        name:
          type: string
          description: The name of the extension
          example: Chorus Pro
        category:
          $ref: '#/components/schemas/ExtensionCategory'
        pluginExtensions:
          type: array
          description: The plugin's extensions data
          example:
          - extensionPoint:
              name: lineitem-assistant
              namespace: com.unifiedpost.btx
              version: 1.0.0
            data:
              basePath: http://app.valitax.com/btx
          items:
            type: object
            additionalProperties:
              type: object
              description: The plugin's extensions data
              example:
              - extensionPoint:
                  name: lineitem-assistant
                  namespace: com.unifiedpost.btx
                  version: 1.0.0
                data:
                  basePath: http://app.valitax.com/btx
            description: The plugin's extensions data
            example:
            - extensionPoint:
                name: lineitem-assistant
                namespace: com.unifiedpost.btx
                version: 1.0.0
              data:
                basePath: http://app.valitax.com/btx
        additionalScopes:
          $ref: '#/components/schemas/JsonBMap'
        dependencies:
          type: array
          description: Extension's dependecies on other extensions
          example:
          - namespace: com.unifiedpost.btx
            name: valitax
            minVersion: 1.2.0
          items:
            type: object
            additionalProperties:
              type: object
              description: Extension's dependecies on other extensions
              example:
              - namespace: com.unifiedpost.btx
                name: valitax
                minVersion: 1.2.0
            description: Extension's dependecies on other extensions
            example:
            - namespace: com.unifiedpost.btx
              name: valitax
              minVersion: 1.2.0
        frontendModules:
          type: array
          description: List of frontend modules required by extension
          example:
          - module: mod3
            version: 3
          items:
            type: object
            description: List of frontend modules required by extension
            example:
            - module: mod3
              version: 3
        minAssuranceLevels:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssuranceLevel'
          description: The minimal levels of assurance required for this extension
          example:
            entity: urn:btx:L50
            user: urn:btx:L100
        appCallbacks:
          $ref: '#/components/schemas/JsonBMap'
        serviceAccount:
          type: string
          description: The extension's service account id
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        accessManagement:
          $ref: '#/components/schemas/ExtensionAccessManagement'
        permissions:
          type: array
          description: The permissions required by service account
          nullable: true
          example:
          - resource: space
            scope: space_write
          - resource: space
            scope: space_read
          deprecated: true
          items:
            $ref: '#/components/schemas/ExtensionPermission'
        clientConfigurations:
          $ref: '#/components/schemas/JsonBMap'
    AppliedPermissionTreeResult:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/SimplePermissionTreeItem'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupResult'
    SimplePermissionTreeItem:
      required:
      - id
      - scopes
      - type
      type: object
      properties:
        id:
          type: string
          description: The BTX id of the resource
        type:
          type: string
          description: The type of the resource.
        scopes:
          type: array
          description: The scope names associated with the permission.
          items:
            type: string
            description: The scope names associated with the permission.
      description: the list of permissions
    CreatePermissionTreeRequest:
      required:
      - applyTo
      - grantedBy
      - resources
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/SimplePermissionTreeItem'
        groups:
          uniqueItems: true
          type: array
          description: The group id(s) to assign requester to
          items:
            type: string
            description: The group id(s) to assign requester to
            format: uuid
        grantedBy:
          type: string
          description: The identifier of the user that requested those permissions
        applyTo:
          type: string
          description: The identifier of the requester who permissions will be granted
            to
    PartnerExtensionDetail:
      type: object
      properties:
        id:
          type: string
          description: Partner extension id
          format: uuid
        name:
          type: string
          description: Partner extension name
        namespace:
          type: string
          description: Partner extension namespace
        version:
          type: string
          description: Partner extension version
        serviceAccount:
          type: string
          description: Partner space service account
        permissionTree:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItem'
      description: List of partner extension details
    PartnerResult:
      required:
      - name
      type: object
      properties:
        id:
          type: string
          description: Partner's space id
          format: uuid
          example: abbf9959-c5aa-49ac-9032-f417c636fc5d
        name:
          type: string
          description: Name of partner
          example: ABC Accounting Company
        type:
          $ref: '#/components/schemas/SpaceType'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        description:
          type: string
          description: Description of partner
          example: Company provides accounting service
        clientId:
          type: string
          description: Client's id (from partner store)
          example: 6c1f5c43-1a0f-4524-a27e-8c3b2e233dae
        spaceUrl:
          type: string
          description: URL to the client's space in entity store
        partnerExtensions:
          type: array
          description: List of partner extension details
          items:
            $ref: '#/components/schemas/PartnerExtensionDetail'
      description: List of partners
    PartnerRequest:
      required:
      - clientId
      - id
      - name
      - segment
      - type
      type: object
      properties:
        id:
          type: string
          description: Identifier of partner
          format: uuid
          example: 00000011-0000-0000-0000-000000000000
        name:
          type: string
          description: Name of partner
          example: ABC Accounting Company
        description:
          type: string
          description: Description of partner
          example: Company provides accounting service
        location:
          type: string
          description: Location of partner
          example: location
        clientId:
          type: string
          description: Client's id (in partner store)
          example: 6c1f5c43-1a0f-4524-a27e-8c3b2e233dae
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        type:
          $ref: '#/components/schemas/SpaceType'
    SpacePaymentMetaData:
      $ref: '#/components/schemas/JsonBMap'
    AllPartnerResult:
      required:
      - currentPage
      - pageSize
      type: object
      properties:
        partners:
          type: array
          items:
            $ref: '#/components/schemas/PartnerResult'
        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
    AllSpaceResult:
      type: object
      properties:
        spaces:
          type: array
          items:
            $ref: '#/components/schemas/UserSpaceResult'
    UserSpaceResult:
      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'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        region:
          type: string
          description: The region of the space
          example: eu
        entityId:
          type: string
          description: Entity id
          format: uuid
      description: List of response entities
    BillingInfoResult:
      type: object
      properties:
        spaceId:
          type: string
          description: Space ID
        spaceName:
          type: string
          description: Space name
        spaceType:
          $ref: '#/components/schemas/SpaceType'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        billingName:
          type: string
          description: Name for billing
        email:
          type: string
          description: Email address for billing
        locale:
          type: string
          description: Locale for billing
        billingAddress:
          $ref: '#/components/schemas/SepaStructuredAddress'
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
        partners:
          type: array
          description: Partners ID and name (to get accountant information)
          items:
            $ref: '#/components/schemas/PartnerSpaceBillingResult'
        billingCurrency:
          pattern: '[A-Z]{3}'
          type: string
          description: International code ISO 4217 of the billing currency used
          example: EUR
    PartnerSpaceBillingResult:
      type: object
      properties:
        partnerId:
          type: string
          description: Unique identifier of the partner
        name:
          type: string
          description: Name of the partner space
      description: Partners ID and name (to get accountant information)
    UserContextResult:
      type: object
      properties:
        context:
          $ref: '#/components/schemas/JsonBMap'
    PermissionTreeResult:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItem'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupResult'
    EntityForSpaceResult:
      type: object
      properties:
        id:
          type: string
          description: Entity ID
        name:
          type: string
          description: The name of the entity
        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'
        addresses:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SepaStructuredAddress'
          description: Addresses
      description: Entity information
    SpaceWithEntityResult:
      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'
        segment:
          $ref: '#/components/schemas/SpaceSegment'
        region:
          type: string
          description: The region of the space
          example: eu
        entity:
          $ref: '#/components/schemas/EntityForSpaceResult'
        paymentMetaData:
          $ref: '#/components/schemas/JsonBMap'
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
    SpaceCommunicationData:
      type: object
      properties:
        brand:
          type: string
          description: Brand
          example: Banqup
        locale:
          type: string
          description: Locale
          example: de
        email:
          type: string
          description: Email
          example: bob@example.com
        mobile:
          type: string
          description: Mobile
          example: '+32497666003'
        entityId:
          type: string
          description: Entity id
          format: uuid
    SpaceContextResult:
      type: object
      properties:
        brand:
          type: string
        type:
          type: string
        segment:
          type: string
        countryCode:
          type: string
        entityId:
          type: string
        extensions:
          type: array
          items:
            $ref: '#/components/schemas/SpaceExtensionDetails'
    SpaceExtensionDetails:
      type: object
      properties:
        id:
          type: string
        version:
          type: string
    SpaceTaxInfoResult:
      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/SepaStructuredAddress'
          description: Addresses
        taxRegistration:
          $ref: '#/components/schemas/TaxRegistrationResult'
    PermissionTreeRequest:
      required:
      - resources
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/SimplePermissionTreeItem'
        groups:
          uniqueItems: true
          type: array
          description: The group id(s) to assign requester to
          items:
            type: string
            description: The group id(s) to assign requester to
            format: uuid
    UpdateSpaceRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of space
        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.
            example:
              brand: Banqup
          description: Space context. The context modules will be ignored.
          example:
            brand: Banqup
        globalIdentifiers:
          $ref: '#/components/schemas/JsonBMap'
    PermissionTreeItemV2:
      required:
      - id
      - scopes
      - type
      type: object
      properties:
        id:
          type: string
          description: The BTX id of the resource
        type:
          type: string
          description: The type of the resource.
        name:
          type: string
          description: The display name of the resource.
        scopes:
          type: array
          description: The scope names associated with the permission.
          items:
            $ref: '#/components/schemas/Scope'
      description: the list of permissions v2
    PermissionTreeResultV2:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/PermissionTreeItemV2'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupResult'
    Scope:
      type: object
      properties:
        name:
          type: string
      description: The scope names associated with the permission.
  securitySchemes:
    entity_store:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://docs.btx.banqup.com/docs/identity/auth/get-bearer-token
          scopes:
            space_read: Can read space data
            space_write: Can write space data
            entity_read: Can read entity data
            entity_write: Can write entity data
        authorizationCode:
          authorizationUrl: https://api.btx.fr.banqup.com/v1/oauth20/authorization
          tokenUrl: https://api.btx.fr.banqup.com/v1/oauth20/token_kc
          scopes:
            space_read: Can read space data
            space_write: Can write space data
            entity_read: Can read entity data
            entity_write: Can write entity data
