Purpose

Returns a list of tables in a restaurant

Supported agent version

v2 from version 2.8.5.11 onwards

PluggetSystemTypeRKRef

Request format

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

Parameter

Type

Mandatory

Description

taskTypestring+Task type, for this method the value is "GetTableList"
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

Example request

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



Example request

// Successful response
 
{
    "taskResponse": {
        "tables": [
            {
                "maxGuests": number,
                "name": string,
                "code": number,
                "hallName": string
            }
        ]
    },
    "responseCommon": {
        "taskGuid": string,
        "taskType": "GetTableList",
        "objectId": number
    }
}
 
  
// Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetTableList"
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    }
  }
}


Example answer

{
    "taskResponse": {
        "tables": [
            {
                "maxGuests": 10,
                "name": "2",
                "code": 246,
                "hallName": "test"
            },
            {
                "maxGuests": 10,
                "name": "3",
                "code": 247,
                "hallName": "test"
            },
            {
                "maxGuests": 2147483647,
                "name": "WSA2",
                "code": 3,
                "hallName": "WSA Virtual Hall"
            }
        ]
    },
    "responseCommon": {
        "taskGuid": "cd9641b3-dadb-4b9b-849e-aacecf1ff129",
        "taskType": "GetTableList",
        "objectId": 199990246,
        "agentGuid": "d564619a-50c3-3d87-0816-de67ed9c8e18"
    }
}