openapi: 3.0.1
info:
  title: 'Partner service: API Specification'
  description: 'The Partner service: API Specification'
  version: 0.0.457
servers:
- description: Generated server url
  url: https://api.cve.btx.eu.banqup.com/partner
security:
- oauth2: []
tags:
- name: Insights
  description: Insights APIs
- name: Template
  description: Template APIs
- name: Client
  description: Client APIs
- name: Extension
  description: Extension APIs
- name: Metadata
  description: Metadata APIs
paths:
  /v1/spaces/{spaceId}/clients:importFromTemplate:
    post:
      tags:
      - Client
      summary: Import list clients from excel file
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Api to import client in bulk <br/> Scope: []"
      operationId: importBulkClient
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientBulkImportRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientBulkAsyncCreationResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /v1/clients/importTemplate:create:
    post:
      tags:
      - Client
      summary: Get excel template file for import clients in bulk
      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/> Api generate template file for import clients in bulk <br/> Scope: []"
      operationId: getBulkImportTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientBulkImportTemplateRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients:bulkInvite:
    post:
      tags:
      - Client
      summary: Bulk invite 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/> Schedules background processing to invite a list clients belongs to
        specific space. Returns immediately with HTTP 202. <br/> Scope: []"
      operationId: bulkInvite
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientBulkInviteRequest'
        required: true
      responses:
        '202':
          description: Accepted – task has been scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientBulkInviteResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients:batchAssignExtension:
    post:
      tags:
      - Client
      summary: Batch assign extensions to multiple 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/> Schedules background processing to assign each specified extension to
        each specified client. Returns immediately with HTTP 202. <br/> Scope: []"
      operationId: batchAssignExtension
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchAssignExtensionRequest'
        required: true
      responses:
        '202':
          description: Accepted – task has been scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchAssignExtensionResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients:batchAddTeamMember:
    post:
      tags:
      - Client
      summary: Batch add a team member to multiple 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/> Schedules background processing to add a team member to each specified
        client. Returns immediately with HTTP 202. <br/> Scope: []"
      operationId: batchAddTeamMember
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchAddTeamMemberRequest'
        required: true
      responses:
        '202':
          description: Accepted – task has been scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchAddTeamMemberResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients/settings:markTemplateAsDefault:
    post:
      tags:
      - Extension
      summary: Mark a template as default
      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/> Api to set template for default usage <br/> Scope: []"
      operationId: markTemplateSettingAsDefault
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkSpaceExtensionTemplateSettingAsDefaultRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarkSpaceExtensionTemplateSettingAsDefaultRequest'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients/settings:addTemplate:
    post:
      tags:
      - Extension
      summary: Add extension template 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/> Api to add extension template settings <br/> Scope: []"
      operationId: addSpaceExtensionTemplateSettings
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSpaceExtensionSettingRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddSpaceExtensionSettingRequest'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clientPeppolExtension:backgroundActivate:
    post:
      tags:
      - Client
      summary: Perform activate extension for clients
      description: 'Activate eInvoicing(Peppol) for clients <br/> Scope: []'
      operationId: bulkActivateClientsExtension
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkActivateClientExtensionRequest'
        required: true
      responses:
        '200':
          description: Request call successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActivateClientExtensionResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/peppol:retryActivation:
    post:
      tags:
      - Extension
      summary: Retry to activate Peppol extensions for clients in multiple partner
        spaces
      description: 'For each provided partnerSpaceId, schedules background job to
        fetch all clients in that space, filtering ACTIVE client with TRUE mandate,
        and retry to activate peppol for them <br/> Scope: []'
      operationId: retryPeppolActivation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryPendingExtensionsRequest'
        required: true
      responses:
        '202':
          description: Accepted - background job is scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryPendingExtensionsResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/clients:retryPendingExtensions:
    post:
      tags:
      - Extension
      summary: Retry pending/inactive extensions for multiple partner spaces
      description: 'For each provided partnerSpaceId, schedules a background task
        that fetches all clients in the space, identifies those with PENDING or INACTIVE
        extensions, and retries extension activation. Returns immediately with HTTP
        202. <br/> Scope: []'
      operationId: retryPendingExtensions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryPendingExtensionsRequest'
        required: true
      responses:
        '202':
          description: Accepted – tasks have been scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryPendingExtensionsResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/clients:retryEvaluateMetadata:
    post:
      tags:
      - Metadata
      summary: Retry evaluate metadata for client
      description: "Re-evaluate clients and correct inactive client's data. <br/>
        Scope: []"
      operationId: retryEvaluateMetadata
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryEvaluateClientDataRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryEvaluateMetadataResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/clients:retryApplyTemplate:
    post:
      tags:
      - Template
      summary: Re-apply template data to active clients
      description: 'Re-apply template data to active clients <br/> Scope: []'
      operationId: retryApplyTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryEvaluateClientDataRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryApplyTemplateResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/insights/{partnerSpaceId}/authorization:
    post:
      tags:
      - Insights
      summary: Get access token
      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 insight temporary access token for rendering the dashboard <br/>
        Scope: []"
      operationId: authorization
      parameters:
      - name: partnerSpaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LuzmoUserInsightsResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /v1/spaces/{spaceId}/clients/settings/billingDefaults:
    patch:
      tags:
      - Extension
      summary: Update extension setting
      description: "<div class='my-preview'><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Api update extension setting <br/> Scope: []"
      operationId: updateExtensionSetting
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultBillingRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultBillingRequest'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients:confirmSignedMandate:
    patch:
      tags:
      - Client
      summary: Confirm signed mandate
      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/> This endpoint is for bulk confirm signed mandate of clients <br/> Scope:
        []"
      operationId: confirmSignedMandate
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmSignedMandateRequest'
        required: true
      responses:
        '200':
          description: All updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmSignedMandateResponse'
        '400':
          description: Bad Request. One or more clients failed to be updated
        '500':
          description: Internal server error
  /api/v1/spaces/{spaceId}/clients/settings/template:
    delete:
      tags:
      - Extension
      summary: Delete specific template 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/> Api to delete specific template settings <br/> Scope: []"
      operationId: deleteSpaceExtensionTemplateSettings
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      - name: templateName
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: response
        '400':
          description: Bad request
        '500':
          description: Internal server error
    patch:
      tags:
      - Extension
      summary: Update specific template 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/> Api to update specific template settings <br/> Scope: []"
      operationId: updateSpaceExtensionTemplateSettings
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      - name: templateName
        in: query
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSpaceExtensionTemplateSettingRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSpaceExtensionTemplateSettingRequest'
        '400':
          description: Bad request
        '500':
          description: Internal server error
  /v1/spaces/{spaceId}/clients:delete:
    delete:
      tags:
      - Client
      summary: Perform bulk delete 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/> Api to perform bulk delete clients <br/> Scope: []"
      operationId: deleteBulkClients
      parameters:
      - name: spaceId
        in: path
        required: true
        schema:
          pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientBulkDeleteRequest'
        required: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientBulkAsyncDeleteResponse'
        '400':
          description: Bad request
        '500':
          description: Internal server error
