r_keeper
GetStopList
Содержание инструкции:
Описание
Формат запроса
{
  "taskType": "GetStopList",
  "params": {
    "async": {
      "objectId": 0,
      "timeout": 0
    }
  }
}
Описание параметров
Формат ответа
{  
   "responseCommon":{  
      "taskGuid":"guid",
      "taskType":"GetStopList",
      "objectId":"int"
   },
   "error":{  
      "wsError":{  
         "code":"string",
         "extCode":"string",
         "desc":"string"
      }
   }
}
Формат асинхронного ответа
Успешный ответ
{
  "taskResponse": {
     "stopList": {
       "dishes": [
         {
           "id": "string",
           "name": "string",
           "type": "string"
         }
       ]
     }
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  }
}
Успешный ответ, но стоп-лист пустой
{
  "taskResponse": {
     "stopList": {
       "dishes": []
     }
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  }
}
Ответ с ошибкой
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetStopList",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "extCode": "string",
      "desc": "string"
    },
    "agentError": {
      "code": 0,
      "desc": "string"
    }
  }
}
Описание параметров
Примеры
Запрос
{
  "taskType": "GetStopList",
  "params": {
    "async": {
      "objectId": 199990106,
      "timeout": 60
    }
  }
}
Синхронный ответ
{
  "responseCommon": {
    "taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
    "taskType": "GetStopList",
    "objectId": 199990106
  },
  "responseSync": "QueuedSuccess"
}
Асинхронный ответ успешный
{
  "stopList": {
    "dishes": [
      {
        "id": "1000021",
        "name": "Гречневая каша",
        "type": "product"
      },
      {
        "id": "1000019",
        "name": "Чай",
        "type": "product"
      }
    ]
  },
  "responseCommon": {
    "taskGuid": "fe5633c8-ee7d-4ef5-ab98-8ff9e98adbdc",
    "taskType": "GetStopList",
    "objectId": 199990106
  }
}
Асинхронный ответ с ошибкой
{
  "responseCommon": {
    "taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
    "taskType": "GetStopList",
    "objectId": 199990106
  },
  "error": {
    "agentError": {
      "code": 82,
      "desc": "Нет доступа к основной системе (Rk7)"
    }
  }
}