Purpose

Perform the Store House procedure from the list of allowed ones

Request typeAsynchronous/synchronous
Supported agent versionv2
PluggetSystemType

StoreHouse

ReplGoodsCategories
ReplGGroups
ReplGGroupsGuid
ReplGoods
ReplGoodsGuid
ReplCmpGroups
ReplCmpGroupsGuid
ReplCmp
ReplCmpBaseGuid
ReplCorrs
RplDivisions
ReplSUnits
ReplSUnitsGuid
ReplODocs
ReplODocsPrepare
EActs
EAct
ModEAct
UpdEDoc
InsEReply
EGoodsByEMark
EGoodsByEMarkList
CntrSpecsByExtCode
EGoodsPrices
EGoods
GRemns
RptSale
ODocs
ODoc
ModODoc
DelODoc
GDoc13
InsGDoc13
DelGDoc13
GDoc12
GDoc12Exp
GDoc12ExpEx
InsGDoc12
DelGDoc12
GDoc8
GDoc8Diffs
InsGDoc8
DelGDoc8
GDoc1
InsGDoc1
DelGDoc1
GDoc5
InsGDoc5
DelGDoc5
GDoc10
InsGDoc10
DelGDoc10
GDoc11
InsGDoc11
DelGDoc11
GDoc4
InsGDoc4
DelGDoc4
GDoc0
InsGDoc0
DelGDoc0
GDocs
ActivateGDoc
Countries
ModCountries
Regions
ModRegions
CDecls
ModCDecls
Taxes1
ModTaxes1
Taxes2
ModTaxes2
Goods
GoodsPCost
GoodsPCostEx
GoodsMUnits
GoodsItem
InsGood
DelGood
GGroups
GGroupsTree
GGroup
InsGGroup
UpdGGroup
DelGGroup
GoodsCategories
ModGoodsCategories
BGoodsCategories
ModBGoodsCategories
MGroups
MGroup
InsMGroup
UpdMGroup
DelMGroup
MUnits
MUnit
InsMUnit
UpdMUnit
DelMUnit
Corrs
InsCorr
UpdCorr
DelCorr
CntrSpecs
CntrSpec
LEntities
ModLEntities
Divisions
ModDivisions
Departs
Depart
InsDepart
UpdDepart
DelDepart
Currencies
ModCurrencies

Request format


JSON

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

Parameter

Type

Mandatory

Description

taskTypestringyesTask type
-async

Asynchronous method call: either synchronous or asynchronous
-sync

Synchronous method call: either synchronous or asynchronous
--timeoutintnoAgent response time in seconds. Default is 120 seconds
--objectIdintyesRestaurant code in the licensing system
queryobjectyesA JSON object in the format of requests to Store House. Contains the name of a Store House command. The command name is verified against a whitelist of allowed commands on the agent side. If everything is correct, it is then passed for execution to Store House.

Response format


JSON

{
   "responseCommon":{
      "taskGuid":"guid",
      "taskType":"ShExecuteProcedure",
      "objectId":number
   },
   "error":{
      "wsError":{
         "code":"string",
         "desc":"string"
      }
   }
}

Parameter

Type

Description

-taskGuidguidUnique code for this task. Used when receiving a task via the queue
-taskTypestring enumTask type
-objectIdintRestaurant code in the licensing system
error
Error container, for more details see the article Error Description

Asynchronous response format


JSON

{
    "taskResponse": object,
    "responseCommon": {
        "taskGuid": "guid",
        "taskType": "ShExecuteProcedure",
        "objectId": "number"
    },
    "error": {
        "wsError": {
            "code": "string",
            "desc": "string"
        },
        "agentError": {
            "code": "string",
            "desc": "string"
        }
    }
}

Parameter

Parameter type

Description

taskResponseobjectJson object serialized from the result of processing the command by the plugin
error
Error container, for more details see the article Error Description

Examples

