openapi: 3.0.0
info:
  title: 'YetiForce API for Webservice App. Type: Portal'
  description: "Skip the `/webservice` fragment for connections via ApiProxy. There are two ways to connect to API, with or without rewrite, below are examples of both:\n * rewrite\n * - __CRM_URL__/webservice/Portal/Users/Login\n * - __CRM_URL__/webservice/Portal/Accounts/RecordRelatedList/117/Contacts\n * without rewrite\n * - __CRM_URL__/webservice.php?_container=Portal&module=Users&action=Login\n * - __CRM_URL__/webservice.php?_container=Portal&module=Accounts&action=RecordRelatedList&record=117&param=Contacts"
  termsOfService: 'https://yetiforce.com/'
  contact:
    name: 'Devs API Team'
    url: 'https://yetiforce.com/'
    email: devs@yetiforce.com
  license:
    name: 'YetiForce Public License v3'
    url: 'https://yetiforce.com/en/yetiforce/license'
  version: '0.2'
servers:
  -
    url: 'https://gitdeveloper.yetiforce.com'
    description: 'Demo server of the development version'
  -
    url: 'https://gitstable.yetiforce.com'
    description: 'Demo server of the latest stable version'
paths:
  /webservice/Portal/Files:
    put:
      tags:
        - BaseAction
      summary: 'Download files'
      description: 'Download files from the system'
      operationId: 5fe24864f339d3042b9b06edb83235bc
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Action parameters to download the file'
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BaseAction_Files_Request'
          application/json:
            schema:
              $ref: '#/components/schemas/BaseAction_Files_Request'
          application/xml:
            schema:
              $ref: '#/components/schemas/BaseAction_Files_Request'
      responses:
        '200':
          description: 'File content, mediaType is dynamic depending on the type of file being downloaded'
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '403':
          description: 'No permissions'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'File not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '406':
          description: 'Not Acceptable'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Install:
    put:
      tags:
        - BaseAction
      summary: 'Install the system'
      description: 'Test method for the customer portal'
      operationId: 02a0b167fa2ba08237b79041d6c2eb40
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Base action install request body'
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseAction_Install_RequestBody'
          application/xml:
            schema:
              $ref: '#/components/schemas/BaseAction_Install_RequestBody'
      responses:
        '200':
          description: 'Base action details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Install_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Install_ResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
  /webservice/Portal/Menu:
    get:
      tags:
        - BaseAction
      summary: 'Get menu'
      description: 'Get menu for the customer portal'
      operationId: 921fff2e889d45059b970a17ef050803
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Menu details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Menu_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Menu_ResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Modules:
    get:
      tags:
        - BaseAction
      summary: 'The allowed actions of the module list'
      description: 'Get the permitted module list action, along with their translated action'
      operationId: 088ae9be7d3a0572905b3f9159b4c0ae
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'List of permitted modules'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Modules_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Modules_ResponseBody'
        '401':
          description: '`No sent token` OR `Invalid token`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: 'No permissions for module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/CustomView':
    get:
      tags:
        - BaseModule
      summary: 'List of custom view'
      description: 'Gets a list of custom view'
      operationId: 675e6cb697c50c751392300555e3d7ff
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
      responses:
        '200':
          description: 'List of custom view'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_CustomView_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_CustomView_Response'
        '401':
          description: '`No sent token`, `Invalid token`, `Token has expired`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: '`No permissions for module`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: '`Invalid method`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/CustomView/{cvId}':
    get:
      tags:
        - BaseModule
      summary: 'Data of custom view'
      description: 'Gets data of custom view'
      operationId: eeac9decfc9caf8b128cebeb3365a22e
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: cvId
          in: path
          description: 'Custom view ID'
          required: true
          schema:
            type: integer
          example: 12
      responses:
        '200':
          description: 'Data of custom view'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_CustomViewById_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_CustomViewById_Response'
        '401':
          description: '`No sent token`, `Invalid token`, `Token has expired`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: '`No permissions to view record` OR `No permissions for module or data provided in the request`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: '`Invalid method`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Dashboard':
    get:
      tags:
        - BaseModule
      summary: 'Get dashboard widgets'
      description: 'Supported widget types: Mini List , Chart Filter'
      operationId: b36d55e77002783f046fbdc62eac513e
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Privileges details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Dashboard_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Dashboard_ResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Fields':
    get:
      tags:
        - BaseModule
      summary: 'Get data about fields, blocks and inventory'
      description: 'Returns information about fields, blocks and inventory based on the selected module'
      operationId: d486974b694884102dcc757b03fda4fa
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Fields, blocks and inventory details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Fields_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Fields_ResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Hierarchy':
    get:
      tags:
        - BaseModule
      summary: 'Hierarchy of records'
      description: 'Get records hierarchy'
      operationId: 93793ff66fea029f0ba79afe86c95628
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Accounts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Records hierarchy details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Hierarchy_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Hierarchy_ResponseBody'
        '405':
          description: '`No hierarchy` OR `Not available for this type of user`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Pdf/{recordId}':
    get:
      tags:
        - BaseModule
      summary: 'Generate PDF'
      description: 'Generate and download a PDF file from a template'
      operationId: 47c66c79907f1ceb90e413e4dc8e9e15
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Accounts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: templates
          in: query
          description: 'Pdf templates ids'
          required: true
          content:
            application/json:
              schema:
                description: 'Pdf templates ids'
                type: integer
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Generate PDF'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_Pdf_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_Pdf_ResponseBody'
        '403':
          description: 'No permissions to view record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'No record id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'No permissions for action ExportPdf in {moduleName} module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/PdfTemplates/{recordId}':
    get:
      tags:
        - BaseModule
      summary: 'PDF templates'
      description: 'Get PDF templates list'
      operationId: 2f8120b2614eacf47a46075e124b8725
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Accounts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Get PDF templates list'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_PdfTemplates_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_PdfTemplates_ResponseBody'
        '403':
          description: 'No permissions to view record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'No record id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'No permissions for action ExportPdf in {moduleName} module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Privileges':
    get:
      tags:
        - BaseModule
      summary: 'Get privileges for module'
      description: 'Gets the list of actions that the user has access to in the module'
      operationId: 2a0a35dc3cbb4d9c16ff707591e80726
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Privileges details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Privileges_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Privileges_ResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Record/{recordId}':
    get:
      tags:
        - BaseModule
      summary: 'Data for the record'
      description: 'Gets the details of a record'
      operationId: getRecord
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-parent-id
          in: header
          description: 'Parent record id'
          required: false
          schema:
            type: integer
          example: 5
        -
          name: x-header-fields
          in: header
          description: 'Get header fields'
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: 'Gets data for the record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_Record_Response'
        '403':
          description: '`No permissions to remove record` OR `No permissions to view record` OR `No permissions to edit record`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: '`No record id` OR `Record doesn''t exist`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
    put:
      tags:
        - BaseModule
      summary: 'Edit record'
      description: 'Retrieves data for editing a record'
      operationId: 4c8ca02854d352a582cc14305e987bcc
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Contents of the request contains an associative array with the data record.'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Record_Edit_Details'
          application/xml:
            schema:
              $ref: '#/components/schemas/Record_Edit_Details'
      responses:
        '200':
          description: 'Contents of the response contains only id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Put_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Put_Record_Response'
          links:
            GetRecordById:
              $ref: '#/components/links/GetRecordById'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
    delete:
      tags:
        - BaseModule
      summary: 'Delete record'
      description: 'Changes the state of a record, moving it to the trash'
      operationId: 209b5c0e79e5bae08b74103ae84789a8
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'List of records moved to the trash'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Delete_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Delete_Record_Response'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Record':
    post:
      tags:
        - BaseModule
      summary: 'Create record'
      description: 'Gets data to save record'
      operationId: a278a39d54e0e6d7f001062375567d9d
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Contents of the request contains an associative array with the data record.'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Record_Edit_Details'
          application/xml:
            schema:
              $ref: '#/components/schemas/Record_Edit_Details'
      responses:
        '200':
          description: 'Contents of the response contains only id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Post_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Post_Record_Response'
          links:
            GetRecordById:
              $ref: '#/components/links/GetRecordById'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/RecordHistory/{recordId}':
    get:
      tags:
        - BaseModule
      summary: 'Record history'
      description: 'Gets the history of the record'
      operationId: 368577c0b42b640566105270a459b3bb
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 100'
          required: false
          schema:
            type: integer
          example: 50
        -
          name: x-page
          in: header
          description: 'Page number, default: 1'
          required: false
          schema:
            type: integer
          example: 1
        -
          name: x-start-with
          in: header
          description: 'Show history from given ID'
          required: false
          schema:
            type: integer
          example: 5972
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Recent activities detail'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_RecordHistory_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_RecordHistory_Response'
        '403':
          description: '`No permissions to view record` OR `MadTracker is turned off`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'Record doesn''t exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/RecordRelatedList/{recordId}/{relatedModuleName}':
    get:
      tags:
        - BaseModule
      summary: 'Related list of records'
      description: 'Gets a list of related records'
      operationId: 37080bbab2c27abad48f82067cd2109e
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: relatedModuleName
          in: path
          description: 'Related module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: relationId
          in: query
          description: 'Relation id'
          required: false
          style: form
          schema:
            type: integer
        -
          name: cvId
          in: query
          description: 'Custom view id'
          required: false
          style: form
          schema:
            type: integer
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 100'
          required: false
          schema:
            type: integer
          example: 1000
        -
          name: x-row-offset
          in: header
          description: 'Offset, default: 0'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: x-fields
          in: header
          description: 'JSON array in the list of fields to be returned in response'
          required: false
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
                - field_name_1
                - field_name_2
        -
          name: x-condition
          in: header
          description: 'Conditions [Json format]'
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conditions-Mix-For-Query-Generator'
        -
          name: x-only-column
          in: header
          description: 'Return only column names'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-order-by
          in: header
          description: 'Set the sorted results by columns [Json format]'
          required: false
          content:
            application/json:
              schema:
                title: 'Sort conditions'
                description: 'Multiple or one condition for a query generator'
                type: object
                additionalProperties:
                  description: 'Sort Direction'
                  type: string
                  enum: [ASC, DESC]
              example:
                field_name_1: ASC
                field_name_2: DESC
      responses:
        '200':
          description: 'List of entries'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_RecordRelatedList_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_RecordRelatedList_ResponseBody'
        '400':
          description: 'Relationship does not exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: 'No permissions to view record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'Record doesn''t exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'No relation module name'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/RecordsList':
    get:
      tags:
        - BaseModule
      summary: 'List of records'
      description: 'Gets a list of records'
      operationId: 6de8c20a849a76e301a5093f50e114af
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 100'
          required: false
          schema:
            type: integer
          example: 50
        -
          name: x-row-offset
          in: header
          description: 'Offset, default: 0'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: x-fields
          in: header
          description: 'JSON array in the list of fields to be returned in response'
          required: false
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
                - field_name_1
                - field_name_2
        -
          name: x-condition
          in: header
          description: 'Conditions [Json format]'
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conditions-Mix-For-Query-Generator'
        -
          name: x-only-column
          in: header
          description: 'Return only column names'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-parent-id
          in: header
          description: 'Parent record id'
          required: false
          schema:
            type: integer
          example: 5
        -
          name: x-cv-id
          in: header
          description: 'Custom view ID'
          required: false
          schema:
            type: integer
          example: 5
        -
          name: x-order-by
          in: header
          description: 'Set the sorted results by columns [Json format]'
          required: false
          content:
            application/json:
              schema:
                title: 'Sort conditions'
                description: 'Multiple or one condition for a query generator'
                type: object
                additionalProperties:
                  title: 'Sort Direction'
                  type: string
                  enum: [ASC, DESC]
              example:
                field_name_1: ASC
                field_name_2: DESC
      responses:
        '200':
          description: 'List of entries'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_RecordsList_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_RecordsList_ResponseBody'
        '400':
          description: 'Incorrect json syntax: x-fields'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '401':
          description: 'No sent token, Invalid token, Token has expired'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: '`No permissions for module` OR `No permissions for custom view: x-cv-id`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/RelatedModules':
    get:
      tags:
        - BaseModule
      summary: 'Related list of modules'
      description: 'Gets a list of related modules'
      operationId: 0b8f3b38a5481b0c5456137d0394de35
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
      responses:
        '200':
          description: 'List of related modules'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_RelatedModules_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_RelatedModules_Response'
        '401':
          description: '`No sent token` OR `Invalid token`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: 'No permissions for module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Method Not Allowed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/SaveInventory':
    post:
      tags:
        - BaseModule
      summary: 'Add inventory record from cart'
      description: 'Creating inventory records for the functionality of the store'
      operationId: 99ff9c49cb47397852556445cdef9187
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Accounts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Contents of the response contains only id nd module name'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAction_SaveInventory_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseAction_SaveInventory_ResponseBody'
        '403':
          description: 'No permissions to create record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/SourceBasedData':
    put:
      tags:
        - BaseModule
      summary: 'Get the source-based data'
      description: 'Get the record data from sources'
      operationId: e630f1e4b17a1917c964639aacabfdb9
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Contents of the request contains an associative array with the data record.'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaseModule_Put_SourceBasedData_Request'
          application/xml:
            schema:
              $ref: '#/components/schemas/BaseModule_Put_SourceBasedData_Request'
      responses:
        '200':
          description: 'Source-based data response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Put_SourceBasedData_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Put_SourceBasedData_Response'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/{moduleName}/Widgets':
    get:
      tags:
        - BaseModule
      summary: 'List of widgets'
      description: 'Gets a list of widgets'
      operationId: 9c95fa7059b4fd223397215d5837711a
      parameters:
        -
          name: moduleName
          in: path
          description: 'Module name'
          required: true
          schema:
            type: string
          example: Contacts
      responses:
        '200':
          description: 'List of widgets'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_Widgets_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/BaseModule_Get_Widgets_Response'
        '401':
          description: '`No sent token`, `Invalid token`, `Token has expired`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: '`No permissions for module`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: '`Invalid method`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/Products/Record/{recordId}':
    get:
      tags:
        - Products
      summary: 'Data for the product'
      description: 'Gets the details of a product'
      operationId: ea8bce5f040495f74ededb4dfef41923
      parameters:
        -
          name: recordId
          in: path
          description: 'Record id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-parent-id
          in: header
          description: 'Parent record id'
          required: false
          schema:
            type: integer
          example: 5
        -
          name: x-unit-price
          in: header
          description: 'Get additional unit price'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-unit-gross
          in: header
          description: 'Get additional unit gross'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-product-bundles
          in: header
          description: 'Get additional product bundles'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
      responses:
        '200':
          description: 'Gets data for the record'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Products_Get_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Products_Get_Record_Response'
        '403':
          description: '`No permissions to remove record` OR `No permissions to view record` OR `No permissions to edit record`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: '`No record id` OR `Record doesn''t exist`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Products/RecordsTree:
    get:
      tags:
        - Products
      summary: 'Tree list of records'
      description: 'Get the tree list of records'
      operationId: 7f4c631d46ce2149e454313f841e517b
      parameters:
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 1000'
          required: false
          schema:
            type: integer
          example: 1000
        -
          name: x-row-offset
          in: header
          description: 'Offset, default: 0'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: x-order-by
          in: header
          description: 'Set the sorted results by columns [Json format]'
          required: false
          content:
            application/json:
              schema:
                title: 'Sort conditions'
                description: 'Multiple or one condition for a query generator'
                type: object
                additionalProperties:
                  title: 'Sort Direction'
                  type: string
                  enum: [ASC, DESC]
              example:
                field_name_1: ASC
                field_name_2: DESC
        -
          name: x-fields
          in: header
          description: 'JSON array in the list of fields to be returned in response'
          required: false
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
                - field_name_1
                - field_name_2
        -
          name: x-condition
          in: header
          description: 'Conditions [Json format]'
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conditions-Mix-For-Query-Generator'
        -
          name: x-parent-id
          in: header
          description: 'Parent record id'
          required: false
          schema:
            type: integer
          example: 5
      responses:
        '200':
          description: 'List of entries'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Products_RecordsList_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/Products_RecordsList_ResponseBody'
        '400':
          description: 'Incorrect json syntax: x-fields'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '401':
          description: 'No sent token, Invalid token, Token has expired'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: 'No permissions for module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Users/AccessActivityHistory:
    get:
      tags:
        - Users
      summary: 'History of access activity data'
      description: 'Get user history of access activity'
      operationId: c18a68769226388bb8eebd16dfbe44ef
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 50'
          required: false
          schema:
            type: integer
          example: 1000
        -
          name: x-row-offset
          in: header
          description: 'Offset, default: 0'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: x-condition
          in: header
          description: 'Conditions [Json format]'
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conditions-For-Native-Query'
      responses:
        '200':
          description: 'User history of access activity'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Get_AccessActivityHistory_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Get_AccessActivityHistory_Response'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Users/ChangePassword:
    put:
      tags:
        - Users
      summary: 'User password change'
      description: 'User password change'
      operationId: ef6db263c03aba0337614c9728017913
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Input data'
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Users_Put_ChangePassword_Request'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Users_Put_ChangePassword_Request'
          application/json:
            schema:
              $ref: '#/components/schemas/Users_Put_ChangePassword_Request'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Put_ChangePassword_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Put_ChangePassword_Response'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Users/Login:
    post:
      tags:
        - Users
      summary: 'Logs user'
      description: 'Logs user into the system'
      operationId: 89f0523cd8ff4e4f9e93230ec3d23674
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Input data format'
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Users_Login_RequestBody'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Users_Login_RequestBody'
          application/json:
            schema:
              $ref: '#/components/schemas/Users_Login_RequestBody'
      responses:
        '200':
          description: 'User details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Login_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Login_ResponseBody'
        '401':
          description: '`Invalid data access` OR `Invalid user password` OR `No crmid` OR `2FA verification error`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '412':
          description: 'No 2FA TOTP code'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
  /webservice/Portal/Users/Logout:
    put:
      tags:
        - Users
      summary: 'Logout user'
      description: 'Logout user out the system'
      operationId: e5072b920831b314b8d50a5bdb41603f
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'User details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersLogoutResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/UsersLogoutResponseBody'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  '/webservice/Portal/Users/Record/{userId}':
    get:
      tags:
        - Users
      summary: 'Data for the user'
      description: 'Gets details about the user'
      operationId: b807a74168ffc00e300e8a2449edf3f2
      parameters:
        -
          name: userId
          in: path
          description: 'User id'
          required: true
          schema:
            type: integer
          example: 116
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
      responses:
        '200':
          description: 'Gets data for the user'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Get_Record_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Get_Record_Response'
        '403':
          description: 'Access denied, access for administrators only'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '404':
          description: 'User doesn''t exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Users/RecordsList:
    get:
      tags:
        - Users
      summary: 'List of users'
      description: 'Gets a list of all users'
      operationId: b1ff69035aa9fb92cfd14bea9d580240
      parameters:
        -
          name: x-raw-data
          in: header
          description: 'Gets raw data'
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
          example: 1
        -
          name: x-row-limit
          in: header
          description: 'Get rows limit, default: 1000'
          required: false
          schema:
            type: integer
          example: 1000
        -
          name: x-row-offset
          in: header
          description: 'Offset, default: 0'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: x-order-by
          in: header
          description: 'Set the sorted results by columns [Json format]'
          required: false
          content:
            application/json:
              schema:
                title: 'Sort conditions'
                description: 'Multiple or one condition for a query generator'
                type: object
                additionalProperties:
                  title: 'Sort Direction'
                  type: string
                  enum: [ASC, DESC]
              example:
                field_name_1: ASC
                field_name_2: DESC
        -
          name: x-fields
          in: header
          description: 'JSON array in the list of fields to be returned in response'
          required: false
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
                - field_name_1
                - field_name_2
        -
          name: x-condition
          in: header
          description: 'Conditions [Json format]'
          required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conditions-Mix-For-Query-Generator'
        -
          name: x-parent-id
          in: header
          description: 'Parent record id'
          required: false
          schema:
            type: integer
          example: 5
      responses:
        '200':
          description: 'List of entries'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_RecordsList_ResponseBody'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_RecordsList_ResponseBody'
        '400':
          description: 'Incorrect json syntax: x-fields'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '401':
          description: 'No sent token, Invalid token, Token has expired'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '403':
          description: 'No permissions for module'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
  /webservice/Portal/Users/ResetPassword:
    put:
      tags:
        - Users
      summary: 'User password reset - Password change'
      description: 'User password reset - Password change'
      operationId: 31b89b9483445ddb16be9bce63b6d071
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Input data'
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Users_Put_ResetPassword_Request'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Users_Put_ResetPassword_Request'
          application/json:
            schema:
              $ref: '#/components/schemas/Users_Put_ResetPassword_Request'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Put_ResetPassword_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Put_ResetPassword_Response'
        '404':
          description: 'User with this email address does not exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: ERR_TOKEN_DOES_NOT_EXIST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
    post:
      tags:
        - Users
      summary: 'User password reset - Generating and sending a one-time token'
      description: 'User password reset - Generating and sending a one-time token'
      operationId: 41e97e33fb0abe55d98119d430a7743b
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      requestBody:
        description: 'Input data'
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Users_Post_ResetPassword_Request'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Users_Post_ResetPassword_Request'
          application/json:
            schema:
              $ref: '#/components/schemas/Users_Post_ResetPassword_Request'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Post_ResetPassword_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Post_ResetPassword_Response'
        '404':
          description: 'User with this email address does not exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
  /webservice/Portal/Users/TwoFactorAuth:
    get:
      tags:
        - Users
      summary: '2FA details'
      description: 'Get two factor authentication details'
      operationId: 21983d6e7a64eba3d3f252abaebbf837
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Authentication secret details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Get_TwoFactorAuth_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Get_TwoFactorAuth_Response'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '500':
          description: 'Two-factor authentication has not been enabled'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
    post:
      tags:
        - Users
      summary: 'Activate 2FA'
      description: 'Activate two factor authentication'
      operationId: 6bb0673fd954edf24bad2e179f047989
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Access details'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_post_TwoFactorAuth_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_post_TwoFactorAuth_Response'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '500':
          description: '`Two-factor authentication has not been enabled` OR `A secret 2FA key has already been generated.`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
    delete:
      tags:
        - Users
      summary: 'Disable 2FA'
      description: 'Disable two factor authentication'
      operationId: c69c385e73e85413a62743d92cca09cf
      parameters:
        -
          name: X-ENCRYPTED
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/Header-Encrypted'
      responses:
        '200':
          description: 'Disable two factor authentication response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users_Delete_TwoFactorAuth_Response'
            application/xml:
              schema:
                $ref: '#/components/schemas/Users_Delete_TwoFactorAuth_Response'
        '405':
          description: 'Invalid method'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
        '500':
          description: 'Two-factor authentication has not been enabled'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/xml:
              schema:
                $ref: '#/components/schemas/Exception'
      security:
        -
          basicAuth: []
          ApiKeyAuth: []
          token: []
