Purpose

Returns a set of current parameters from the reference server

Supported agent versionv2, starting from version 2.6.5.2 and onwards
PluggetSystemTypeRKRef

Request format


JSON

{
  "taskType": "GetConfigForReporting",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    }
  }
}

Parameter

Type

Mandatory

Description

taskTypestringyesTask type. For this method, the value is GetConfigForReporting
-async

Asynchronous method call: either synchronous or asynchronous
-sync

Synchronous method call: either synchronous or asynchronous
--timeoutintnoAgent response timeout in seconds, default is 120 seconds
--objectIdintyesRestaurant code in the licensing system

Example request


JSON

{
  "taskType": "GetConfigForReporting",
  "params": {
    "sync": {
      "objectId": 199990001
    }
  }
}



Response format

Successful response


JSON

{
    "taskResponse": {
        "restaurants": [
            {
                "fullRestaurantCode": string,
                "region": string
            }
        ],
        "restaurantRegions": [
            {
                "name": string,
                "utcOffsets": string
            }
        ],
        "parameters": [
            {
                "parameter": string,
                "shortValue": string
            }
 
        ],
        "cashGroups": [
            {
                "name": string,
                "sendOnLineData": string,
                "onLineDataExportPeriod": string
            }
        ],
        "reportingServers": [
            {
                "name": string,
                "sendOnLineData": string,
                "onLineDataExportPeriod": string,
                "onLineMaxFilesProcess": string
            }
        ]
    },
    "responseCommon": {
        "taskGuid": string,
        "taskType": "GetConfigForReporting",
        "objectId": int
    }
}



Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetConfigForReporting"
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    }
  }
}



Example answer


JSON

{
    "taskResponse": {
        "restaurants": [
            {
                "fullRestaurantCode": "199990246",
                "region": "1"
            },
            {
                "fullRestaurantCode": "199999999",
                "region": "1"
            }
        ],
        "restaurantRegions": [
            {
                "name": "Main region",
                "utcOffsets": "PT0H0M0S"
            }
        ],
        "parameters": [
            {
                "parameter": "StartWindow",
                "shortValue": "0"
            },
            ...
            {
                "parameter": "PrimeCostPriceType",
                "shortValue": "4"
            },
        ],
        "cashGroups": [
            {
                "name": "EMRDPKASS",
                "sendOnLineData": "true",
                "onLineDataExportPeriod": "180000"
            }
        ],
        "reportingServers": [
            {
                "name": "Reference server",
                "sendOnLineData": "false",
                "onLineDataExportPeriod": "0",
                "onLineMaxFilesProcess": "0"
            }
        ]
    },
    "responseCommon": {
        "taskGuid": "9b7f4162-352b-4ca3-94c5-f7d36a51bfde",
        "taskType": "GetConfigForReporting",
        "objectId": 199990246,
        "agentGuid": "b922d5c8-a3a5-59ab-4cb3-ec51739b27a3"
    }
}