Example of a request to call the GoodsList procedure:

JSON

{
  "taskType":"ShExecuteProcedure",
  "params":{
    "async":{
      "objectId":199997075,
      "timeout":"60"
    },
    "query":{
      "ProcName":"GoodsList",
      "UserName":"Admin",
      "Password":"",
      "Input":[
        {
          "Head":"108",
          "Original":[
            "106\\1",
            "110\\31"
          ],
          "Values":[
            [
              null
            ],
            [
              "2018-12-04"
            ]
          ]
        },
        {
          "Head":"210",
          "Original":[
            "1",
            "206#10\\1"
          ],
          "Values":[
            [
              1170,
              1170
            ],
            [
              0,
              4
            ]
          ]
        }
      ]
    }
  }
}

Example of an asynchronous response to a call to the GoodsList procedure:

JSON

{
  "responseCommon":{
    "taskGuid":"01278c93-2877-47bf-84f7-0df2d0c7a278",
    "taskType":"ShExecuteProcedure",
    "objectId":199997075
  },
  "taskResponse":{
    "errorCode":0,
    "errMessage":"OK",
    "Version":"1.8.2",
    "UserName":"Admin",
    "actionName":"GoodsList",
    "actionType":"Execute",
    "shTable":[
      {
        "head":"108",
        "original":[
          "106\\1",
          "110\\31",
          "107\\1"
        ],
        "fields":[
          "106\\1",
          "110\\31",
          "107\\1"
        ],
        "values":[
          [
            null
          ],
          [
            "2018-12-04"
          ],
          [
            null
          ]
        ]
      },
      {
        "head":"210",
        "original":[
          "1",
          "206#10\\1",
          "4",
          "42",
          "59",
          "26",
          "25",
          "52",
          "50",
          "51",
          "77",
          "78",
          "215\\1",
          "215\\2",
          "215\\3",
          "215\\216\\1",
          "215\\216\\2",
          "215\\216\\3",
          "201\\1",
          "201\\42",
          "201\\2",
          "201\\3",
          "209\\1",
          "209\\3",
          "206\\1",
          "206\\3",
          "206#1\\1",
          "206#1\\3",
          "206#2\\1",
          "206#2\\3",
          "206#3\\1",
          "206#3\\3",
          "206#4\\1",
          "206#4\\3",
          "3",
          "6\\Articul",
          "67",
          "20",
          "21",
          "22",
          "19",
          "23",
          "53",
          "56",
          "212\\9",
          "213\\9",
          "212#1\\9",
          "213#1\\9",
          "24",
          "105\\1",
          "105\\3",
          "240",
          "241",
          "54",
          "57",
          "106\\1",
          "106\\3",
          "114\\1",
          "114\\107\\1",
          "114\\107\\3",
          "114\\3",
          "114\\7\\FullName",
          "114\\7\\EMail",
          "114\\7\\PAddr",
          "114\\7\\Phone",
          "200\\1",
          "200\\3",
          "290\\1",
          "290\\3",
          "255\\1",
          "255\\41",
          "255\\2",
          "255\\22",
          "255\\244\\1",
          "255\\244\\4",
          "255\\244\\3",
          "206#10\\41",
          "206#10\\3",
          "239"
        ],
        "fields":[
          "1",
          "206#10\\1",
          "4",
          "42",
          "59",
          "26",
          "25",
          "52",
          "50",
          "51",
          "77",
          "78",
          "215\\1",
          "215\\2",
          "215\\3",
          "215\\216\\1",
          "215\\216\\2",
          "215\\216\\3",
          "201\\1",
          "201\\42",
          "201\\2",
          "201\\3",
          "209\\1",
          "209\\3",
          "206\\1",
          "206\\3",
          "206#1\\1",
          "206#1\\3",
          "206#2\\1",
          "206#2\\3",
          "206#3\\1",
          "206#3\\3",
          "206#4\\1",
          "206#4\\3",
          "3",
          "6\\Articul",
          "67",
          "20",
          "21",
          "22",
          "19",
          "23",
          "53",
          "56",
          "212\\9",
          "213\\9",
          "212#1\\9",
          "213#1\\9",
          "24",
          "105\\1",
          "105\\3",
          "240",
          "241",
          "54",
          "57",
          "106\\1",
          "106\\3",
          "114\\1",
          "114\\107\\1",
          "114\\107\\3",
          "114\\3",
          "114\\7\\FullName",
          "114\\7\\EMail",
          "114\\7\\PAddr",
          "114\\7\\Phone",
          "200\\1",
          "200\\3",
          "290\\1",
          "290\\3",
          "255\\1",
          "255\\41",
          "255\\2",
          "255\\22",
          "255\\244\\1",
          "255\\244\\4",
          "255\\244\\3",
          "206#10\\41",
          "206#10\\3",
          "239"
        ],
        "values":[
          [
            1170,
            1170
          ],
          [
            0,
            4
          ],
          [
            "{9615D926-3474-5303-C65E-DBC7735F5278}",
            "{9615D926-3474-5303-C65E-DBC7735F5278}"
          ],
          [
            75,
            75
          ],
          [
            12,
            12
          ],
          [
            0,
            0
          ],
          [
            0,
            0
          ],
          [
            0,
            0
          ],
          [
            0,
            0
          ],
          [
            0,
            0
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            397,
            397
          ],
          [
            397,
            397
          ],
          [
            "Thin pre-made pancakes, set",
            "Thin pre-made pancakes, set"
          ],
          [
            398,
            398
          ],
          [
            0,
            0
          ],
          [
            ".",
            "."
          ],
          [
            null,
            null
          ],
          [
            255,
            255
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            107,
            107
          ],
          [
            "Supplies",
            "Supplies"
          ],
          [
            11,
            11
          ],
          [
            "pcs.",
            "pcs."
          ],
          [
            11,
            11
          ],
          [
            "pcs.",
            "pcs."
          ],
          [
            11,
            11
          ],
          [
            "pcs.",
            "pcs."
          ],
          [
            11,
            11
          ],
          [
            "pcs.",
            "pcs."
          ],
          [
            11,
            11
          ],
          [
            "pcs.",
            "pcs."
          ],
          [
            "Thin pre-made pancakes",
            "Thin pre-made pancakes"
          ],
          [
            "666",
            "666"
          ],
          [
            166.514703,
            166.514703
          ],
          [
            2.497757,
            2.497757
          ],
          [
            12.097514,
            12.097514
          ],
          [
            11.911514,
            11.911514
          ],
          [
            0,
            0
          ],
          [
            166.514703,
            166.514703
          ],
          [
            100.0000,
            100.0000
          ],
          [
            200.0000,
            200.0000
          ],
          [
            1800,
            1800
          ],
          [
            0,
            0
          ],
          [
            1800,
            1800
          ],
          [
            0,
            0
          ],
          [
            12,
            12
          ],
          [
            8388609,
            8388609
          ],
          [
            "Kitchen Restaurant 1",
            "Kitchen Restaurant 1"
          ],
          [
            0,
            0
          ],
          [
            null,
            null
          ],
          [
            118.0000,
            118.0000
          ],
          [
            236.0000,
            236.0000
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            0,
            0
          ],
          [
            "Item (by default)",
            "Item (by default)"
          ],
          [
            0,
            0
          ],
          [
            "Item (by default)",
            "Item (by default)"
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            null,
            null
          ],
          [
            "{00000000-0000-0000-0000-000000000000}",
            "{00000000-0000-0000-0000-000000000000}"
          ],
          [
            null,
            null
          ],
          [
            0.010000,
            1.000000
          ],
          [
            "g",
            "L"
          ],
          [
            0,
            0
          ]
        ]
      }
    ]
  }
}