openapi: 3.0.1
info:
  title: workspace_core API
  description: Merged OpenAPI spec for workspace_core domain
  version: 1.0.0
servers:
- url: https://api.cve.btx.eu.banqup.com/workspace/core
paths:
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:
    get:
      tags:
      - Spaces
      summary: Get space locked setting value
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get space locked setting value <br/> Scope: space_read'
      operationId: getSpaceLockedSettingValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
        '404':
          description: Space locked setting not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    put:
      tags:
      - Spaces
      summary: Update space locked setting value
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update space locked setting value <br/> Scope: space_write'
      operationId: updateSpaceLockedSettingValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSpaceLockedSettingRequest'
            example:
              value: '10'
              lockId: 3bf1fba7-0bdd-4a50-b53c-3abd74ba98a3
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
                lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    post:
      tags:
      - Spaces
      summary: Create space locked setting
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create space locked setting <br/> Scope: space_write'
      operationId: createSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting value to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceLockedSettingRequest'
            example:
              value: '1'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingResult'
              example:
                id: e7fca31b-0961-4cb1-9a6a-c17ca42df19e
                spaceId: 367b32b8-3c9f-49a2-b7e7-2224b1247fe7
                settingKey: referenceNumber
                settingValue: '1'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    delete:
      tags:
      - Spaces
      summary: Delete space locked setting
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete space locked setting <br/> Scope: space_write'
      operationId: deleteSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:getValueAndLock:
    post:
      tags:
      - Spaces
      summary: Get space locked setting value and lock
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get space locked setting value and lock <br/> Scope: space_write'
      operationId: getSpaceLockedSettingValueAndLock
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpaceLockedSettingValue'
              example:
                value: '1'
                lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 409
                error: ABORTED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Conflict
                detail: Specific detail about what could not be done.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v1/spaces/{spaceId}/lockedSettings/{settingKey}:deleteLock:
    post:
      tags:
      - Spaces
      summary: Remove lock for space locked setting
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Remove lock for space locked setting <br/> Scope: space_write'
      operationId: removeLockForSpaceLockedSetting
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: settingKey
        in: path
        description: 'The locked setting key. Only allows characters: a-z, A-Z, 0-9,
          dot (.), dash (-), and underscore (_)'
        required: true
        schema:
          type: string
        example: referenceNumber
      requestBody:
        description: Locked setting data to delete lock
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSpaceLockedSettingLockRequest'
            example:
              lockId: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets:
    get:
      tags:
      - Assets
      summary: Get list of assets
      description: "<div class='my-preview'><span>Preview: The API is in development\
        \ or testing phases and the interface could still change slightly.</span></div>\
        \ <br/> Get list of assets on the given space, with options to filter out\
        \ the result.\nThe API supports pagination and sorting.\n <br/> Scope: space_read"
      operationId: getAllAssets
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: category
        in: query
        description: Asset category
        schema:
          $ref: '#/components/schemas/Category'
        example: BRAND
      - name: fileType
        in: query
        description: Asset file type
        schema:
          type: string
        example: jpeg
      - name: status
        in: query
        description: Asset status
        schema:
          $ref: '#/components/schemas/AssetStatus'
        example: AWAITING_UPLOAD
      - name: page
        in: query
        description: Zero-based page index, cannot be negative, default 0
        schema:
          maximum: 10737418
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 20
      - name: pageSize
        in: query
        description: 'Page size. Minimum 1, maximum: 200, default 20'
        schema:
          maximum: 200
          minimum: 1
          type: integer
          format: int32
          default: 20
        example: 20
      - name: includeTotalElements
        in: query
        description: Return the totalElements number of entries in the response
        schema:
          type: boolean
        example: true
      - name: onlyCount
        in: query
        description: Return ONLY the totalElements number of entries in the response.
        schema:
          type: boolean
        example: true
      - name: sortBy
        in: query
        description: Sorting criteria
        schema:
          type: string
          enum:
          - createdAt
          - createdAt.asc
          - createdAt.desc
        example: createdAt.asc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllAssetResult'
              example:
                assets:
                - id: 1d1911f5-38c2-4e49-b97d-ba5059bb813c
                  filename: brand logo
                  description: brand logo for the company
                  category: BRAND
                  status: VIRUS_SCANNED
                  creatorSubject: 00000001-0001-0001-0001-000000000000
                  creatorType: user
                  retentionTime: 2129-01-14 19:58:47+00:00
                  fileSize: 1024
                  fileType: jpeg
                  contentType: image/jpeg
                  source: user-upload
                  uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=zzz
                  tags:
                  - tag1
                  - tag2
                  metadata:
                    key: value
                  createdAt: 2025-01-01 10:15:00+00:00
                  updatedAt: 2025-01-01 10:15:00+00:00
                totalElements: 1
                currentPage: 0
                pageSize: 20
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Assets
      summary: Create asset in the space
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create asset in the space <br/> Scope: space_write'
      operationId: createSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Asset data to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetRequest'
            example:
              filename: brand_logo.jpeg
              retentionTime: 2029-01-14 19:58:47+00:00
              fileSize: 1024
              contentType: image/jpeg
              source: user-upload
              fileType: jpeg
              description: Brand logo of the company.
              creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
              creatorType: user
              tags:
              - tag1
              - tag2
              metadata:
                key: value
              category: BRAND
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14 19:58:47+00:00
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06 10:15:00+00:00
                updatedAt: 2025-08-06 12:45:00+00:00
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets/{assetId}:
    get:
      tags:
      - Assets
      summary: Get asset in the space
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get asset in the space <br/> Scope: space_read'
      operationId: getSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14 19:58:47+00:00
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06 10:15:00+00:00
                updatedAt: 2025-08-06 12:45:00+00:00
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    delete:
      tags:
      - Assets
      summary: Delete asset in the space
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete asset in the space <br/> Scope: space_write'
      operationId: deleteSpaceAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
    patch:
      tags:
      - Assets
      summary: Update asset in the space
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update asset of the given space <br/> Scope: space_write'
      operationId: updateAsset
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Asset data to update
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/AssetRequest'
            example:
              filename: brand_logo.jpeg
              retentionTime: 2029-01-14 19:58:47+00:00
              fileSize: 1024
              contentType: image/jpeg
              source: user-upload
              fileType: jpeg
              description: Brand logo of the company.
              creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
              creatorType: user
              tags:
              - tag1
              - tag2
              metadata:
                key: value
              category: BRAND
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetResult'
              example:
                id: 00000003-0000-0000-0000-000000000000
                filename: brand_logo.jpeg
                description: Brand logo of the company.
                creatorSubject: 700241fb-3acd-4d01-8852-875e96b14b4a
                creatorType: user
                retentionTime: 2029-01-14 19:58:47+00:00
                status: PROCESSING
                fileSize: 1024
                fileType: jpeg
                contentType: image/jpeg
                uploadUrl: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
                source: user-upload
                tags:
                - tag1
                - tag2
                metadata:
                  key: value
                category: BRAND
                createdAt: 2025-08-06 10:15:00+00:00
                updatedAt: 2025-08-06 12:45:00+00:00
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/assets/{assetId}/content:
    get:
      tags:
      - Assets
      summary: Get asset content
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get asset content on the given space <br/> Scope: space_read'
      operationId: getSpaceAssetContent
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: assetId
        in: path
        description: The asset identifier
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Ok
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '302':
          description: Found
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        default:
          description: Other error messages
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}:
    get:
      tags:
      - Documents
      summary: Get list of document categories
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Get list of document categories with the given name and optional search
        term on the given space space. <br/> Scope: space_read'
      operationId: listCategories
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: search
        in: query
        description: Search term - partial, case insensitive search supported
        schema:
          type: string
      - name: active
        in: query
        description: Filter category values based on their status
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCategoriesResponse'
              example:
                values:
                - fuel
                - restaurant
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                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+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_read
    post:
      tags:
      - Documents
      summary: Create document category
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Create document category on space <br/> Scope: space_write'
      operationId: createCategory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      requestBody:
        description: Category value to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryRequest'
            example:
              value: restaurant
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryResponse'
              example:
                value: restaurant
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}/{categoryValue}:
    delete:
      tags:
      - Documents
      summary: Delete document category
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Delete document category on space <br/> Scope: space_write'
      operationId: deleteCategory
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: categoryValue
        in: path
        description: Category value
        required: true
        schema:
          type: string
          example: fuel
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}/{categoryValue}:updateStatus:
    put:
      tags:
      - Documents
      summary: Set document category as active or inactive
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Set document category as active or inactive <br/> Scope: space_write'
      operationId: updateCategoryStatus
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      - name: categoryValue
        in: path
        description: Category value
        required: true
        schema:
          type: string
          example: fuel
      requestBody:
        description: Category status to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceCategoryStatusRequest'
            example:
              active: true
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryStatusResponse'
              example:
                active: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
  /transaction/v2/spaces/{spaceId}/categories/{categoryName}:updateValue:
    post:
      tags:
      - Documents
      summary: Update document category value.
      description: '<div class=''my-preview''><span>Preview: The API is in development
        or testing phases and the interface could still change slightly.</span></div>
        <br/> Update document category value. <br/> Scope: space_write'
      operationId: updateCategoryValue
      parameters:
      - name: spaceId
        in: path
        description: The space identifier
        required: true
        schema:
          type: string
          format: uuid
      - name: categoryName
        in: path
        description: Category name
        required: true
        schema:
          type: string
          enum:
          - purchases
          - labels
      requestBody:
        description: Update category value request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCategoryValueRequest'
            example:
              oldValue: restaurant
              newValue: fuel
        required: true
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryValueResponse'
              example:
                value: fuel
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 400
                error: BAD_REQUEST
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Bad Request
                detail: Bad Request message details.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 404
                error: NOT_FOUND
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50+00:00
                type: about:blank
                title: Not Found
                detail: The HTTP method was not allowed on this endpoint.
        default:
          description: Other error messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
      security:
      - oauth2:
        - space_write
