Invendor GlobalSettings API

The GlobalSettings API from Invendor — 6 operation(s) for globalsettings.

OpenAPI Specification

invendor-globalsettings-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: IO.Common Accounts GlobalSettings API
  version: '1.0'
security:
- OAuth2: []
tags:
- name: GlobalSettings
paths:
  /v1/GlobalSettings/types:
    get:
      tags:
      - GlobalSettings
      summary: Get all global settings types
      operationId: Get global settings types list
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetGlobalSettingsTypeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
  /v1/GlobalSettings:
    get:
      tags:
      - GlobalSettings
      summary: Get all existing global settings
      operationId: Get global settings list
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalSettingsResponsePagedResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
    post:
      tags:
      - GlobalSettings
      summary: Create a new global setting
      operationId: Create global setting
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      requestBody:
        description: ''
        content:
          application/json-patch+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/CreateGlobalSettingRequest'
          application/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/CreateGlobalSettingRequest'
          text/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/CreateGlobalSettingRequest'
          application/*+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/CreateGlobalSettingRequest'
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
  /v1/GlobalSettings/{id}:
    get:
      tags:
      - GlobalSettings
      summary: Get a global setting by id
      operationId: Get a global setting by it's id
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetGlobalSettingResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
    put:
      tags:
      - GlobalSettings
      summary: Change the value of a global setting
      operationId: Change global setting
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      requestBody:
        description: ''
        content:
          application/json-patch+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateGlobalSettingRequest'
          application/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateGlobalSettingRequest'
          text/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateGlobalSettingRequest'
          application/*+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateGlobalSettingRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalSettingsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
    delete:
      tags:
      - GlobalSettings
      summary: Delete a global setting by it's id
      operationId: Delete global setting
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalSettingsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
  /v1/GlobalSettings/bulk:
    put:
      tags:
      - GlobalSettings
      summary: Update multiple global settings with new values and types
      operationId: Bulk update global settings
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      requestBody:
        description: ''
        content:
          application/json-patch+json; x-api-version=1.0:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkUpdateGlobalSettingRequest'
          application/json; x-api-version=1.0:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkUpdateGlobalSettingRequest'
          text/json; x-api-version=1.0:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkUpdateGlobalSettingRequest'
          application/*+json; x-api-version=1.0:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkUpdateGlobalSettingRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalSettingsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
  /v1/GlobalSettings/logo:
    get:
      tags:
      - GlobalSettings
      summary: Get tenant logo URL
      operationId: Get tenant logo
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
    post:
      tags:
      - GlobalSettings
      summary: Upload Tenant logo
      operationId: Upload tenant logo
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                LogoImage:
                  type: string
                  format: binary
            encoding:
              LogoImage:
                style: form
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalSettingsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
  /v1/GlobalSettings/logo/url:
    post:
      tags:
      - GlobalSettings
      summary: Update tenant logo URL
      operationId: Update tenant logo URL
      parameters:
      - name: Account
        in: query
        description: Account
        schema:
          title: Account
          type: int
      requestBody:
        description: ''
        content:
          application/json-patch+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateLogoUrlRequest'
          application/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateLogoUrlRequest'
          text/json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateLogoUrlRequest'
          application/*+json; x-api-version=1.0:
            schema:
              $ref: '#/components/schemas/UpdateLogoUrlRequest'
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - OAuth2:
        - io.common
components:
  schemas:
    GlobalSettingsResponse:
      type: object
      properties:
        id:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        isReserved:
          type: boolean
        type:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
    GetGlobalSettingsTypeResponse:
      type: object
      properties:
        name:
          type: string
          nullable: true
        value:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
    CreateGlobalSettingRequest:
      type: object
      properties:
        id:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
    GetGlobalSettingResponse:
      type: object
      properties:
        id:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        isReserved:
          type: boolean
        type:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
    GlobalSettingsResponsePagedResult:
      type: object
      properties:
        pageSize:
          type: integer
          format: int32
          readOnly: true
        page:
          type: integer
          format: int32
          readOnly: true
        totalCount:
          type: integer
          format: int32
          readOnly: true
        filteredCount:
          type: integer
          format: int32
          readOnly: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/GlobalSettingsResponse'
          nullable: true
          readOnly: true
      additionalProperties: false
    BulkUpdateGlobalSettingRequest:
      type: object
      properties:
        id:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
    GlobalSettingType:
      enum:
      - 0
      - 1
      - 100
      - 101
      - 102
      - 103
      - 200
      - 201
      - 203
      - 500
      - 1000
      - 2000
      - 3000
      type: integer
      format: int32
    Error:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          nullable: true
      additionalProperties: false
    UpdateLogoUrlRequest:
      type: object
      properties:
        imageUrl:
          type: string
          nullable: true
      additionalProperties: false
    UpdateGlobalSettingRequest:
      type: object
      properties:
        value:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/GlobalSettingType'
      additionalProperties: false
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://identity.scanbro.com/connect/authorize
          tokenUrl: https://identity.scanbro.com/connect/token
          scopes:
            io.common: default scope