Work with Orders
Order for Delivery
<RK7Query>
<RK7CMD CMD="DeliveryUpdateStatus">
<Order guid="{99ECDC52-09EF-4927-8068-F25830EF493C}"/>
<DeliveryBlock deliveryState="1" startTime="2" travelTime="3" deliveryTime="4" forwarderSendTime="" forwarderReturnTime="" realDeliveryTime="" zoneID="" zoneName="" orderPrefix=""/>
<ExtSource source="31"/>
</RK7CMD>
</RK7Query>
List of Orders
<RK7Query>
<RK7Command CMD="GetOrderList" >
</RK7Command>
</RK7Query>
Order
<RK7Query>
<RK7Command CMD="GetOrder">
<Order guid="{577FFA69-348A-41D7-810B-CF0A32489BE1}"/>
</RK7Command>
</RK7Query>
Or by the combination of vist+orderident
<RK7Query>
<RK7Command CMD="GetOrder">
<Order visit="543555" ident="256"/>
</RK7Command>
</RK7Query>
New Order
To create a new order, use the request of the following type:
<RK7Query>
<RK7CMD CMD="CreateOrder">
<Order persistentComment="100500">
<Table code="1"/>
<Waiter code="5"/>
<Station id="15015"/>
<GuestType id="1"/>
<Guests>
<Guest GuestLabel="1"/>
<Guest GuestLabel="2"/>
<Guest GuestLabel="3"/>
<Guest GuestLabel="4"/>
<Guest GuestLabel="5"/>
</Guests>
</Order>
</RK7CMD>
</RK7Query>
With the Table being the only obligatory parameter.
Other parameters:
- PersistentComment — the saved comment to the order
- Table — a table, a required parameter to fill in. A call occurs when any of its code, ident, or guid fields are specified. Similarly for all other parameters
- Waiter — on behalf of which waiter the order is being created. If not specified, it is created on behalf of the system
- Station
- GuestType — the type of guests. In the <Guests> section, fill in the guests, set the names.
An empty order is created. After that, the response of the following type is received:
<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.3.182" XmlVersion="166" Status="Ok" CMD="CreateOrder" VisitID="356255787" OrderID="256" guid="{6002FD3A-68B6-4FC9-8EB1-D53A697C286C}" ErrorText="" DateTime="2014-11-19T18:23:04" WorkTime="30" Processed="1"/>
In this response, for the following work, you need to get the combination of visit + orderid or guid.
To fill in the order, send the request of the following type:
<Dish id="1043439" quantity="1000" price="0">
<Modi id="100" count="1" price="100"/>
</Dish>
- Access by id, guid or code
- price — an optional parameter
- count — in units.
The example of adding the dish with a discount to the order:
<RK7Query>
<RK7CMD CMD="SaveOrder">
<Order visit="356255787" orderIdent="256"/>2
<Session>
<Station id="15015"/>
<Dish id="1043439" quantity="1000" price="0"/>
<Discount id="100"/>
</Session>
</RK7CMD>
</RK7Query>
The example of adding a discount for the whole order:
<RK7Query>
<RK7CMD CMD="SaveOrder">
<Order guid="{5AAEB01D-C8BE-4C11-A1EC-348EF361F3AE}"/>
<Session>
<Station id="15002"/>
<Discount id="1000229"/>
</Session>
</RK7CMD>
</RK7Query>
The example of adding a discount for a dish to the order:
<RK7Query>
<RK7CMD CMD="SaveOrder">
<Order guid="{5AAEB01D-C8BE-4C11-A1EC-348EF361F3AE}"/>
<Session line_guid="{9DC95843-E141-42BF-BB78-9818BCDED302}">
<Dish line_guid="{A409B650-DC23-45B3-8509-97DE257F00EF}">
<Discount code="6"/>
</Dish>
</Session>
</RK7CMD>
</RK7Query>
<Session line_guid="{9DC95843-E141-42BF-BB78-9818BCDED302}"> — data is taken from the GetOrder request
<Dish line_guid="{A409B650-DC23-45B3-8509-97DE257F00EF}"> — data is taken from the GetOrder request for adding a combo dish to an order
<RK7Query>
<RK7CMD CMD="saveOrder">
<order guid="{4461052B-CF8B-4AB8-9D9D-40D1D6363EAC}"/>
<Session>
<Combo id="1000205" quantity = "1000" >
<Component id="1000033"></Component>
<Component id="1000034"></Component>
</Combo>
</Session>
</RK7CMD>
</RK7Query>
Where:
- Combo id="1000205" — the dish identifier in the menu
- Component id="1000033" - identifier of the dish linked to the combo element.
Creating Banquet Order
To create a banquet order, use the CreateOrder XML request.
The example:<RK7Query> <RK7CMD CMD="CreateOrder" openTime="2025-04-17T10:00:00" duration="T05:00:00" holder="ООО Рога и Копыта"> <Table code="44"/> <Waiter code = "1"/> </RK7CMD> </RK7Query>
XMLTo get the banquet order properties, use the GetOrder request:
<RK7Query> <RK7CMD CMD="GetOrder"> <Order guid="{871891FB-FFC3-40D7-B2E0-4D30853E88EE}"/> </RK7CMD> </RK7Query>
XMLTo add a dish to an order, use the SaveOrder request:
<RK7Query> <RK7CMD CMD="SaveOrder"> <Order guid="{871891FB-FFC3-40D7-B2E0-4D30853E88EE}"/> <Session> <Dish code="18" quantity="1000"/> </Session> </RK7CMD> </RK7Query>
CODE
Deleting Dish from Order
The deleting dish request structure is similar to that of filling in the order:
<RK7Query>
<RK7CMD CMD="SaveOrder">
<Order guid="{871891FB-FFC3-40D7-B2E0-4D30853E88EE}"/>
<Session>
<Dish code="18" quantity="1000"/>
</Session>
</RK7CMD>
</RK7Query>
Deleting Order
Befor deleting an order, you should clear it. Only an empty order can be deleted
<RK7Query>
<RK7CMD CMD="CloseVisit" VisitID="393873942"/>
</RK7Query>
Getting the request:
<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
<RK7CMD CMD="GetPrintLayout" TextReport="1" >
<Layout id="1001922">
</Layout>
</RK7CMD>
</RK7Query>
List of Operations Performed at Cash Station
<RK7Query>
<RK7Command CMD="GetDocByLayout">
<Layout code="12083"/>
</RK7Command>
</RK7Query>