Purpose

Obtaining a list of cocktail recipe cards

Request typeasynchronous/synchronous
Supported agent version, sh

WSA v2.8.5.4  SH5 

PluggetSystemTypeStoreHouse

Request format

{
  "taskType": "ShAlcListPrepare",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
 
       "timeout": number
    },
    "restaurantGuid": "string (guid)",
    "placeGuid": "string (guid)",
    "date": "string", 
    "dishes": [
       {
         "rkGuid": "string (guid)",
         "amount": number
       }
    ]
  
   }
}


ParameterTypeMandatoryDescription
taskTypestring+Task type
async

Asynchronous method call (either synchronous or asynchronous)
sync

Synchronous method call (either synchronous or asynchronous)
timeoutint-Agent response timeout in seconds, default is 120 seconds
objectIdint+Restaurant code in the licensing system
restaurantGuidguid+Guid in SH Enterprise
placeGuidguid+Guid in SH Point of Sale
dateDate-Date for calculation (if null then current date is used)
dishesarray+Array: list of goods-dishes for calculation
|- rkGuidguid+Guid in RK Product
|- amountdouble+Quantity of goods (In units of measurement for applications. Default is Portion)

Response format

// Successful response
{
   "taskResponse":{
      "dishes":[
         {
            "guid": "string",
            "amount": number,
            "ingredients": [
               {
                   "guid": "string",
                   "guidRk": "string",
                   "rid": number,
                   "name": "string",
                   "amount": number,
                   "alcCodes": [ "string" ]
               }
            ]
         }
      ]
   },
   "responseCommon":{
      "taskGuid":"string",
      "taskType":"ShAlcListPrepare",
      "objectId":"number"
   }
}
    
// Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "ShAlcListPrepare",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

dishesarray
Array: list of goods-dishes
|- guidguid
Product: GUID
|- amountdouble
Quantity of goods
|- ingredientsarray
Array: List of ingredients
   |- guidint

GUID SH of ingredient — SH product (GUID Sh is different from GUID RK for the same product)

   |- guidRkint

GUID RK of the ingredient — product SH (calculated as XOR of two GUIDs GUID SH of the ingredient and GUID of the product group associated with the enterprise from the input parameters)

   |- ridint
Rid of product Ingredient
   |- namestring
Name of product ingredient
   |- amountdouble
Quantity of ingredient (in units for alcohol, default is Liter)
   |- alcCodesstring[]
Array of EGAIS product codes