Purpose

Request a list of orders from the cash server. The request is available only if there is permission in the restaurant settings in WsAdmin

Request typeasynchronous/synchronous
Supported agent version, SH

WSA v2.8.5.10

PluggetSystemTypeRKMid

Request format

{
    "taskType": "GetOrderList",
    "params": {
        "sync": {
            "objectId": number,
            "timeout": number
        },
 
        "tableCode": number,
        "withClosed": boolean
 
 
    }
}

Parameter

Type

Mandatory

Description

taskTypestring+Task Type (GetOrderList)
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
tableCodenumber-Table code for which the list of orders is returned. Can be null - returns a list of orders from all tables, but only if there is permission "request orders from all tables" in the restaurant settings in the White Server admin panel
withClosedboolean-If true, returns all orders, otherwise only active ones. A request with a true value is possible only if there is a "request closed orders" permission in the restaurant settings in the White Server admin panel

Response format

Successful response

{
    "taskResponse": {
        "orders": [
            {
                "orderGuid": string,
                "tableCode": number,
                "waiterId": number,
                "sum": number,
                "unpaid": number,
                "isFinished": boolean,
                "openTime": DateTime,
                "isReserve": boolean,
                "duration": string
             }
        ]
    },
    "responseCommon": {
        "taskGuid": string,
        "taskType": "GetOrderList",
        "objectId": nubmer
    }
}



Response with error

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "PatchOrder",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

ordersarray+Array: list of orders
|- orderGuidGuid+Order Guid
|- tableCodeint+Table code
|- waiterIdint+Waiter ID
|- sumdecimal+Order amount
|- unpaiddecimal+

How much is left to pay

|- isFinishedboolean+Indication that the order is closed
|- openTimeDateTime+Date and time of opening or start of table reservation
|- isReserveboolean+Table/order reservation indicator for a specific time (OpenTime)
|- durationstring-Table reservation duration in HH:MM:SS format (e.g. 02:30:00) 

Example request

{
    "taskType": "GetOrderList",
    "params": {
        "sync": {
            "objectId": "199990246",
            "timeout": 120
        },
        "tableCode": 247,
        "withClosed": true
    }
}


Example response

{
    "taskResponse": {
        "orders": [
            {
                "orderGuid": "d06a58d0-75c8-42f9-b836-e1afdffb53fa",
                "tableCode": 247,
                "waiterId": 1,
                "sum": 0,
                "unpaid": 0,
                "isFinished": true,
 
                "createTime": "2024-06-22T07:14:24",
                "isReserve": false
            },
 
            {
                "orderGuid": "f85e0efa-bff9-4a12-b5f6-56722b58e6a1",
                "tableCode": 3,
                "waiterId": 9001,
                "sum": 0,
                "unpaid": 0,
                "isFinished": false,
                "createTime": "2024-06-26T17:00:00",
                "isReserve": true,
                "duration": "02:50:00"
            },
            {
                "orderGuid": "dffbb7c2-dea8-4905-805c-edb5d8e61767",
                "tableCode": 3,
                "waiterId": 9001,
                "sum": 408.5,
                "unpaid": 408.5,
                "isFinished": false,
                "createTime": "2024-06-25T17:12:36",
                "isReserve": false
            },
 
 
        ]
    },
    "responseCommon": {
        "taskGuid": "03046fb4-7c57-4884-9d08-a05c24123273",
        "taskType": "GetOrderList",
        "objectId": 199990246,
        "agentGuid": "d564619a-50c3-3d87-0816-de67ed9c8e18"
    }
}