Purpose

Get order by Objectid+OrderGuid

Request typeasynchronous/synchronous
Supported agent versionv1, v2
PluggetSystemTypeRKMid

Request format

{
  "taskType": "GetOrder",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
     "orderGuid": "guid"
  }
}

Parameter

Type

Mandatory

Description

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
orderGuidstring+The internal keeper GUID of the order for which information is required
objectIdint+Restaurant code in the licensing system

Response format


   "responseCommon":{ 
      "taskGuid":"guid",
      "taskType":"GetOrder",
      "objectId": number
   },
   "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, inside there is detailing on related systems
- wsError
Error container, see Error Description

Asynchronous response format

// Successful response
{
  "taskResponse": {
     "order": {
        "originalOrderId": "string", // EXTERNAL ID (usually, numeric)
        "createdAt": "2008-10-17T00:00:00",
        "status": {
           "value": "string",
           "isBillPrinted": false
        },
        "delivery": {
           "expectedTime": "2008-10-17T00:00:00"
        },
        "products": [
           { // simple variant
             "ingredients": []
             "id": number,
             "name": "string",
             "price": number, // the parameter is not mandatory. It can be left blank, since the order is created with the price indicated at the cash register
             "quantity": number
             "discountIds": [
                 {
                   "id": number,
                   "value":number
                 }
             ],
          },
          { // the version with modifiers or combo
             "id": number,
             "name""string",
             "price":  number, // the parameter is not mandatory. It can be left blank, since the order is created with the price indicated at the cash register
             "quantity": number,
             "discountIds": [

                 {
                   "id": number,
                   "value":number
                 }
               ],
             "ingredients": [ 
//array of modifiers or combo elements
               {
                  "id": number,
                  "name": "string",
                  "quantity": number,
                  "price": "string", // the parameter is not mandatory. It can be left blank, since the order is created with the price indicated at the cash register
                  "ingredients": [ //array of modifiers for combo components. Starting from agent version 2.7.9.1 only
                    {
                      "id": number,
                      "name": "string",
                      "quantity": number,
                      "price": number // the parameter is not mandatory. It can be left blank, since the order is created with the price indicated at the cash register
                   }
                  ]
                }
             ],
             "voidingReason":"string"
          }
        ],
        "comment": "string",
        "price": {
           "total": number
        },
        "appliedPayments": [ // WSA 2 only
        {
            "amount": number,
            "guid": "guid",
            "payType": "enum"
        }],
        "personsQuantity": number,
        "tableCode": number,
        "waiterId": number,
        "substate": "string",  
        "queuePosition": "string",
        "rejectingReason": {
            "code": "string",
            "message": "string"
        },
        "discountIds": [
            {
                "id": number,
                "value":number
            }
        ],
        "queuePosition": "string",
        
"payMethod": "string"   
      }
  },
  "responseCommon": {
    "taskGuid": "guid",
    "taskType": "GetOrder",
    "objectId": number
  }
}
 
// Response with error
{
  "responseCommon": {
    "taskGuid": "guid",
    "taskType": "GetOrder",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

Parameter

Parameter type

Mandatory

Description

order
yes
originalOrderIdstring
External identifier of the order passed in the create order request.
status.valuestring

Order status, possible options:
- Unknown - order not found;
- Created - new order;
- Accepted - order accepted;
- Canceled - cancelled by external command while waiting for order confirmation from cashier;
- Ready - prepared (prepared for the future);
- Closed - closed (considered completed in the restaurant)

status.isBillPrintedbool
Checkbox indicating whether the guest bill has been printed.
delivery. expectedTimeDateTime
time to prepare the order by
productsarrayyesOrder contents
- idintyesDish ID
- namestring
Name of the dish

- price

string
The separator between the integer and fractional parts of the sum must be a period.
- quantityfloat (non-integer value - for a half portion?)yesNumber of dishes

- voidingReason

string
Reason for removing dish from order (Agent v2 only)
- discountIdsarray-Discounts on dishes
     - idint+Discount ID
     - valuedecimal-Discount value. Amount or percentage. Accepts negative values.
- ingredientsarray
Ingredients or contents of a combo dish
– idintyesIngredient ID
commentstring
Comment to order
price.totalmoneyyes

Total order cost. The decimal separator for the integer and fractional parts of the amount should be a period.

appliedPayments

Payments and prepayments. (WSA 2 only)

- amount

money+The value of the amount to be paid. The separator between the integer and fractional parts of the amount must be a period.
- guidguid+

Unique payment fact identifier (line_guid field from R-Keeper)

- payTypeenum+

Payment type: Cash, Card, Unknown.

personsQuantityint
Number of persons
tableCodeint

Table code (agent v2 only)

waiterIdint+Waiter Code (Agent v2 only)
errorstring enum
Error container, see Error Description
substatestring

Extended order status

queuePositionstring

Extended property: kiosk e-queue number (may not be present if there is no such extended property)

- rejectingReason.codestring
Cancellation code
- rejectingReason.messagestring
Reason for order cancellation
discountIdsarray
Discounts
- idint+Discount ID
- valuedecimal
Discount value. Amount or percentage. Accepts negative values.

queuePosition

string?-

The queue number generated by RK7. WSA 2.7.7.1, RK7 7.06.05.459. It is formed according to the rule: the cash register code is transmitted as a Latin letter + the last digits of the order number.

payMethodstring?-Payment method. Starting from WSA 2.8.2.1