components:
  schemas:
    JsonBMap:
      type: object
      additionalProperties: true
    JsonBMapNullable:
      type: object
      additionalProperties: true
      nullable: true
    PatchRequest:
      type: array
      items:
        $ref: '#/components/schemas/PatchDocument'
    PatchDocument:
      required:
      - op
      - path
      type: object
      properties:
        op:
          type: string
          description: The operation to be performed
          enum:
          - add
          - remove
          - replace
          - move
          - copy
          - test
        path:
          type: string
          description: A JSON-Pointer
        value:
          type: object
          description: The value to be used within the operations.
        from:
          type: string
          description: A string containing a JSON Pointer value.
      description: A JSONPatch document as defined by RFC 6902
    SpaceLockedSettingResult:
      type: object
      properties:
        id:
          type: string
          description: locked setting id
          example: e7fca31b-0961-4cb1-9a6a-c17ca42df19e
        spaceId:
          type: string
          description: space id of locked setting
          example: 367b32b8-3c9f-49a2-b7e7-2224b1247fe7
        settingKey:
          type: string
          description: locked setting key
          example: referenceNumber
        settingValue:
          type: string
          description: locked setting value
          example: '1'
    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
    SpaceLockedSettingRequest:
      required:
      - value
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
    SpaceLockedSettingValue:
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    DeleteSpaceLockedSettingLockRequest:
      required:
      - lockId
      type: object
      properties:
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    UpdateSpaceLockedSettingRequest:
      required:
      - lockId
      - value
      type: object
      properties:
        value:
          type: string
          description: locked setting value
          example: '1'
        lockId:
          type: string
          description: lock id
          format: uuid
          example: 59f5a4b8-6fa7-480a-8cee-1ca891b9b957
    AssetResult:
      type: object
      properties:
        id:
          type: string
          description: file identifier
          example: 00000003-0000-0000-0000-000000000000
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type
          example: user
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14 19:58:47+00:00
        status:
          $ref: '#/components/schemas/AssetStatus'
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        fileType:
          type: string
          description: file type
          example: xml
        contentType:
          type: string
          description: content type
          example: application/xml
        contentUrl:
          type: string
          description: content URL
          example: https://storage.googleapis.com/this-bucket/this-object
        uploadUrl:
          type: string
          description: upload URL
          example: https://storage.googleapis.com/this-bucket/this-object?X-Goog-Algorithm=
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/Category'
        createdAt:
          type: string
          description: creation datetime
          format: date-time
        updatedAt:
          type: string
          description: updated datetime
          format: date-time
    AssetStatus:
      type: string
      description: Status of asset
      example: AWAITING_UPLOAD
      enum:
      - AWAITING_UPLOAD
      - VIRUS_SCANNING
      - VIRUS_SCANNED
      - VIRUS_ERROR
      - PROCESSING
      - PROCESSED
      - ERROR
    Category:
      type: string
      description: Category of asset
      example: BRAND
      enum:
      - BRAND
      - QUOTE
      - INVOICE
    AssetRequest:
      required:
      - category
      - contentType
      - fileType
      - filename
      type: object
      properties:
        filename:
          type: string
          description: file name
          example: legal_xml.xml
        retentionTime:
          type: string
          description: retention time
          format: date-time
          example: 2129-01-14 19:58:47+00:00
        fileSize:
          type: integer
          description: file size
          format: int32
          example: 1024
        contentType:
          type: string
          description: content type
          example: application/xml
        source:
          type: string
          description: source
          example: com.unifiedpost.btx.connectors:peppol
        fileType:
          type: string
          description: file type
          example: xml
        description:
          type: string
          description: description
          example: The file for document DOC-1
        creatorSubject:
          type: string
          description: creator subject. It is required if creator type is provided
          example: 00000001-0001-0001-0001-000000000000
        creatorType:
          type: string
          description: creator type. It is required if creator subject is provided
          example: user
        tags:
          type: array
          description: tags
          example:
          - tag1
          - tag2
          items:
            type: string
            description: tags
            example: '["tag1","tag2"]'
        metadata:
          $ref: '#/components/schemas/JsonBMap'
        category:
          $ref: '#/components/schemas/Category'
    AllAssetResult:
      type: object
      properties:
        assets:
          type: array
          description: List of response entities
          items:
            $ref: '#/components/schemas/AssetResult'
        totalElements:
          type: integer
          description: Total number of items in the database that correspond to this
            search criteria
          format: int64
        currentPage:
          type: integer
          description: Current page
          format: int32
        pageSize:
          type: integer
          description: Response page size
          format: int32
    CategoryResponse:
      type: object
      properties:
        value:
          type: string
          description: Category value
          example: '1'
    CategoryRequest:
      required:
      - value
      type: object
      properties:
        value:
          type: string
          description: Category value
          example: restaurant
    ListCategoriesResponse:
      type: object
      properties:
        values:
          type: array
          description: List of category values
          items:
            type: string
    CategoryStatusResponse:
      required:
      - active
      type: object
      properties:
        active:
          type: boolean
          description: Whether category value is active or inactive
          example: true
    ReplaceCategoryStatusRequest:
      required:
      - active
      type: object
      properties:
        active:
          type: boolean
          description: Whether category should be set as active or inactive
          example: true
    CategoryValueResponse:
      type: object
      properties:
        value:
          type: string
          description: Value of category
    UpdateCategoryValueRequest:
      type: object
      properties:
        oldValue:
          type: string
          description: Old value of category
        newValue:
          type: string
          description: New value of category
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.cve.btx.eu.banqup.com/oauth2/auth
          tokenUrl: https://api.cve.btx.eu.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
