PurposeGet order status
Request typeasynchronous/synchronous
Supported agent versionv1, v2
PluggetSystemTypeRKMid


Request format

{
  "taskType": "GetOrderState",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
    "orderGuid": "string",
    "taskGuid": "string"
  }
}

Parameter

Type

Mandatory

Description

taskType
+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
orderGuidguid+guid of the order whose status you want to get (either orderGuid or taskGuid)
taskGuidguid
whiteserver task guid for creating an order (either orderGuid or taskGuid)

Response format


   "responseCommon":{ 
      "taskGuid":"guid",
      "taskType":"GetOrderState",
      "objectId":0
   },
   "error":
      "wsError":{ 
         "code":"string",
         "desc":"string"
      }
   }
}

 

Parameter

Type

Description

taskGuidguidThe unique code of this task is used when receiving the task through the queue.
taskTypestring enumTask type
objectIdintRestaurant code in the licensing system
error
Error container, see error description

Asynchronous response format

// Successful response
{
  "taskResponse": {
     "order": {
        "orderGuid": "string",
        "status": {
           "value": "string",
           "isBillPrinted": false
        },
        "substate": "string", 
        "rejectingReason": {
            "code": "string",
            "message": "string"
        }
   },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetOrderState",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "extCode": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}
 
// Response with error
{
   "responseCommon": {
      "taskGuid": "string",
      "taskType": "GetOrderState",
      "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

taskGuiduuid+Request ID
order


- taskGuidguid
taskGuid whiteserver task to create an order
- orderGuidguid
Order Guid in RK
status


– valuestring

Order status, possible options:

  • Created - new order;
  • Canceled - cancelled;
  • Complited - the order has been paid and is closed from editing;
  • Cooking - the order has been sent to the kitchen
  • Ready - the order is ready for pickup;
  • IssuedOut - the order has been handed over (to the client or the courier).

*Agent V1 differences: 
Unknown - order not found;
Created - new order;
Accepted - order accepted;
Canceled - cancelled by external command while waiting for order confirmation from cashier;

– isBillPrintedbool
Mark indicating whether the guest bil has been printed.
errorstring enum
Error container, see error description
substatestring
Extended order status
- rejectingReason.code

Cancellation code

- rejectingReason.message

string
Reason for order cancellation