components:
  schemas:
    ClientBulkAsyncCreationResponse:
      required:
      - clientRowResponses
      - total
      type: object
      properties:
        total:
          type: integer
          description: Number of clients
          format: int32
          example: 3
        clientRowResponses:
          type: array
          description: Client row imports list
          items:
            $ref: '#/components/schemas/ClientRowResponse'
    ClientRowResponse:
      required:
      - clientName
      - row
      type: object
      properties:
        row:
          type: string
          description: Client Row
          example: '1'
        clientName:
          type: string
          description: Client Name
          example: CLI-001
    ClientBulkImportRequest:
      required:
      - fileId
      - segment
      type: object
      properties:
        fileId:
          type: string
          description: The file identifier
          format: uuid
          example: 69f296a5-fb7e-47d8-a1de-bd528f0038b0
        rows:
          type: array
          description: Client rows import
          example:
          - '1'
          - '2'
          - '3'
          items:
            type: string
            description: Client rows import
            example: '["1","2","3"]'
        billing:
          type: object
          additionalProperties:
            type: object
            description: Default billing subscription
            example:
              plans: ''
              ownerSpaceId: d6a1eeef-882a-4595-9f6e-b97f90796ad9
              payForClients: ''
              customerGroups: ''
              partnerSpaceId: ''
              periodQuantity: 1
          description: Default billing subscription
          example:
            plans: ''
            ownerSpaceId: d6a1eeef-882a-4595-9f6e-b97f90796ad9
            payForClients: ''
            customerGroups: ''
            partnerSpaceId: ''
            periodQuantity: 1
        segment:
          type: string
          description: 'Space segment like CONSUMER, ACCOUNTING, RESELLER, REFERRAL,... '
          example: ACCOUNTING
    ClientBulkImportTemplateRequest:
      required:
      - segment
      type: object
      properties:
        country:
          type: string
          description: Space's country code
          example: BE
        segment:
          type: string
          description: 'Space segment like CONSUMER, ACCOUNTING, RESELLER, REFERRAL,... '
          example: ACCOUNTING
        locale:
          type: string
          description: Locale to request template excel file in user's language
          example: fr-BE
          default: en-GB
    ClientBulkInviteResponse:
      type: object
      properties:
        taskId:
          type: string
          description: Unique identifier for this scheduled task instance
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
        total:
          type: integer
          description: Number of clients that will be processed asynchronously
          format: int32
          example: 5
    ClientBulkInviteRequest:
      required:
      - invitationMessage
      type: object
      properties:
        sessionId:
          type: string
          description: Session ID of the user initiating the request
          example: sess-abc123
        clientIds:
          type: array
          description: List of client IDs to invite. **Mutually exclusive with 'ql'**.
          nullable: true
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of client IDs to invite. **Mutually exclusive with 'ql'**.
            nullable: true
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
        ql:
          type: string
          description: Query language use for find clients. **Mutually exclusive with
            'clientIds'**.
          nullable: true
          example: metadata.eInvoicingMandated=false
        invitationMessage:
          minLength: 1
          type: string
          description: Message for bulk invitation
          example: I'd like to invite you to join Banqup
      description: Request payload for bulk invite clients. **CRITICAL REQUIREMENT:**
        You must provide either 'clientIds' or 'ql', but never both at the same time.
        Providing both or neither will result in a 400 Bad Request.
    BatchAssignExtensionResponse:
      type: object
      properties:
        taskId:
          type: string
          description: Unique identifier for this scheduled task instance
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
        total:
          type: integer
          description: Number of clients that will be processed asynchronously
          format: int32
          example: 5
    BatchAssignExtensionRequest:
      required:
      - clientIds
      - extensionIds
      type: object
      properties:
        sessionId:
          type: string
          description: Session ID of the user initiating the request
          example: sess-abc123
        extensionIds:
          minItems: 1
          type: array
          description: List of extension IDs to assign to each client
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of extension IDs to assign to each client
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
        clientIds:
          minItems: 1
          type: array
          description: List of client IDs to assign the extensions to
          example:
          - 62df1ac3-dabe-4bbc-9642-58f72bb12ec6
          items:
            type: string
            description: List of client IDs to assign the extensions to
            example: '["62df1ac3-dabe-4bbc-9642-58f72bb12ec6"]'
    BatchAddTeamMemberResponse:
      type: object
      properties:
        taskId:
          type: string
          description: Unique identifier for this scheduled task instance
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
        total:
          type: integer
          description: Number of clients that will be processed asynchronously
          format: int32
          example: 5
    BatchAddTeamMemberRequest:
      required:
      - clientIds
      - userIds
      type: object
      properties:
        clientIds:
          minItems: 1
          type: array
          description: List of client IDs to add the team members to
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of client IDs to add the team members to
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
        userIds:
          minItems: 1
          type: array
          description: List of user IDs to add as team members on each client
          example:
          - 62df1ac3-dabe-4bbc-9642-58f72bb12ec6
          items:
            type: string
            description: List of user IDs to add as team members on each client
            example: '["62df1ac3-dabe-4bbc-9642-58f72bb12ec6"]'
        sessionId:
          type: string
          description: Session ID of the user initiating the request
          example: sess-abc123
    MarkSpaceExtensionTemplateSettingAsDefaultRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of template to be set as default
          example: template_A
    AddSpaceExtensionSettingRequest:
      type: object
      properties:
        name:
          type: string
          description: Template name
          example: Template A
        description:
          type: string
          description: Description of template
          example: A template use for...
        isDefaultTemplate:
          type: boolean
          description: Is default template
          example: true
          default: false
        value:
          $ref: '#/components/schemas/TemplateSetting'
    DefaultBillingSetting:
      type: object
      properties:
        plans:
          type: array
          description: Billing plans
          example:
          - plan1
          - plan2
          items:
            type: string
            description: Billing plans
            example: '["plan1","plan2"]'
        ownerSpaceId:
          type: string
          description: Owner spaceId
          example: b073a960-e85b-4400-af22-42ec5b15ed4d
        payForClients:
          type: boolean
          description: Is accountant pay for their client subscription
          example: true
        customerGroups:
          type: array
          description: Customer group
          example:
          - customer1
          - customer2
          items:
            type: string
            description: Customer group
            example: '["customer1","customer2"]'
        periodQuantity:
          type: integer
          description: Period quantity
          format: int32
          example: 3
        partnerSpaceId:
          type: string
          description: partner spaceId
          example: b073a960-e85b-4400-af22-42ec5b15ed4d
        promoCodes:
          type: array
          description: Promotion code
          example:
          - promoCode1
          - promoCode2
          items:
            type: string
            description: Promotion code
            example: '["promoCode1","promoCode2"]'
    TemplateSetting:
      type: object
      properties:
        accountingIntegrations:
          type: array
          description: Accounting integrations
          example:
          - f28494d1-579e-4371-be1c-b63926f943de
          - f28493d2-579e-4371-be1c-b63926f943de
          items:
            type: string
            description: Accounting integrations
            example: '["f28494d1-579e-4371-be1c-b63926f943de","f28493d2-579e-4371-be1c-b63926f943de"]'
        teamMembers:
          type: array
          description: Team members
          example:
          - f28494d1-579e-4371-be1c-b63926f943de
          - f28493d2-579e-4371-be1c-b63926f943de
          items:
            type: string
            description: Team members
            format: uuid
        billing:
          $ref: '#/components/schemas/DefaultBillingSetting'
        invitationMessage:
          pattern: "^[^<>]*$"
          type: string
          description: Invitation message for client
          nullable: true
    BulkActivateClientExtensionResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Status of activate client extensions
          example: true
        message:
          type: string
          description: Error message in case create message for process activate client
            failed
          example: ''
    BulkActivateClientExtensionRequest:
      required:
      - sessionId
      type: object
      properties:
        sessionId:
          minLength: 1
          type: string
          description: The session identifier set by the UI initiating the request
          example: 6ade8441-d9a8-4347-b6cd-2a8edd5ecf2c
        clientIds:
          type: array
          description: List of client IDs to activate the extension
          nullable: true
          example:
          - 6ade8441-d9a8-4347-b6cd-2a8edd5ecf2c
          - 6ade8441-d9a8-4347-b6cd-2a8edd5ecf2c
          items:
            type: string
            description: List of client IDs to activate the extension
            nullable: true
            example: '["6ade8441-d9a8-4347-b6cd-2a8edd5ecf2c","6ade8441-d9a8-4347-b6cd-2a8edd5ecf2c"]'
        ql:
          type: string
          description: Query language use for find clients. **Mutually exclusive with
            'clientIds'**.
          nullable: true
          example: metadata.eInvoicingMandated=true
    RetryPendingExtensionsResponse:
      type: object
      properties:
        tasks:
          type: array
          description: Scheduled task details per partner space
          items:
            $ref: '#/components/schemas/SpaceTaskResult'
        total:
          type: integer
          description: Total number of spaces scheduled for processing
          format: int32
          example: 3
    SpaceTaskResult:
      type: object
      properties:
        spaceId:
          type: string
          description: Partner space ID
          example: f4c61a46-46c5-43a6-b8d0-014389bd8448
        taskId:
          type: string
          description: Unique identifier for the scheduled task instance
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
      description: Scheduled task details per partner space
    RetryPendingExtensionsRequest:
      required:
      - partnerSpaceIds
      type: object
      properties:
        partnerSpaceIds:
          minItems: 1
          type: array
          description: List of partner space IDs to process
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of partner space IDs to process
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
        delayBetweenClientsInSeconds:
          maximum: 15
          minimum: 0
          type: integer
          description: Optional delay in seconds between processing each client. Defaults
            to 6 seconds if omitted.
          format: int32
          example: 5
          default: 6
    RetryEvaluateMetadataResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of execution
        summary:
          $ref: '#/components/schemas/RetrySummaryResponse'
        failedClients:
          type: array
          description: List of clientId that failed
          items:
            type: string
            description: List of clientId that failed
    RetrySummaryResponse:
      type: object
      properties:
        totalProcessed:
          type: integer
          description: Total client process
          format: int32
        successfulCount:
          type: integer
          description: Number client success
          format: int32
        failedCount:
          type: integer
          description: Number client failed
          format: int32
      description: Summary of execution
    RetryEvaluateClientDataRequest:
      type: object
      properties:
        data:
          type: array
          description: List of data include spaceId and clientId need to be re-evaluate
          items:
            $ref: '#/components/schemas/RetryEvaluateDataRequest'
    RetryEvaluateDataRequest:
      type: object
      properties:
        spaceId:
          type: string
          description: Space id
          example: f4c61a46-46c5-43a6-b8d0-014389bd8448
        clientIds:
          type: array
          description: List of client IDs to re-evaluate
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of client IDs to re-evaluate
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
      description: List of data include spaceId and clientId need to be re-evaluate
    ClientErrorResponse:
      type: object
      properties:
        clientId:
          type: string
          description: Id of client
        errorCode:
          type: string
          description: Error code process apply template
      description: List of clientId that failed
    RetryApplyTemplateResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of execution
        summary:
          $ref: '#/components/schemas/RetrySummaryResponse'
        failedClients:
          type: array
          description: List of clientId that failed
          items:
            $ref: '#/components/schemas/ClientErrorResponse'
    LuzmoUserInsightsResponse:
      required:
      - id
      - token
      type: object
      properties:
        id:
          type: string
          description: Auth key where user use for render the dashboard
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
        token:
          type: string
          description: Auth token where user use for render the dashboard
          example: PVvhEySufrGoUghDDjsyfGjsxRRh0FjvihoVsjsPXYeGWJwx
        dashboardIds:
          type: array
          description: List dashboard id that user have access
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
          items:
            type: string
            description: List dashboard id that user have access
            example: a71f1a08-a917-4715-b0c2-6179bbd36668
        expiry:
          type: string
          format: date-time
          writeOnly: true
        expiryAt:
          type: integer
          description: Expiry time of access token in epoch second
          format: int64
          example: 1782142660
    DefaultBillingRequest:
      type: object
      properties:
        plans:
          type: array
          description: Billing plans
          example:
          - plan1
          - plan2
          items:
            type: string
            description: Billing plans
            example: '["plan1","plan2"]'
        ownerSpaceId:
          type: string
          description: Owner spaceId
          example: b073a960-e85b-4400-af22-42ec5b15ed4d
        payForClients:
          type: boolean
          description: Is accountant pay for their client subscription
          example: true
        customerGroups:
          type: array
          description: Customer group
          example:
          - customer1
          - customer2
          items:
            type: string
            description: Customer group
            example: '["customer1","customer2"]'
        periodQuantity:
          type: integer
          description: Period quantity
          format: int32
          example: 3
        partnerSpaceId:
          type: string
          description: partner spaceId
          example: b073a960-e85b-4400-af22-42ec5b15ed4d
    ConfirmSignedMandateResponse:
      type: object
      properties:
        total:
          type: integer
          description: Number of clients confirm mandate successfully
          format: int32
          example: 5
    ConfirmSignedMandateRequest:
      type: object
      properties:
        clientIds:
          type: array
          description: List of client IDs to confirm mandate. **Mutually exclusive
            with 'ql'**.
          nullable: true
          example:
          - f4c61a46-46c5-43a6-b8d0-014389bd8448
          items:
            type: string
            description: List of client IDs to confirm mandate. **Mutually exclusive
              with 'ql'**.
            nullable: true
            example: '["f4c61a46-46c5-43a6-b8d0-014389bd8448"]'
        ql:
          type: string
          description: Query language use for find clients. **Mutually exclusive with
            'clientIds'**.
          nullable: true
          example: metadata.eInvoicingMandated=false
    UpdateSpaceExtensionTemplateSettingRequest:
      type: object
      properties:
        name:
          type: string
          description: Template name
          example: Template A
        description:
          type: string
          description: Description of template
          example: A template use for...
        isDefaultTemplate:
          type: boolean
          description: Is default template
          example: true
          default: false
        value:
          $ref: '#/components/schemas/TemplateSetting'
    ClientBulkAsyncDeleteResponse:
      required:
      - bulkClientsDeleteGroupId
      - clientDeleteResponses
      - total
      type: object
      properties:
        bulkClientsDeleteGroupId:
          type: string
          description: A group id of bulk clients delete that is unique value for
            each bulk delete submit
          format: uuid
          example: a71f1a08-a917-4715-b0c2-6179bbd36668
        total:
          type: integer
          description: Total of clients
          format: int32
          example: 3
        clientDeleteResponses:
          type: array
          description: Bulk delete clients data response asynchronously
          items:
            $ref: '#/components/schemas/ClientDeleteResponse'
    ClientDeleteResponse:
      required:
      - clientId
      - clientName
      type: object
      properties:
        clientId:
          type: string
          description: Client id
          example: 123e4567-e89b-12d3-a456-426614174000
        clientName:
          type: string
          description: Client Name
          example: CLI-001
    ClientBulkDeleteRequest:
      type: object
      properties:
        bulkDeleteClients:
          uniqueItems: true
          type: array
          description: bulkDeleteClients is a set of bulk clients data that request
            to delete in bulk asynchronously.
          nullable: true
          example:
            bulkDeleteClients:
            - clientId: f4c61a46-46c5-43a6-b8d0-014389bd8448
              clientName: Client DevTest1
            - clientId: 3ec68398-a06e-48c3-99a6-ac7c84b0b571
              clientName: Client DevTest2
          items:
            $ref: '#/components/schemas/ClientDeleteRequest'
        ql:
          type: string
          description: Query language use for delete clients. **Mutually exclusive
            with 'bulkDeleteClients'**.
          nullable: true
          example: metadata.eInvoicingMandated=false
    ClientDeleteRequest:
      required:
      - clientId
      - clientName
      type: object
      properties:
        clientId:
          type: string
          description: Client Id in UUID string format
          example: b85ad874-16b3-4565-be2f-4fd4ed7c8c72
        clientName:
          type: string
          description: Client Name
          example: CLI-001
      description: bulkDeleteClients is a set of bulk clients data that request to
        delete in bulk asynchronously.
      nullable: true
      example:
        bulkDeleteClients:
        - clientId: f4c61a46-46c5-43a6-b8d0-014389bd8448
          clientName: Client DevTest1
        - clientId: 3ec68398-a06e-48c3-99a6-ac7c84b0b571
          clientName: Client DevTest2
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.cve.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