tags:
- name: Spaces
  description: 'Spaces are virtual environments (work spaces) where all relevant resources
    of an entity are managed.  Spaces can also facilitate document exchange and communication
    among entities, depending on the space type.

    The role of spaces is to gather all relevant data of an entity into one accessible
    setting.  Such data can include: invoices, connections, cards, clients, payments,
    users, installed apps etc.  The capabilities offered by a space depends on the
    space type and the active subscription.'
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Files
  description: A file refers to the digital container that stores the data of one
    or more documents.  Files are the medium through which electronic documents are
    stored, transmitted, and accessed.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Documents
  description: 'A document in e-invoicing refers to a formal, structured piece of
    information that contains details  related to invoicing: e.g financial data, payment
    details, tax information etc. or any other information  relevant to the company''s
    operations, services, or interactions with clients and partners.

    Every Banqup document is associated with a unique UUID that is stored in the Banqup
    database as documentId.  The UUID is generated when a new file is received/uploaded
    into Banqup and is necessary when performing  document actions via the Banqup
    APIs.'
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Connections
  description: 'Connections are business and persons in the private address book of
    a space and they represent the actors involved  in document exchange, such as:
    customers, suppliers, accountants, partners, groups.'
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payments
  description: A payment is a generic term for the business event of transferring
    funds from one party to another.
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payment Accounts
  description: "Payment accounts are bank or financial accounts used for managing\
    \ payments, deposits, withdrawals, and transfers. \nThe Payment Accounts of a\
    \ space are all bank or financial account the business represented by the space\
    \ interacts with via e-invoicing or payments."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Payment Information
  description: "Payment Information representing some sort of evidence related to\
    \ a Payment.\nThis evidence could be in different forms :\n  - PaymentTransaction\
    \ : information related to a payment of which the transaction (initiation) \n\
    \                         was started on platform.\n  - BookedPaymentMovement\
    \ : information imported from your own account indicating a payment movement was\
    \ booked. \n  - PlannedPaymentMovement : information imported from your own account\
    \ indicating an amount was reserved \n                         for a future payment.\n\
    \  - ManualPaymentInformation : information about a payment that was manually\
    \ entered by a user of the platform.\n  - CounterpartyPaymentInformation : information\
    \ added to your space about a payment which was based on the \n              \
    \           PaymentInformation the counter party of the payment indicated on BTX\
    \ platform."
  x-BTX:
    unDocumented: 'false'
    internal: 'false'
- name: Internal Payments
  description: "This is a set of internal API call only intended to be used by BTX\
    \ Payment Service or Aggregation Service. They are restricted to ensure that updates\
    \ on payments, payment information and links to documents (BalanceOffset)  are\
    \ done in consistent way.  \nThe higher level public APIs for adding payment,\
    \ payment information and linking payments to documents  will be provided by the\
    \ BTX Payment Service or Aggregation Service."
  x-BTX:
    unDocumented: 'false'
    internal: 'true'
- name: Internal
  description: This is a set of pure internal API.  It contains for example callback
    endpoints that get registered to receive messages.
  x-BTX:
    unDocumented: 'true'
    internal: 'true'
