Description

PurposeGet a stop list from a restaurant
Request typeAsynchronous

Request format

{
  "taskType": "GetStopList",
  "params": {
    "async": {
      "objectId": 0,
      "timeout": 0
    }
  }
}

Description of parameters

Parameter

Type

Mandatory

Description

taskType

Task type
async

Asynchronous method
timeoutint-Agent response timeout in seconds, default is 120 seconds
objectIdint+Restaurant code in the licensing system


Response format

{  
   "responseCommon":{  
      "taskGuid":"guid",
      "taskType":"GetStopList",
      "objectId":"int"
   },
   "error":{  
      "wsError":{  
         "code":"string",
         "extCode":"string",
         "desc":"string"
      }
   }
}


Parameter

Type

Description

taskGuidguidThe unique code of this task is used when receiving the task through the queue
taskTypestring enumTask type
objectIdintRestaurant code in the licensing system
error
Error container with detailing on related systems inside
- wsError
Errors received from the WhiteServer service
– codestringError code
– extCodestringExtended error code
– descstringError description

Asynchronous response format

Successful response
{
  "taskResponse": {
     "stopList": {
       "dishes": [
         {
           "id": "string",
           "name": "string",
           "type": "string"
         }
       ]
     }
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  }
}
Successful response, but stoplist is empty
{
  "taskResponse": {
     "stopList": {
       "dishes": []
     }
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  }
}
Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "extCode": "string",
      "desc": "string"
    },
    "agentError": {
      "code": 0,
      "desc": "string"
    }
  }
}

Description of parameters


Parameter

Parameter type

Mandatory

Description

taskGuiduuid+Request ID
stoplist


- dishesarray
array of elements in the stop list.
– idinteger
Dish ID
– namestring
Name of the dish
– typestring
Product type. Possible options: product, ingredient, category (currently always product)
errorstring enum
Error container, inside there is detailing on related systems
- wsErrorstring enum
Whiteserver Error
– codestring
Error code
– extCodestring
Extended error code
– descstring
Error description
- agentErrorstring enum
Agent Error
– codeint
Error code
– descstring
Error description

Request

{
  "taskType": "GetStopList",
  "params": {
    "async": {
      "objectId": 199990106,
      "timeout": 60
    }
  }
}

Synchronous response

{
  "responseCommon": {
    "taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
    "taskType": "GetStopList",
    "objectId": 199990106
  },
  "responseSync": "QueuedSuccess"
}

Successful asynchronous response

{
  "stopList": {
    "dishes": [
      {
        "id": "1000021",
        "name": "Buckwheat porridge",
        "type": "product"
      },
      {
        "id": "1000019",
        "name": "Tea",
        "type": "product"
      }
    ]
  },
  "responseCommon": {
    "taskGuid": "fe5633c8-ee7d-4ef5-ab98-8ff9e98adbdc",
    "taskType": "GetStopList",
    "objectId": 199990106
  }
}

Asynchronous response with error

{
  "responseCommon": {
    "taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
    "taskType": "GetStopList",
    "objectId": 199990106
  },
  "error": {
    "agentError": {
      "code": 82,
      "desc": "No access to main system (Rk7)"
    }
  }
}