components:
  schemas:
    BaseAction_Files_Request:
      title: 'Base action - Files request schema'
      description: 'Action parameters to download the file'
      required:
        - module
        - actionName
        - record
      properties:
        module:
          description: 'Module name'
          type: string
          example: Contacts
        actionName:
          description: 'Action name'
          type: string
          enum:
            - MultiImage
            - DownloadFile
          example: MultiImage
        record:
          description: 'Record ID'
          type: integer
          example: 123
        field:
          description: 'Field name. Required for MultiImage action'
          type: string
          example: imagename
        key:
          description: 'Unique key for attachment. Required for MultiImage action'
          type: string
          example: 14f01c4ea4da107c4145f0519ea1b9027fb24aa7MS2AqcUFuC
      type: object
    BaseAction_Install_RequestBody:
      title: 'Base action - Install response'
      description: 'The representation of a base action install'
      type: object
    BaseAction_Install_ResponseBody:
      title: 'Base action - Install response'
      description: 'The representation of a base action install'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Content of responses from a given method'
          type: object
      type: object
    BaseAction_Menu_ResponseBody:
      title: 'Base action - Menu'
      description: 'Base action menu response body'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Menu items selected in the system, consists of parents and children'
          properties:
            items:
              title: 'Parent parameters'
              type: object
              additionalProperties:
                description: 'Tree item'
                properties:
                  id: { type: integer, example: 171 }
                  tabid: { type: integer, example: 3 }
                  mod: { type: string, example: Accounts }
                  name: { type: string, example: Accounts }
                  type: { type: string, example: Module }
                  sequence: { type: integer, example: 1 }
                  newwindow: { type: integer, example: 0 }
                  dataurl: { type: string, example: 'index.php?module=Module&view=List&mid=172' }
                  icon: { type: string, example: dminIcon-shared-owner }
                  parent: { type: integer, example: 0 }
                  hotkey: { type: string, example: ctrl+k }
                  filters: { type: string, example: '4,130' }
                  childs: { title: 'Children parameters', type: object }
                  label: { type: string, example: 'My home page' }
                type: object
          type: object
      type: object
    BaseAction_Modules_ResponseBody:
      title: 'Base action - List of permitted modules'
      description: 'List of available modules'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'List of permitted modules'
          type: object
          additionalProperties:
            description: 'Module name'
            type: string
            example: Accounts
      type: object
    BaseModule_Get_CustomView_Response:
      title: 'Base module - Response action - data of custom view list'
      description: 'Module action - Data of custom view list - response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'List of custom view'
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BaseModule_CustomViewById_Result'
      type: object
    BaseModule_Get_CustomViewById_Response:
      title: 'Base module - Response action - data of custom view by specific ID'
      description: 'Module action - custom view for specific ID - response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          $ref: '#/components/schemas/BaseModule_CustomViewById_Result'
      type: object
    BaseModule_CustomViewById_Result:
      title: 'Data of custom view by specific ID'
      description: 'Module action - custom view for specific ID - response data'
      required:
        - cvid
        - viewname
        - entitytype
        - sequence
        - description
        - color
        - isFeatured
        - isDefault
      properties:
        cvid:
          description: 'Custom view ID'
          type: integer
          example: 12
        viewname:
          description: 'Custom view name'
          type: string
          example: 'Test 1'
        entitytype:
          description: 'Module name'
          type: string
          example: Accounts
        sequence:
          description: Sequence
          type: integer
          example: 1
        description:
          description: 'Custom view description'
          type: string
          example: Description
        color:
          description: 'Color for custom view'
          type: string
          example: '#c28306'
        isFeatured:
          description: 'Custom view is in favorites'
          type: boolean
          example: false
        isDefault:
          description: 'Custom view is default'
          type: boolean
          example: false
      type: object
    BaseAction_Dashboard_ResponseBody:
      title: 'Base module - Dashboard response schema'
      description: 'Get widgets.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Tabs and widgets data'
          properties:
            types:
              title: 'Tabs list'
              type: object
              additionalProperties:
                description: 'Tab menu item'
                properties:
                  name: { type: string, example: Dashboard }
                  id: { type: integer, example: 1 }
                  system: { type: integer, example: 1 }
                type: object
            widgets:
              title: 'Tabs list'
              type: object
              additionalProperties:
                description: 'Tree item'
                properties:
                  type: { type: string, example: ChartFilter }
                  data: { title: 'Widget data', type: object }
                type: object
          type: object
      type: object
    BaseModule_Fields_ResponseBody:
      title: 'Base module - Response action fields'
      description: 'Fields, blocks and inventory details'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Fields parameters'
          required:
            - fields
            - blocks
          properties:
            fields:
              title: 'List of all available fields in the module'
              required:
                - name
                - label
                - type
                - mandatory
                - defaultvalue
                - presence
                - quickcreate
                - masseditable
                - header_field
                - maxlengthtext
                - maximumlength
                - maxwidthcolumn
                - tabindex
                - fieldtype
                - id
                - uitype
                - isEditable
                - isViewable
                - isReadOnly
                - isEditableReadOnly
                - sequence
                - fieldparams
                - blockId
                - helpInfo
                - dbStructure
                - queryOperators
              type: object
              additionalProperties:
                properties:
                  name: { description: 'Field name', type: string, example: subject }
                  label: { description: 'Field label translated into the user''s language', type: string, example: Subject }
                  type: { description: 'Field type', type: string, example: string }
                  mandatory: { description: 'Check if field is mandatory', type: boolean, example: true }
                  defaultvalue: { description: 'Default field value', type: string, example: '' }
                  presence: { description: 'Check if field is active', type: boolean, example: true }
                  quickcreate: { description: 'Check if field is active', type: boolean, example: true }
                  masseditable: { description: 'Check if field is quick create enabled', type: boolean, example: true }
                  header_field: { title: 'Field configuration available in the header', properties: { type: { description: Type, type: string, example: value }, class: { description: 'Gui class', type: string, example: badge-info } }, type: object }
                  maxlengthtext: { description: 'Max length text', type: integer, example: 0 }
                  maximumlength: { description: 'Maximum field range', type: string, example: '-2147483648,2147483647' }
                  maxwidthcolumn: { description: 'Max width column', type: integer, example: 0 }
                  tabindex: { description: 'Field tab index', type: integer, example: 0 }
                  fieldtype: { description: 'Field short data type', type: string, example: V }
                  picklistvalues: { title: 'Picklist values, available only for type of field: picklist, multipicklist, multiowner, multiReferenceValue, inventoryLimit, languages, currencyList, fileLocationType, taxes, multiListFields, mailScannerFields, country, modules, sharedOwner, categoryMultipicklist, tree', type: object }
                  date-format: { title: 'Date format, available only for type of field: date, datetime', type: string }
                  time-format: { title: 'Time format, available only for type of field: time', type: string }
                  currency_symbol: { title: 'Currency symbol, available only for type of field: currency', type: string }
                  decimal_separator: { title: 'Currency decimal separator, available only for type of field: currency', type: string }
                  group_separator: { title: 'Currency group separator, available only for type of field: currency', type: string }
                  restrictedDomains: { title: 'Email restricted domains, available only for type of field: email', properties: { yeti.com: { description: 'List of domains reserved by email', example: yeti.com } }, type: object }
                  limit: { title: 'Limit the amount of images, available only for type of field: multiImage, image', type: integer }
                  formats: { title: 'File Format, available only for type of field: multiImage, image', properties: { jpg: { description: 'List of file data formats', example: jpg } }, type: object }
                  id: { description: 'Field ID', type: integer, example: 24862 }
                  uitype: { description: 'Field UiType', type: integer, example: 1 }
                  isEditable: { description: 'Check if record is editable', type: boolean, example: true }
                  isViewable: { description: 'Check if record is viewable', type: boolean, example: true }
                  isReadOnly: { description: 'Check if record is read only (based on profiles)', type: boolean, example: false }
                  isEditableReadOnly: { description: 'Check if record is editable or read only (based on the field type)', type: boolean, example: false }
                  sequence: { description: 'Sequence field', type: integer, example: 24862 }
                  fieldparams: { description: 'Field params', type: object }
                  blockId: { description: 'Field block id', type: integer, example: 280 }
                  helpInfo: { description: 'Additional field description', type: string, example: 'Edit,Detail' }
                  dbStructure: { description: 'Info about field structure in database', type: object }
                  queryOperators: { description: 'Field query operators', type: object }
                  isEmptyPicklistOptionAllowed: { description: 'Defines empty picklist element availability', type: boolean, example: false }
                  referenceList: { title: 'List of related modules, available only for reference field', type: object, additionalProperties: { description: 'Tree item', type: string, example: Accounts } }
                  treeValues: { title: 'Tree items, available only for tree field', type: object, additionalProperties: { title: 'Tree item', properties: { id: { description: 'Number tree without prefix', type: integer, example: 1 }, tree: { description: 'Tree id', type: string, example: T10 }, parent: { description: 'Parent tree id', type: string, example: T1 }, text: { description: 'Tree value', type: string, example: 'Tree value' } }, type: object } }
                type: object
            blocks:
              title: 'List of all available blocks in the module'
              type: object
              additionalProperties:
                title: 'Block details'
                required:
                  - id
                  - tabid
                  - label
                  - sequence
                  - showtitle
                  - visible
                  - increateview
                  - ineditview
                  - indetailview
                  - display_status
                  - iscustom
                  - icon
                  - name
                properties:
                  id: { description: 'Block id', type: integer, example: 195 }
                  tabid: { description: 'Module id', type: integer, example: 9 }
                  label: { description: 'Block label', type: string, example: 'Account details' }
                  sequence: { description: 'Block sequence', type: integer, example: 1 }
                  showtitle: { description: 'Specifies whether the title should be visible', type: integer, example: 0 }
                  visible: { description: 'Determines the visibility', type: integer, example: 0 }
                  increateview: { description: 'Determines the visibility in creat view', type: integer, example: 0 }
                  ineditview: { description: 'Determines the visibility in edit view', type: integer, example: 0 }
                  indetailview: { description: 'Determines the visibility in detail view', type: integer, example: 0 }
                  display_status: { description: 'Determines whether the block should be expanded', type: integer, example: 2 }
                  iscustom: { description: 'Determines if the block has been added by the user', type: integer, example: 0 }
                  icon: { description: 'Block icon class', type: string, example: 'far fa-calendar-alt' }
                  name: { description: 'Block name translated into the user''s language', type: string, example: 'Informacje podstawowe o firmie' }
                type: object
            inventory:
              title: 'Inventory field group, available depending on the type of module'
              properties:
                '1':
                  title: 'Inventory field list'
                  type: object
                  additionalProperties: { title: 'Inventory field details', required: [label, type, columnname, isSummary, isVisibleInDetail], properties: { label: { description: 'Field label translated into the user''s language', type: string, example: 'Unit price' }, type: { description: 'Field type', type: string, example: UnitPrice }, columnname: { description: 'Field column name in db', type: string, example: price }, isSummary: { description: 'Is the field contains summary', type: boolean, example: false }, isVisibleInDetail: { description: 'Check if field is visible in detail view', type: boolean, example: true } }, type: object }
              type: object
          type: object
      type: object
    BaseAction_Hierarchy_ResponseBody:
      title: 'Base module - Hierarchy response schema'
      description: 'Get records hierarchy.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: Records
          type: object
          additionalProperties:
            description: 'Record details'
            properties:
              id:
                type: integer
                example: 117
              parent:
                type: integer
                example: 0
              name:
                type: string
                example: 'YetiForce Sp. z o.o.'
            type: object
      type: object
    BaseAction_Pdf_ResponseBody:
      title: 'Base module - Generate PDF response schema'
      description: 'Get method - Generate PDF.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: Pdf
          type: object
          additionalProperties:
            title: 'Pdf detail'
            properties:
              name:
                type: string
                example: order.pdf
              data:
                type: string
                format: binary
            type: object
      type: object
    BaseAction_PdfTemplates_ResponseBody:
      title: 'Base module - Get PDF templates list response schema'
      description: 'Get method - Get PDF templates list.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Pdf templates'
          type: object
          additionalProperties:
            title: 'Pdf template detail'
            properties:
              id:
                title: 'Record Id'
                type: integer
                example: 38
              name:
                type: string
                example: order
              second_name:
                type: string
                example: order
              default:
                type: integer
                example: 1
            type: object
      type: object
    BaseModule_Privileges_ResponseBody:
      title: 'Base module - Privileges response schema'
      description: 'Get privileges for module.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'List of module privileges'
          type: object
          example:
            Import: true
            Export: true
          additionalProperties:
            title: Action
            type: boolean
      type: object
    BaseModule_Get_Record_Response:
      title: 'Base module - Response body for Record'
      description: 'Get record detail.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Record data'
          required:
            - name
            - id
            - fields
            - data
          properties:
            name:
              description: 'Record name'
              type: string
              example: 'Driving school'
            id:
              description: 'Record Id'
              type: integer
              example: 152
            fields:
              title: 'System field names and field labels'
              type: object
              example:
                field_name_1: 'Field label 1'
                field_name_2: 'Field label 2'
                assigned_user_id: 'Assigned user'
                createdtime: 'Created time'
              additionalProperties:
                description: 'Field label'
                type: string
            data:
              $ref: '#/components/schemas/Record_Display_Details'
            privileges:
              title: 'Parameters determining checking of editing rights and moving to the trash'
              required:
                - isEditable
                - moveToTrash
              properties:
                isEditable:
                  description: 'Check if record is editable'
                  type: boolean
                  example: true
                moveToTrash:
                  description: 'Permission to delete'
                  type: boolean
                  example: false
              type: object
            inventory:
              description: 'Value inventory data'
              type: object
            summaryInventory:
              description: 'Value summary inventory data'
              type: object
            rawData:
              $ref: '#/components/schemas/Record_Raw_Details'
            rawInventory:
              description: 'Inventory data'
              type: object
            headerFields:
              title: 'Get header fields details.'
              properties:
                progress:
                  title: 'Progress header fields'
                  type: object
                  additionalProperties: { title: 'Header field details', required: [type, label, values], properties: { type: { description: 'Header field type', type: string, example: value }, label: { description: 'Translated field label', type: string, example: 'Assigned To' }, class: { description: 'Class name', type: string, example: badge-info }, values: { title: 'Class name', type: object, additionalProperties: { title: 'Header field details', required: [label, isActive, isLocked, isEditable], properties: { label: { description: 'Value to display', type: string, example: 'Awaiting verification' }, isActive: { description: 'Is active', type: boolean, example: false }, isLocked: { description: 'Is locked', type: boolean, example: false }, isEditable: { description: 'Is editable', type: boolean, example: false }, description: { description: Description, type: string, example: '' }, color: { description: Color, type: string, example: ffa800 } }, type: object } } }, type: object }
                value:
                  title: 'Value header fields'
                  type: object
                  additionalProperties: { title: 'Header field details', required: [type, label, value], properties: { type: { description: 'Header field type', type: string, example: value }, label: { description: 'Translated field label', type: string, example: 'Assigned To' }, class: { description: 'Class name', type: string, example: badge-info }, value: { description: 'Data in API format', oneOf: [{ type: object }, { type: string }, { type: number }, { type: integer }] } }, type: object }
                highlights:
                  title: 'Highlights header fields'
                  type: object
                  additionalProperties: { title: 'Header field details', required: [type, label, value], properties: { type: { description: 'Header field type', type: string, example: value }, label: { description: 'Translated field label', type: string, example: 'Assigned To' }, class: { description: 'Class name', type: string, example: badge-info }, value: { description: 'Data in API format', oneOf: [{ type: object }, { type: string }, { type: number }, { type: integer }] } }, type: object }
              type: object
          type: object
      type: object
    BaseModule_Delete_Record_Response:
      title: 'Base module - Transfer to the trash'
      description: 'List of records moved to the trash'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Status of successful transfer of the record to the recycle bin'
          type: boolean
      type: object
    BaseModule_Put_Record_Response:
      title: 'Base module - Response body for Record'
      description: 'Contents of the response contains only id'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Record data'
          description: 'Created record id and name.'
          required:
            - id
            - name
          properties:
            id:
              description: 'Id of the newly created record'
              type: integer
              example: 22
            name:
              description: 'Id of the newly created record'
              type: string
              example: 'YetiForce Name'
            skippedData:
              description: 'List of parameters passed in the request that were skipped in the write process'
              type: object
          type: object
      type: object
    Record_Edit_Details:
      title: 'General - Record edit details'
      description: 'Record data in user format for edit view'
      type: object
      example:
        field_name_1: Tom
        field_name_2: Kowalski
        assigned_user_id: 1
        createdtime: '2014-09-24 20:51:12'
    Record_Raw_Details:
      title: 'General - Record raw details'
      description: 'Record data in the system format as stored in a database'
      type: object
      example:
        id: 11
        field_name_1: Tom
        field_name_2: Kowalski
        assigned_user_id: 1
        createdtime: '2014-09-24 20:51:12'
    Record_Display_Details:
      title: 'General - Record display details'
      description: 'Record data in user format for preview'
      type: object
      example:
        id: 11
        field_name_1: Tom
        field_name_2: Kowalski
        assigned_user_id: 'YetiForce Administrator'
        createdtime: '2014-09-24 20:51'
    BaseModule_Post_Record_Response:
      title: 'Base module - Created records'
      description: 'Contents of the response contains only id'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Record data'
          description: 'Created record id and name.'
          required:
            - id
            - name
          properties:
            id:
              description: 'Id of the newly created record'
              type: integer
              example: 22
            name:
              description: 'Id of the newly created record'
              type: string
              example: 'YetiForce Name'
            skippedData:
              description: 'List of parameters passed in the request that were skipped in the write process'
              type: object
          type: object
      type: object
    BaseModule_Get_RecordHistory_Response:
      title: 'Base module - Response action history record'
      description: 'Action module for recent activities in CRM'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Returns recent activities that took place in CRM'
          required:
            - records
            - isMorePages
          properties:
            records:
              title: 'Entires of recent record activities'
              type: object
              additionalProperties:
                title: 'Key indicating the number of changes made to a given record'
                required:
                  - time
                  - owner
                  - status
                properties:
                  time: { description: 'Showing the exact date on which the change took place', type: string, example: '2019-10-07 08:32:38' }
                  owner: { description: 'Username of the user who made the change', type: string, example: 'System Admin' }
                  status: { description: 'Name of the action that was carried out', type: string, example: changed }
                  rawTime: { description: 'Showing the exact date on which the change took place', type: string, example: '2019-10-07 08:32:38' }
                  rawOwner: { description: 'User ID of the user who made the change', type: integer, example: 1 }
                  rawStatus: { description: 'The name of the untranslated label', type: string, example: LBL_UPDATED }
                  data: { title: 'Additional information', oneOf: [{ title: 'Record data create', type: object, additionalProperties: { required: [label, value, raw], properties: { label: { description: 'Translated field label', type: string, example: Name }, value: { description: 'Value, the data type depends on the field type', type: string, example: 'Jan Kowalski' }, raw: { description: 'Value in database format, only available in `x-raw-data`', type: string, example: 'Jan Kowalski' } }, type: object } }, { title: 'Record data change', description: 'Edit, conversation', type: object, additionalProperties: { required: [label, from, to], properties: { label: { description: 'Translated field label', type: string, example: Name }, from: { description: 'Value before change, the data type depends on the field type', type: string, example: 'Jan Kowalski' }, to: { description: 'Value after change, the data type depends on the field type', type: string, example: 'Jan Nowak' }, rawFrom: { description: 'Value before change, value in database format, only available in `x-raw-data`', type: string, example: 'Jan Kowalski' }, rawTo: { description: 'Value after change, value in database format, only available in `x-raw-data`', type: string, example: 'Jan Nowak' } }, type: object } }, { title: 'Operations on related records', description: 'Adding relations, removing relations, transferring records', required: [targetModule, targetModuleLabel, targetLabel], properties: { targetModule: { description: 'The name of the target related module', type: string, example: Contacts }, targetModuleLabel: { description: 'Translated module name', type: string, example: Kontakt }, targetLabel: { description: 'The label name of the target related module', type: string, example: 'Jan Kowalski' }, targetId: { description: 'Id of the target related module', type: integer, example: 394 } }, type: object }] }
                type: object
            isMorePages:
              type: boolean
              example: true
          type: object
      type: object
    BaseModule_RecordRelatedList_ResponseBody:
      title: 'Base module - Response action related record list'
      description: 'Module action related record list response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'List of related records'
          required:
            - headers
            - records
            - permissions
            - numberOfRecords
            - isMorePages
          properties:
            headers:
              title: 'Fields names'
              type: object
              example:
                field_name_1: 'Field label 1'
                field_name_2: 'Field label 2'
                assigned_user_id: 'Assigned user'
                createdtime: 'Created time'
              additionalProperties:
                description: 'Field name'
                type: string
            records:
              title: 'Records display details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Display_Details'
            permissions:
              title: 'Records action permissions'
              type: object
              additionalProperties:
                title: 'Record action permissions'
                required:
                  - isEditable
                  - moveToTrash
                properties:
                  isEditable: { description: 'Check if record is editable', type: boolean, example: true }
                  moveToTrash: { description: 'Permission to delete', type: boolean, example: true }
                type: object
            rawData:
              title: 'Records raw details, dependent on the header `x-raw-data`'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Raw_Details'
            numberOfRecords:
              description: 'Number of records on the page'
              type: integer
              example: 20
            isMorePages:
              description: 'There are more pages'
              type: boolean
              example: true
            numberOfAllRecords:
              description: 'Number of all records, dependent on the header `x-row-count`'
              type: integer
              example: 54
          type: object
      type: object
    BaseModule_RecordsList_ResponseBody:
      title: 'Base module - Response action record list'
      description: 'Module action record list response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'List of records'
          required:
            - headers
            - records
            - permissions
            - numberOfRecords
            - isMorePages
          properties:
            headers:
              title: 'Fields names'
              type: object
              example:
                field_name_1: 'Field label 1'
                field_name_2: 'Field label 2'
                assigned_user_id: 'Assigned user'
                createdtime: 'Created time'
              additionalProperties:
                description: 'Field name'
                type: string
            records:
              title: 'Records display details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Display_Details'
            permissions:
              title: 'Records action permissions'
              type: object
              additionalProperties:
                title: 'Record action permissions'
                required:
                  - isEditable
                  - moveToTrash
                properties:
                  isEditable: { type: boolean, example: true }
                  moveToTrash: { type: boolean, example: true }
                type: object
            rawData:
              title: 'Records raw details, dependent on the header `x-raw-data`'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Raw_Details'
            numberOfRecords:
              description: 'Number of records on the page'
              type: integer
              example: 20
            isMorePages:
              description: 'There are more pages'
              type: boolean
              example: true
            numberOfAllRecords:
              description: 'Number of all records, dependent on the header `x-row-count`'
              type: integer
              example: 54
          type: object
      type: object
    BaseModule_Get_RelatedModules_Response:
      title: 'Base module - Response action related modules list'
      description: 'Module action related modules list response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'List of related records'
          required:
            - base
            - related
          properties:
            base:
              title: 'Base list'
              type: object
              additionalProperties:
                required:
                  - type
                  - label
                  - icon
                properties:
                  type: { description: Type, type: string, example: Summary }
                  label: { description: 'Translated label', type: string, example: Summary }
                  icon: { description: 'Icon class', type: string, example: 'fas fa-desktop' }
                type: object
            related:
              title: 'Base list'
              type: object
              additionalProperties:
                required:
                  - label
                  - relationId
                  - relatedModuleName
                  - icon
                  - actions
                  - viewType
                  - customView
                properties:
                  label: { description: 'Translated label', type: string, example: Documents }
                  relationId: { description: 'Relation ID', type: integer, example: 3 }
                  relatedModuleName: { description: 'Related module name', type: string, example: Documents }
                  icon: { description: 'Icon class', type: string, example: yfm-Documents }
                  actions: { description: Actions, type: array, items: { type: string }, example: [add, select] }
                  viewType: { description: 'View types', type: array, items: { type: string }, example: [RelatedTab, DetailBottom] }
                  customView: { description: 'Custom view', type: array, items: { type: string }, example: [relation, all] }
                type: object
          type: object
      type: object
    BaseAction_SaveInventory_ResponseBody:
      title: 'Base module - Create inventory record response schema'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Create result'
          type: object
          oneOf:
            -
              $ref: '#/components/schemas/BaseAction_SaveInventory_ResponseBodySuccess'
            -
              $ref: '#/components/schemas/BaseAction_SaveInventory_ResponseBodyError'
      type: object
    BaseAction_SaveInventory_ResponseBodySuccess:
      title: 'Base module - Create inventory record response success schema'
      properties:
        id:
          description: 'Record Id'
          type: integer
          example: 38
        moduleName:
          type: string
          example: SSingleOrders
      type: object
    BaseAction_SaveInventory_ResponseBodyError:
      title: 'Base module - Create inventory record response error schema'
      description: 'Create inventory record.'
      properties:
        errors:
          description: 'Error details'
          type: object
      type: object
    BaseModule_Put_SourceBasedData_Request:
      title: 'Base module - Source-based data request'
      type: object
      oneOf:
        -
          title: 'Create a record from a related module'
          required:
            - sourceModule
            - sourceRecord
          properties:
            sourceModule:
              description: 'Source module'
              type: string
              example: Accounts
            sourceRecord:
              description: 'Source record ID'
              type: integer
              example: 221
          type: object
        -
          title: 'Create a record from a reference field'
          required:
            - sourceRecordData
          properties:
            sourceRecordData:
              $ref: '#/components/schemas/Record_Edit_Details'
          type: object
    BaseModule_Put_SourceBasedData_Response:
      title: 'Base module - Source-based data response'
      description: 'Data to auto-complete in compose view'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Returns record data'
          required:
            - data
            - rawData
          properties:
            data:
              $ref: '#/components/schemas/Record_Display_Details'
            rawData:
              $ref: '#/components/schemas/Record_Raw_Details'
          type: object
      type: object
    BaseModule_Get_Widgets_Response:
      title: 'Base module - Response action - data of widgets'
      description: 'Module action - Data of widgets - response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'List of widgets'
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BaseModule_Widget_Result'
      type: object
    BaseModule_Widget_Result:
      title: 'Widget data by specific ID'
      description: 'Module action - Widget for specific ID - response data'
      required:
        - id
        - type
        - label
        - wcol
        - sequence
        - name
        - data
      properties:
        id:
          description: 'Widget ID'
          type: integer
          example: 12
        type:
          description: 'Widget type'
          type: string
          example: RelatedModule
        label:
          description: 'Widget label'
          type: string
          example: Contacts
        wcol:
          description: 'Widget position'
          type: integer
          enum:
            - 1
            - 2
            - 3
          example: 1
        sequence:
          description: Sequence
          type: integer
          example: 1
        name:
          description: 'The translated name of the widget'
          type: string
          example: Contacts
        data:
          description: 'Widget specific data'
          type: object
          example:
            relation_id: 1
            relatedmodule: 4
            relatedfields:
              - firstname
              - lastname
              - phone
              - email
            viewtype: List
            customView: []
            limit: 5
            action: 1
            actionSelect: '0'
            no_result_text: '0'
            switchHeader: '-'
            filter: '-'
            checkbox: '-'
            orderby: []
            relatedModuleName: Contacts
      type: object
    Products_Get_Record_Response:
      title: 'Base module - Response body for Record'
      description: '{@inheritdoc}'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Record data'
          properties:
            name:
              description: 'Record name'
              type: string
              example: 'Driving school'
            id:
              description: 'Record Id'
              type: integer
              example: 152
            fields:
              title: 'System field names and field labels'
              type: object
              example:
                field_name_1: 'Field label 1'
                field_name_2: 'Field label 2'
                assigned_user_id: 'Assigned user'
                createdtime: 'Created time'
              additionalProperties:
                description: 'Field label'
                type: string
            data:
              $ref: '#/components/schemas/Record_Display_Details'
            privileges:
              description: 'Parameters determining checking of editing rights and moving to the trash'
              properties:
                isEditable:
                  description: 'Check if record is editable'
                  type: boolean
                  example: true
                moveToTrash:
                  description: 'Permission to delete'
                  type: boolean
                  example: false
              type: object
            rawData:
              $ref: '#/components/schemas/Record_Raw_Details'
            productBundles:
              description: 'Product bundles'
              type: object
              additionalProperties:
                description: Product
                properties:
                  data: { $ref: '#/components/schemas/Record_Raw_Details' }
                  rawData: { $ref: '#/components/schemas/Record_Raw_Details' }
                type: object
            ext:
              description: 'Product bundles'
              properties:
                unit_price:
                  description: 'Unit price'
                  type: integer
                  example: 44
                unit_gross:
                  description: 'Unit gross'
                  type: integer
                  example: 55
                qtyinstock:
                  description: 'Qty In Stock'
                  type: integer
                  example: 66
              type: object
          type: object
      type: object
    Products_RecordsList_ResponseBody:
      title: 'Products - Response action record list'
      description: 'Module action record list response body'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'List of records'
          properties:
            headers:
              description: 'Column names'
              type: object
              additionalProperties: {  }
            records:
              description: 'Records display details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Display_Details'
            rawData:
              description: 'Records raw details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Raw_Details'
            count:
              type: integer
              example: 54
            isMorePages:
              type: boolean
              example: true
          type: object
      type: object
    Users_Get_AccessActivityHistory_Response:
      title: 'Users module - History of access activity data'
      description: 'Get user history of access activity.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'User data'
          type: object
          additionalProperties:
            title: 'Condition details'
            properties:
              time:
                description: 'Date time in user format'
                type: string
                example: '2021-06-01 11:57'
              status:
                description: 'Operation name'
                type: string
                example: 'Signed in'
              agent:
                description: 'User agent'
                type: string
                example: PostmanRuntime/7.28.0
              ip:
                description: 'IP address'
                type: string
                example: 127.0.0.1
            type: object
      type: object
    Users_Put_ChangePassword_Request:
      title: 'Users module - Users password change request body'
      required:
        - currentPassword
        - newPassword
      properties:
        currentPassword:
          title: 'Current password'
          type: string
        newPassword:
          title: 'New password'
          type: string
      type: object
    Users_Put_ChangePassword_Response:
      title: 'Users module - Users password change response body'
      description: 'Put method.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Password change status'
          type: boolean
          example: false
      type: object
    Header-Encrypted:
      title: 'Header - Encrypted'
      description: 'Is the content request is encrypted'
      type: integer
      default: 0
      enum:
        - 0
        - 1
    Conditions-Mix-For-Query-Generator:
      title: 'General - Mix conditions for query generator'
      description: 'Multiple or one condition for a query generator'
      type: object
      oneOf:
        -
          $ref: '#/components/schemas/Condition-For-Query-Generator'
        -
          $ref: '#/components/schemas/Conditions-For-Query-Generator'
    Condition-For-Query-Generator:
      title: 'General - Condition for query generator'
      description: 'One condition for query generator'
      required:
        - fieldName
        - value
        - operator
      properties:
        fieldName:
          description: 'Field name'
          type: string
          example: lastname
        value:
          description: 'Search value'
          type: string
          example: Kowalski
        operator:
          description: 'Field operator'
          type: string
          example: e
        group:
          description: 'Condition group if true is AND'
          type: boolean
          example: true
      type: object
    Conditions-For-Query-Generator:
      title: 'General - Conditions for query generator'
      description: 'Multiple conditions for query generator'
      type: object
      additionalProperties:
        description: 'Condition details'
        type: object
    Conditions-For-Native-Query:
      title: 'General - Conditions for native query'
      description: 'Conditions for native query, based on YII 2'
      type: object
      externalDocs:
        description: 'Database communication engine'
        url: 'https://yetiforce.com/en/knowledge-base/documentation/developer-documentation/item/new-db-communication-engine'
      example:
        column_name1: 'searched value 1'
        column_name2: 'searched value 2'
    Users_Login_RequestBody:
      title: 'Users module - Users login request body'
      description: 'JSON or form-data'
      required:
        - userName
        - password
      properties:
        userName:
          description: 'Webservice user name'
          type: string
        password:
          description: 'Webservice user password'
          type: string
        code:
          description: '2FA TOTP code (optional property), Pass code length = 6, Code period = 30'
          type: string
        params:
          description: 'Additional parameters sent by the user, extending the current settings, e.g. language'
          properties:
            version:
              description: 'Portal version'
              type: string
              example: '1.1'
            language:
              description: 'Portal language'
              type: string
              example: pl-PL
            ip:
              description: 'Portal user IP'
              type: string
              example: 127.0.0.1
            fromUrl:
              description: 'Portal URL'
              type: string
              example: 'https://gitdevportal.yetiforce.com/'
            deviceId:
              description: 'Portal user device ID'
              type: string
              example: d520c7a8-421b-4563-b955-f5abc56b97ec
          type: object
      type: object
    Users_Login_ResponseBody:
      title: 'Users module - Users login response body'
      description: 'Users login response body'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Content of responses from a given method'
          required:
            - token
            - name
            - lastLoginTime
            - lastLogoutTime
            - language
            - type
            - login_method
            - preferences
          properties:
            token:
              type: string
              maxLength: 40
              minLength: 40
            name:
              type: string
            lastLoginTime:
              type: string
              example: '2019-10-07 08:32:38'
            lastLogoutTime:
              type: string
              example: ''
            language:
              type: string
              example: pl-PL
            type:
              type: integer
            login_method:
              type: string
              enum:
                - PLL_PASSWORD
                - PLL_PASSWORD_2FA
              example: PLL_PASSWORD_2FA
            logged:
              type: boolean
            preferences:
              required:
                - hour_format
                - start_hour
                - end_hour
                - date_format
                - time_zone
                - currency_id
                - currency_grouping_pattern
                - currency_decimal_separator
                - currency_grouping_separator
                - currency_symbol_placement
                - no_of_currency_decimals
                - currency_name
                - currency_code
                - currency_symbol
                - conv_rate
                - activity_view
                - date_format_js
                - dayoftheweek
                - truncate_trailing_zeros
              properties:
                hour_format:
                  type: string
                  example: '24'
                start_hour:
                  type: string
                  example: '08:00'
                end_hour:
                  type: string
                  example: '16:00'
                date_format:
                  type: string
                  example: yyyy-mm-dd
                time_zone:
                  type: string
                  example: Europe/Warsaw
                currency_id:
                  type: integer
                  example: 1
                currency_grouping_pattern:
                  type: string
                  example: '123,456,789'
                currency_decimal_separator:
                  type: string
                  example: .
                currency_grouping_separator:
                  type: string
                  example: ' '
                currency_symbol_placement:
                  type: string
                  example: 1.0$
                no_of_currency_decimals:
                  type: integer
                  example: 2
                currency_name:
                  type: string
                  example: 'Poland, Zlotych'
                currency_code:
                  type: string
                  example: PLN
                currency_symbol:
                  type: string
                  example: zł
                conv_rate:
                  type: number
                  format: float
                  example: 1
                activity_view:
                  type: string
                  example: 'This Month'
                date_format_js:
                  type: string
                  example: Y-m-d
                dayoftheweek:
                  type: string
                  example: Monday
                truncate_trailing_zeros:
                  type: integer
                  example: 0
              type: object
            authy_methods:
              type: string
              enum:
                - ''
                - PLL_AUTHY_TOTP
              example: PLL_AUTHY_TOTP
            2faObligatory:
              type: boolean
              example: true
            companyId:
              type: integer
            parentName:
              type: string
              example: 'YetiForce Company'
            companyDetails:
              title: 'Company details, optional parameter depending on the user type'
              required:
                - check_stock_levels
                - sum_open_orders
              properties:
                check_stock_levels:
                  type: boolean
                sum_open_orders:
                  type: number
                  format: double
                creditlimit:
                  type: integer
              type: object
          type: object
      type: object
    Exception:
      title: 'General - Error exception'
      description: 'Post method.'
      required:
        - status
        - error
      properties:
        status:
          title: '0 - error'
          type: integer
          enum:
            - 0
          example: 0
        error:
          description: 'Error details'
          required:
            - message
            - code
          properties:
            message:
              description: 'To show more details turn on: config\Debug.php apiShowExceptionMessages = true'
              type: string
              example: 'Invalid method'
            code:
              type: integer
              example: 405
            file:
              description: 'default disabled to enable set: config\Debug.php apiShowExceptionBacktrace = true'
              type: string
              example: api\webservice\Portal\BaseAction\Files.php
            line:
              description: 'default disabled to enable set: config\Debug.php apiShowExceptionBacktrace = true'
              type: integer
              example: 101
            previous:
              description: 'Previous exception'
              type: object
            backtrace:
              description: 'default disabled to enable set: config\Debug.php apiShowExceptionBacktrace = true'
              type: string
              example: '#0 api\webservice\Portal\BaseAction\Files.php (101) ....'
          type: object
      type: object
    UsersLogoutResponseBody:
      title: 'Users module - Users logout response body'
      description: 'JSON data'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Content of responses from a given method'
          type: boolean
      type: object
    Users_Get_Record_Response:
      title: 'Users module - Response body for user'
      description: 'Get user detail.'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'User data'
          properties:
            name:
              description: 'User label'
              type: string
              example: 'System Admin'
            id:
              description: 'User Id'
              type: integer
              example: 1
            fields:
              title: 'System field names and field labels'
              type: object
              example:
                field_name_1: 'Field label 1'
                field_name_2: 'Field label 2'
              additionalProperties:
                description: 'Field label'
                type: string
            data:
              description: 'User data'
              type: object
            privileges:
              description: 'Parameters determining checking of editing rights and moving to the trash'
              properties:
                isEditable:
                  description: 'Check if user is editable'
                  type: boolean
                  example: true
                moveToTrash:
                  description: 'Permission to delete'
                  type: boolean
                  example: false
              type: object
            rawData:
              description: 'Raw user data'
              type: object
          type: object
      type: object
    Users_RecordsList_ResponseBody:
      title: 'Users module - Response action users list'
      description: 'Module action record list response body'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'List of records'
          properties:
            headers:
              description: 'Column names'
              type: object
              additionalProperties: {  }
            records:
              description: 'Records display details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Display_Details'
            rawData:
              description: 'Records raw details'
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Record_Raw_Details'
            count:
              type: integer
              example: 54
            isMorePages:
              type: boolean
              example: true
          type: object
      type: object
    Users_Post_ResetPassword_Request:
      title: 'Users module - Users password reset request body'
      required:
        - userName
        - deviceId
      properties:
        userName:
          description: 'User name / email'
          type: string
        deviceId:
          description: 'Portal user device ID'
          type: string
          example: d520c7a8-421b-4563-b955-f5abc56b97ec
      type: object
    Users_Post_ResetPassword_Response:
      title: 'Users module - Users password reset response body'
      description: 'Post method.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Content of responses from a given method'
          properties:
            expirationDate:
              type: string
              example: '2019-10-07 08:32:38'
            mailerStatus:
              type: boolean
              example: true
          type: object
      type: object
    Users_Put_ResetPassword_Request:
      title: 'Users module - Users password reset request body'
      required:
        - token
        - password
        - deviceId
      properties:
        token:
          description: 'A one-time password reset token'
          type: string
        password:
          description: 'New password'
          type: string
        deviceId:
          description: 'Portal user device ID'
          type: string
          example: d520c7a8-421b-4563-b955-f5abc56b97ec
      type: object
    Users_Put_ResetPassword_Response:
      title: 'Users module - Users password reset response body'
      description: 'Put method.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Password reset status'
          type: boolean
          example: false
      type: object
    Users_Get_TwoFactorAuth_Response:
      title: 'Users module - Authentication secret details'
      description: 'Get two factor authentication details.'
      required:
        - status
        - result
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          title: 'Content of responses from a given method'
          required:
            - authMethods
            - secretKey
          properties:
            authMethods:
              type: string
              example: TOTP
            secretKey:
              type: string
              example: LJUJWCOEGUKP6WS2
          type: object
      type: object
    Users_post_TwoFactorAuth_Response:
      title: 'Users module - Activate two factor authentication'
      description: 'Activate two factor authentication response body'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Content of responses from a given method'
          type: string
      type: object
    Users_Delete_TwoFactorAuth_Response:
      title: 'Users module - Disable two factor authentication'
      description: 'Disable two factor authentication response'
      properties:
        status:
          description: 'A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success, 0 - error'
          type: integer
          enum:
            - 0
            - 1
        result:
          description: 'Status of successful'
          type: boolean
      type: object
  securitySchemes:
    basicAuth:
      type: http
      description: 'Basic Authentication header'
      scheme: basic
    ApiKeyAuth:
      type: apiKey
      description: 'Webservice api key header'
      name: X-API-KEY
      in: header
    token:
      type: apiKey
      description: 'Webservice api token by user header'
      name: X-TOKEN
      in: header
  links:
    GetRecordById:
      operationId: getRecord
      parameters:
        recordId: '$response.body#/result/id'
      description: 'The `id` value returned in the response can be used as the `recordId` parameter in `GET /webservice/{moduleName}/Record/{recordId}`.'
tags:
  -
    name: BaseModule
    description: 'Access to record methods'
  -
    name: BaseAction
    description: 'Access to user methods'
  -
    name: Products
    description: 'Products methods'
  -
    name: Users
    description: 'Access to user methods'
