Introduction

There are two ways of using an XML protocol: HTTP transport and win32dll buffers.

From the client’s point of view, the interface is the RK7XML.dll library that provides the following calls:

function CallRK7XMLRPC
function CallRK7XMLRPCToStream
procedure SetUseTempFileLimit
function GetDLLVersion
function CallRK7XMLRPC2
function CallRK7XMLRPCToStream2
function GetLastXMLResult
function GetLastXMLResultToStream
procedure SetCryptKey
CODE

See a detailed description in the file rk7xmli.pas

A version number can be checked through GetDLLVersion.

To start working, you should call SetCryptKey and indicate the session encryption key.

The idea is that this library is a transport layer for an XML protocol. It is enough to use one function, for example, CallRK7XMLRPCToStream2 that reads a query from the flow and returns its response to the flow (it is recommended to use the functions having number 2 as they support the extended functionality).

RKeeper 7 Setup to work over the HTTP Protocol

To work with an XML interface over HTTP, you should setup R-Keeper accordingly.

POS Server Setup

  1. Create a right for HTTP in the POS server properties, in the HTTP restrictionssection;
  2. In the HTTP serversection, specify the port through which the connection will be established (POS server ports and directory server ports must be different).

Directory Server Setup

  1. Create a right for HTTP in the POS server properties (or use an existing right) in the HTTP restrictionssection;
  2. In the HTTP serversection, specify the port through which the connection will be established (POS server ports and directory server ports must be different).

User Setup for Connection

  1. Create a user with administrator rights and name that user in Latin characters as Russian ones will not be accepted; 2. In the user’s role properties, check the previously created rule in the Object Privileges section

Starting from version 7.5.3, you can use the HTTPS interface, for example, through the wget:

C:\soft\gnuwin32here\bin\wget.exe --secure-protocol=TLSv1 --no-check-certificate --header="Content-Type: text/xml" --http-user=9006 --http-password=9006 --post-file=reqRestItemRK.xml https://127.0.0.1:777/rk7api/v0/xmlinterface.xml 
CODE

or curl

curl  -k -u user:7 -i -X  POST -H "Content-Type: text/xml" -d @xml.txt "https://192.168.101.82:3355/rk7api/v0/xmlinterface.xml"
CODE

or otherwise. Please do not confuse the ports that connect to correspondent servers.

Making an Exchange

The exchange consists in commands (queries) and responses. Example of such command:

<?xml version="1.0" encoding="windows-1251"?>
<RK7Query>
  <RK7CMD CMD="GetSystemInfo"/>
</RK7Query>
XML

response:

<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.2.34" XmlVersion="66" Status="Ok" CMD="GetSystemInfo" ErrorText="" DateTime="2013-02-15T17:05:33" WorkTime="0" Processed="1">
	<SystemInfo SystemTime="3570109533742" ReqSysVer="2" NetName="TEST_RK7SRV_COUNT"/>
</RK7QueryResult>
XML

Let’s try to obtain something more interesting such as a list of collections:

<?xml version="1.0" encoding="windows-1251"?>
<RK7Query>
<RK7CMD CMD="GetRefList"/>
</RK7Query>
XML

response:

<?xml version="1.0" encoding="utf-8"?><RK7QueryResult ServerVersion="7.5.3.214" XmlVersion="180" Status="Ok" CMD="GetRefList" ErrorText="" DateTime="2015-03-26T20:07:11" WorkTime="141" Processed="1">
	<RK7RefList Count="160">
		<RK7Reference RefName="ALIASES" Count="20" DataVersion="84"/>
		<RK7Reference RefName="ALIASLANGUAGES" Count="29" DataVersion="116"/>
		<RK7Reference RefName="AWARDSPENALTIESGROUPS" Count="3" DataVersion="27"/>
		<RK7Reference RefName="AWARDSPENALTIESTYPES" Count="10" DataVersion="17"/>
		<RK7Reference RefName="BANDEDPROPSRIGHTS" Count="9" DataVersion="10"/>
		<RK7Reference RefName="BASEDIALECT" Count="3" DataVersion="16"/>
		<RK7Reference RefName="BONUSTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="BRIGADES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="BUSINESSPERIODS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="CASHES" Count="4" DataVersion="38"/>
		<RK7Reference RefName="CASHGROUPS" Count="2" DataVersion="27"/>
		<RK7Reference RefName="CASHREPORTDETAILS" Count="79" DataVersion="320"/>
		<RK7Reference RefName="CASHSERVDATASTATUSES" Count="1" DataVersion="28"/>
		<RK7Reference RefName="CATEGLIST" Count="10" DataVersion="89"/>
		<RK7Reference RefName="CHANGEABLEORDERTYPES" Count="2" DataVersion="10"/>
		<RK7Reference RefName="CHECKTABLES" Count="43" DataVersion="172"/>
		<RK7Reference RefName="CLASSIFICATORGROUPS" Count="11" DataVersion="45"/>
		<RK7Reference RefName="CLASSINFOGROUPS" Count="19" DataVersion="72"/>
		<RK7Reference RefName="CLASSINFOS" Count="191" DataVersion="764"/>
		<RK7Reference RefName="COLORMAPPINGS" Count="97" DataVersion="324"/>
		<RK7Reference RefName="COLORSCHEMES" Count="5" DataVersion="24"/>
		<RK7Reference RefName="CONSUMATORS" Count="1" DataVersion="2"/>
		<RK7Reference RefName="CONSUMTYPES" Count="2" DataVersion="6"/>
		<RK7Reference RefName="CUBEDIALECTS" Count="1" DataVersion="8"/>
		<RK7Reference RefName="CURRENCIES" Count="14" DataVersion="111"/>
		<RK7Reference RefName="CURRENCYFACEVALUES" Count="52" DataVersion="79"/>
		<RK7Reference RefName="CURRENCYTYPES" Count="7" DataVersion="14"/>
		<RK7Reference RefName="DEFAULTERTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="DEPOSITCOLLECTREASONS" Count="1" DataVersion="2"/>
		<RK7Reference RefName="DEVICEDATALOOKUPITEMS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="DEVICEDRIVERS" Count="1" DataVersion="0"/>
		<RK7Reference RefName="DEVICES" Count="18" DataVersion="82"/>
		<RK7Reference RefName="DISCOUNTCOMPOSITIONS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="DISCOUNTDETAILS" Count="10" DataVersion="13"/>
		<RK7Reference RefName="DISCOUNTS" Count="10" DataVersion="46"/>
		<RK7Reference RefName="DISCOUNTTYPES" Count="3" DataVersion="27"/>
		<RK7Reference RefName="DISPLAYRESOLUTIONS" Count="13" DataVersion="13"/>
		<RK7Reference RefName="DOCUMENTMAKETSCHEMELINKS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="DOCUMENTS" Count="100" DataVersion="404"/>
		<RK7Reference RefName="DOSINGDEVICES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="EMPLOYEEGROUPDETAILS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="EMPLOYEEGROUPS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="EMPLOYEES" Count="20" DataVersion="553"/>
		<RK7Reference RefName="ENTRANCECARDTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="EXTBASECONFIGS" Count="9" DataVersion="91"/>
		<RK7Reference RefName="FILTERS" Count="41" DataVersion="191"/>
		<RK7Reference RefName="FISCDEVPARAMS" Count="36" DataVersion="36"/>
		<RK7Reference RefName="FORMDETAILS" Count="344" DataVersion="1119"/>
		<RK7Reference RefName="FORMS" Count="84" DataVersion="334"/>
		<RK7Reference RefName="FORMSCHEMECHILDS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="FORMSCHEMES" Count="7" DataVersion="25"/>
		<RK7Reference RefName="FUNCTIONKEYGROUPS" Count="78" DataVersion="207"/>
		<RK7Reference RefName="FUNCTIONKEYS" Count="1112" DataVersion="4393"/>
		<RK7Reference RefName="FUNDSACCOUNTINGPLACES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="GENERATEDPROPDATAS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="GENERATEDPROPTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="GLOBALSHIFTS" Count="24" DataVersion="22"/>
		<RK7Reference RefName="GLOBALSHIFTSTATS" Count="23" DataVersion="47"/>
		<RK7Reference RefName="GUESTTYPES" Count="1500" DataVersion="3002"/>
		<RK7Reference RefName="HALLPLANS" Count="5" DataVersion="157"/>
		<RK7Reference RefName="IMAGELIST" Count="84" DataVersion="88"/>
		<RK7Reference RefName="IMAGENODES" Count="863" DataVersion="3699"/>
		<RK7Reference RefName="INPDEVTYPES" Count="6" DataVersion="24"/>
		<RK7Reference RefName="IR_DATASETFIELDS" Count="408" DataVersion="1636"/>
		<RK7Reference RefName="IR_DATASETPARAMETERS" Count="182" DataVersion="732"/>
		<RK7Reference RefName="IR_DATASETS" Count="66" DataVersion="264"/>
		<RK7Reference RefName="IR_DATASETSGROUPS" Count="11" DataVersion="55"/>
		<RK7Reference RefName="IR_LASTPARAMETERSVALSBYUSER" Count="0" DataVersion="1"/>
		<RK7Reference RefName="IR_LINKCONFIG" Count="2" DataVersion="12"/>
		<RK7Reference RefName="IR_LINKCONFIGDETAIL" Count="0" DataVersion="1"/>
		<RK7Reference RefName="IR_REPORTDATASETS" Count="205" DataVersion="824"/>
		<RK7Reference RefName="IR_REPORTS" Count="102" DataVersion="510"/>
		<RK7Reference RefName="IR_USEPARAMETERSBYDATASET" Count="183" DataVersion="736"/>
		<RK7Reference RefName="KBDLAYOUTS" Count="5" DataVersion="24"/>
		<RK7Reference RefName="KBDTYPES" Count="14" DataVersion="15"/>
		<RK7Reference RefName="KURSES" Count="2" DataVersion="4"/>
		<RK7Reference RefName="LINKEDSYSTEMSCONFS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="LINKEDSYSTEMSTYPES" Count="4" DataVersion="5"/>
		<RK7Reference RefName="MAKETS" Count="164" DataVersion="669"/>
		<RK7Reference RefName="MAKETSCHEMEDETAILS" Count="177" DataVersion="180"/>
		<RK7Reference RefName="MAKETSCHEMES" Count="13" DataVersion="17"/>
		<RK7Reference RefName="MCRALGORITHMS" Count="23" DataVersion="86"/>
		<RK7Reference RefName="MENUITEMS" Count="30" DataVersion="105"/>
		<RK7Reference RefName="MODIFIERS" Count="30" DataVersion="37"/>
		<RK7Reference RefName="MODIGROUPS" Count="11" DataVersion="99"/>
		<RK7Reference RefName="MODISCHEMEDETAILS" Count="8" DataVersion="18"/>
		<RK7Reference RefName="MODISCHEMES" Count="5" DataVersion="31"/>
		<RK7Reference RefName="OLAPCUBEEXTENDEDFIELDS" Count="4" DataVersion="16"/>
		<RK7Reference RefName="OLAPCUBEFIELDSDETAILS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="OLAPCUBES" Count="84" DataVersion="825"/>
		<RK7Reference RefName="OLAPCUBESCHEMES" Count="29" DataVersion="114"/>
		<RK7Reference RefName="OLAPCUBESTATUSES" Count="55" DataVersion="1085"/>
		<RK7Reference RefName="OLAPREPORTGROUPS" Count="56" DataVersion="56"/>
		<RK7Reference RefName="OLAPREPORTRIGHTS" Count="4" DataVersion="5"/>
		<RK7Reference RefName="OLAPREPORTS" Count="93" DataVersion="470"/>
		<RK7Reference RefName="OPERATIONCLASSES" Count="32" DataVersion="124"/>
		<RK7Reference RefName="OPERATIONS" Count="368" DataVersion="1416"/>
		<RK7Reference RefName="ORDERVOIDS" Count="8" DataVersion="10"/>
		<RK7Reference RefName="PARAMETEREXCEPTIONS" Count="14" DataVersion="15"/>
		<RK7Reference RefName="PARAMETERHIERARHIES" Count="51" DataVersion="200"/>
		<RK7Reference RefName="PARAMETERS" Count="271" DataVersion="1236"/>
		<RK7Reference RefName="PERIODDETAILS" Count="2" DataVersion="3"/>
		<RK7Reference RefName="PERIODS" Count="2" DataVersion="7"/>
		<RK7Reference RefName="PRICECONSTANTS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="PRICECONSTANTTYPES" Count="1" DataVersion="2"/>
		<RK7Reference RefName="PRICEFORMULAS" Count="12" DataVersion="17"/>
		<RK7Reference RefName="PRICES" Count="330" DataVersion="433"/>
		<RK7Reference RefName="PRICETYPES" Count="3" DataVersion="20"/>
		<RK7Reference RefName="PRICEVALUES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="PRINTERPURPOSES" Count="9" DataVersion="40"/>
		<RK7Reference RefName="PRIVILEGEGROUPS" Count="8" DataVersion="32"/>
		<RK7Reference RefName="PRIVILEGES" Count="99" DataVersion="396"/>
		<RK7Reference RefName="RATECLASSES" Count="5" DataVersion="14"/>
		<RK7Reference RefName="REFLINKS" Count="503" DataVersion="1836"/>
		<RK7Reference RefName="REFRESOURCES" Count="5" DataVersion="89"/>
		<RK7Reference RefName="REPORTINGSERVERS" Count="3" DataVersion="89"/>
		<RK7Reference RefName="REPORTSERVERGROUPS" Count="2" DataVersion="6"/>
		<RK7Reference RefName="REPORTSERVERSYNCITEMS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="RESTAURANTCONCEPTS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="RESTAURANTFRANCHISES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="RESTAURANTREGIONS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="RESTAURANTS" Count="3" DataVersion="25"/>
		<RK7Reference RefName="RIGHTGROUPS" Count="1" DataVersion="12"/>
		<RK7Reference RefName="RIGHTS" Count="2" DataVersion="3"/>
		<RK7Reference RefName="RKINTACCESS" Count="1" DataVersion="360"/>
		<RK7Reference RefName="RKINTDEALER" Count="393" DataVersion="411"/>
		<RK7Reference RefName="RKINTINSTALLER" Count="3703" DataVersion="3900"/>
		<RK7Reference RefName="RKINTSTRUCTURE" Count="9" DataVersion="38"/>
		<RK7Reference RefName="ROLES" Count="15" DataVersion="84"/>
		<RK7Reference RefName="SALEDATAS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="SCHEDULEDREPORTRECIPIENTS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="SCHEDULEDREPORTS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="SCRIPTS" Count="22" DataVersion="87"/>
		<RK7Reference RefName="SCRIPTTYPES" Count="12" DataVersion="48"/>
		<RK7Reference RefName="SELECTORDETAILS" Count="1588" DataVersion="3780"/>
		<RK7Reference RefName="SELECTORGROUPS" Count="95" DataVersion="376"/>
		<RK7Reference RefName="SELECTORHIERARHIES" Count="61" DataVersion="242"/>
		<RK7Reference RefName="SELECTORS" Count="174" DataVersion="707"/>
		<RK7Reference RefName="SELECTORTYPES" Count="51" DataVersion="204"/>
		<RK7Reference RefName="SELECTORTYPEVSTRADEOBJ" Count="83" DataVersion="332"/>
		<RK7Reference RefName="SERVICECHECKS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="SERVICESCHEMES" Count="1" DataVersion="3"/>
		<RK7Reference RefName="SERVINGPOSITIONS" Count="1" DataVersion="23"/>
		<RK7Reference RefName="STOREHOUSECONFIGS" Count="1" DataVersion="2"/>
		<RK7Reference RefName="SYNCDATAS" Count="0" DataVersion="1"/>
		<RK7Reference RefName="TABLEATTRIBUTES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="TABLEGROUPS" Count="1" DataVersion="19"/>
		<RK7Reference RefName="TABLES" Count="18" DataVersion="36"/>
		<RK7Reference RefName="TARIFFDETAILS" Count="2" DataVersion="4"/>
		<RK7Reference RefName="TARIFFICATIONTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="TAXDISHRULES" Count="3" DataVersion="4"/>
		<RK7Reference RefName="TAXDISHTYPES" Count="3" DataVersion="4"/>
		<RK7Reference RefName="TAXES" Count="1" DataVersion="2"/>
		<RK7Reference RefName="TAXPAYRULES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="TAXPAYTYPES" Count="0" DataVersion="1"/>
		<RK7Reference RefName="TAXRATES" Count="3" DataVersion="4"/>
		<RK7Reference RefName="TRADEGROUPDETAILS" Count="6" DataVersion="7"/>
		<RK7Reference RefName="TRADEGROUPS" Count="4" DataVersion="20"/>
		<RK7Reference RefName="UNCHANGEABLEORDERTYPES" Count="1" DataVersion="2"/>
		<RK7Reference RefName="WARNGROUPS" Count="0" DataVersion="1"/>
	</RK7RefList>
</RK7QueryResult>
XML

Now let’s request a specific collection and look into working with filters through the example of this query.

When making the query:

<?xml version="1.0" encoding="windows-1251"?>
<RK7Query>
<RK7CMD CMD="GetRefData" RefName="AWARDSPENALTIESGROUPS"/>
</RK7Query>
XML

the response will be:

<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.2.34" XmlVersion="66" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2013-02-15T17:56:04" WorkTime="0" Processed="1">
	<RK7Reference ClassName="TAwardPenaltyGroups" Name="AWARDSPENALTIESGROUPS" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="0" ChildRight="0" DeleteRight="0" XMLExport="True" XMLMask="*" LeafCollectionCount="1">
		<Items>
			<Item Ident="0" ItemIdent="0" SourceIdent="0" GUIDString="{22149C1B-CC53-4EC4-A46C-5A23E512CC7A}" AssignChildsOnServer="False" MainParentIdent="0" ActiveHierarchy="False" Name="Все" AltName="All" Code="0" Status="rsDraft" editRight="0">
				<Childs ClassName="tChildCollection">
					<Child ChildIdent="1000015" IsTerminal="0"/>
				</Childs>
			</Item>
			<Item Ident="1000015" ItemIdent="1000015" SourceIdent="0" GUIDString="{1CF4DC82-3B32-4310-8864-E7A940F5E980}" AssignChildsOnServer="False" MainParentIdent="0" ActiveHierarchy="True" Name="general" AltName="" Code="1" Status="rsActive" editRight="0">
				<Childs ClassName="tChildCollection">
					<Child ChildIdent="1000016" IsTerminal="1"/>
					<Child ChildIdent="1000199" IsTerminal="1"/>
				</Childs>
			</Item>
		</Items>
	</RK7Reference>
</RK7QueryResult>
XML

or, for example:

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
	<RK7CMD CMD="GetRefData" RefName="MenuItems"/>
</RK7Query>
XML

The response will be the Menu Items collection (i. e. the menu directory):

<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.4.21.112" XmlVersion="44" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2013-05-15T19:57:38" WorkTime="0" Processed="1">
	<RK7Reference BlobNames="INSTRUCT,LARGEIMAGEPATH" ClassName="TRK7MenuItems" Name="MENUITEMS" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="21" ChildRight="21" DeleteRight="21" XMLExport="True" XMLMask="*" LeafCollectionCount="1">
		<Items>
			<Item Ident="0" ItemIdent="0" SourceIdent="0" GUIDString="{E501341F-060C-4FC5-B89A-5403095E73E6}" AssignChildsOnServer="False" MainParentIdent="0" ActiveHierarchy="False" Code="0" Name="" AltName="" Status="rsDraft" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" SalesTerms_Flag="[]" SalesTerms_StartSale="0" SalesTerms_StopSale="0" RightLvl="0" TaxDishType="0" ExtCode="0" ShortName="" AltShortName="" PortionWeight="0" PortionName="" AltPortion="" Kurs="0" QntDecDigits="0" ModiScheme="0" ComboScheme="0" ModiWeight="0" CookMins="0" Comment="" Instruct="" Flags="[]" TaraWeight="0" ConfirmQnt="0" MInterface="0" MinRestQnt="0" BarCodes="" PriceMode="pmPerPiece" OpenPrice="False" DontPack="False" ChangeQntOnce="False" CategPath="" SaleObjectType="sotMenuItem" ComboJoinMode="cjmNone" AddLineMode="almJoinLines" ChangeToCombo="0" GuestsDishRating="300" RateType="rtOneTime" MinimumTarifTime="0" MaximumTarifTime="0" IgnoredTarifTime="0" MinTarifAmount="0" MaxTarifAmount="0" RoundTime="0" TariffRoundRule="trrMath" MoneyRoundRule="rr1Cent" DefTarifTimeLimit="0" ComboDiscount="0" LargeImagePath="" HighLevelGroup1="0" HighLevelGroup2="0" HighLevelGroup3="0" HighLevelGroup4="0" BarCodesText="">
				<RecommendedMenuItems ClassName="TRecommendedMenuItems">
					<Items/>
				</RecommendedMenuItems>
				<Childs ClassName="tChildCollection">
					<Child ChildIdent="1000011" IsTerminal="0"/>
				</Childs>
			</Item>
			<Item Ident="1000011" ItemIdent="1000011" SourceIdent="0" GUIDString="{5B3537CE-ECF0-4D6A-B0AE-F095FC4F0513}" AssignChildsOnServer="False" MainParentIdent="1000010" ActiveHierarchy="True" Code="2" Name="кофе" AltName="" Status="rsActive" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" SalesTerms_Flag="[]" SalesTerms_StartSale="3577808296547" SalesTerms_StopSale="3577808296547" RightLvl="0" TaxDishType="1" ExtCode="1" ShortName="" AltShortName="" PortionWeight="0" PortionName="" AltPortion="" Kurs="0" QntDecDigits="0" ModiScheme="0" ComboScheme="0" ModiWeight="0" CookMins="0" Comment="" Instruct="" Flags="[]" TaraWeight="0" ConfirmQnt="0" MInterface="0" MinRestQnt="0" BarCodes="" PriceMode="pmPerPiece" OpenPrice="False" DontPack="False" ChangeQntOnce="False" CategPath="Бар" SaleObjectType="sotMenuItem" ComboJoinMode="cjmNone" AddLineMode="almJoinLines" ChangeToCombo="0" GuestsDishRating="300" RateType="rtOneTime" MinimumTarifTime="0" MaximumTarifTime="0" IgnoredTarifTime="0" MinTarifAmount="0" MaxTarifAmount="0" RoundTime="1" TariffRoundRule="trrMath" MoneyRoundRule="rr1Cent" DefTarifTimeLimit="0" ComboDiscount="0" LargeImagePath="" HighLevelGroup1="1000010" HighLevelGroup2="0" HighLevelGroup3="0" HighLevelGroup4="0" BarCodesText="">
				<RecommendedMenuItems ClassName="TRecommendedMenuItems">
					<Items/>
				</RecommendedMenuItems>
				<Childs ClassName="tChildCollection"/>
			</Item>
		</Items>
	</RK7Reference>
</RK7QueryResult>
XML

Another useful directory is the list of item groups:

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
	<RK7CMD CMD="GetRefData" RefName="CATEGLIST" WithMacroProp="1"/>
</RK7Query>
<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.3.1" XmlVersion="88" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2013-05-16T18:49:20" WorkTime="0" Processed="1">
	<RK7Reference ClassName="TCategListItems" Name="CATEGLIST" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="21" ChildRight="116" DeleteRight="21" XMLExport="True" XMLMask="*" LeafCollectionCount="1">
		<Items>
			<Item Ident="1000010" ItemIdent="1000010" SourceIdent="0" GUIDString="{85A6B558-D59B-44F2-A103-031E473D6842}" AssignChildsOnServer="False" MainParentIdent="0" ActiveHierarchy="True" Code="1" Name="Bar" AltName="" Status="rsActive" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" Comment="" Parent="0" AddToOrder="False" ExtCode="1" EditRight="0" RightLvl="0" GENERATEDPROPTYPES-0="" SELECTORGROUPS-0="0" SELECTORGROUPS-2="0">
				<Childs ClassName="tChildCollection">
					<Child ChildIdent="1000011" IsTerminal="1"/>
				</Childs>
			</Item>
			<Item Ident="1000017" ItemIdent="1000017" SourceIdent="0" GUIDString="{85A6B558-D59B-44F2-A103-031E473D6843}" AssignChildsOnServer="False" MainParentIdent="0" ActiveHierarchy="True" Code="12" Name="Kitchen" AltName="" Status="rsActive" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" Comment="" Parent="0" AddToOrder="False" ExtCode="12" EditRight="0" RightLvl="0" GENERATEDPROPTYPES-0="" SELECTORGROUPS-0="0" SELECTORGROUPS-2="0">
				<Childs ClassName="tChildCollection"/>
			</Item>
		</Items>
	</RK7Reference>
</RK7QueryResult>
XML

Object Recording

Recording commands are supported only on the directory server.

Below there are minimum allowed sets of object attributes. A relevant directory should be read to obtain the list of all object attributes.

Recording logic is inserting or updating. GUIDString is considered the key attribute. Parent objects are linked through the MainParentGUID attribute. If some attributes are not filled in, they are ignored. If an attribute should have an empty value, please indicate «». Records are deleted by setting the rsDeleted status but in reality they are not deleted from the database.

Getting the Menu

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
    <RK7CMD CMD="GetRefData" RefName="MenuItems"/>
</RK7Query>
XML

Inserting an Item

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
    <RK7Command CMD="SetRefData" RefName="MenuItems">
        <Items>
            <Item GUIDString="{5B3537CE-ECF0-4D6A-B0AE-F095FC4F0522}" MainParentIdent="{a70ab9c0-934b-49e4-91a8-cb2e85f1cbf2}" Code="3" Name="Other tea" AltName="" Status="rsActive" TaxDishType="1" ExtCode="3" PRICETYPES-0="1000"/>
<Item GUIDString="{5a76323c-3a58-4bd8-8a91-478ca2568ecc}" MainParentIdent="{85A6B558-D59B-44F2-A103-031E473D6843}" Code="33" Name="Fish" AltName="" Status="rsActive" TaxDishType="1" ExtCode="33" PRICETYPES-0="5000" CLASSIFICATORGROUPS-2560="27"/>
<Item GUIDString="{5e787f73-da50-438c-96f9-70926422ef45}" MainParentIdent="{85A6B558-D59B-44F2-A103-031E473D6843}" Code="32" Name="Patty" AltName="" Status="rsActive" TaxDishType="1" ExtCode="32" PRICETYPES-0="19040" CLASSIFICATORGROUPS-2560="27"/>
<Item GUIDString="{d9fd4966-478a-48ef-b6af-1f5f9d998d43}" MainParentIdent="{d85701de-d4c2-4843-9d49-55228e506738}" Code="31" Name="Sweet bun" AltName="" Status="rsActive" TaxDishType="1" ExtCode="31" PRICETYPES-0="8000" CLASSIFICATORGROUPS-2560="27"/>
<Item GUIDString="{feeabc44-673c-4898-aa08-c199fc1174c5}" MainParentIdent="{5e5d99e1-3c3a-49f3-8036-85c15f15ca0d}" Code="30" Name="Milk tea" AltName="" Status="rsActive" TaxDishType="1" ExtCode="30" PRICETYPES-0="9000" CLASSIFICATORGROUPS-2560="27"/>
        </Items>
    </RK7Command>
</RK7Query>
XML

Attribute

Value type


GUIDString

GUID

Unique Object ID

MainParentIdent

GUID/Ident

reference to the parent. The parent must exist or be already present in an xml

Code

Integer

Object code (a unique one, for quick access)

ExtCode

Integer

External object code (a unique one, for external systems)

Name

string

item name

Status

rsActive, rsInactive, rsDeleted

Object status (active (available), unavailable, deleted)

PRICETYPES-0

integer

price (in kopeks) for the price type (0 by default)

TaxDishType

integer

tax type

CLASSIFICATORGROUPS-2560

GUID/Ident

reference to the category where 2560 is the classification ID

You can indicate several prices and attribute a dish to several categories

Result:

<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.3.1" XmlVersion="88" Status="Ok" Processed="1">
    <CommandResult CMD="SetRefData" Status="Ok" ErrorText="" DateTime="2013-05-16T18:16:18" WorkTime="16"/>
</RK7QueryResult>
XML

Insertion of Extended Properties

<RK7Query>
        <RK7Command CMD="SetRefData" RefName="MenuItems">
                <Items>
                        <Item GUIDString="{DA3434A6-AEC3-4D4B-B982-9AE2BD9BA83F}" genBGU="test" Status="rsActive"/>
                </Items>
        </RK7Command>
</RK7Query>
XML

where the extended property is called BGU but you have to indicate genBGU. In version 7.5.4, to make changes to an extended property over the XML interface, you should complement the main type of the extended property with another type having the 2560 ID (it does not have a name in the list of types; the icon is a white sheet).

Creation of Item Groups

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
    <RK7Command CMD="SetRefData" RefName="CATEGLIST">
        <Items>
  <Item GUIDString="{85A6B558-D59B-44F2-A103-031E473D6843}" Code="20" Name="Kitchen" AltName="" Status="rsActive" ExtCode="12" />
  <Item GUIDString="{a70ab9c0-934b-49e4-91a8-cb2e85f1cbf2}" MainParentIdent="{85A6B558-D59B-44F2-A103-031E473D6843}"  Code="13" Name="Second courses" AltName="" Status="rsActive" ExtCode="14" />
  <Item GUIDString="{5e5d99e1-3c3a-49f3-8036-85c15f15ca0d}" Code="21" Name="Bar" AltName="" Status="rsActive" ExtCode="16" />
  <Item GUIDString="{d85701de-d4c2-4843-9d49-55228e506738}" Code="22" Name="Other" AltName="" Status="rsActive" ExtCode="19" /> 
        </Items>
    </RK7Command>
</RK7Query>
XML

Mandatory fields:

Attribute

Value type


GUIDString

GUID

Unique Object ID

MainParentIdent

GUID

reference to the parent. The parent must exist or be already present in an xml

Name

string

item name

Additional fields:

Code

Integer

Object code (a unique one, for quick access)

AltName

string

Alternative name

ExtCode

Integer

External object code (a unique one, for external systems)

Status

rsActive, rsInactive, rsDeleted

Object status (active (available), unavailable, deleted)

the successful result:

<?xml version="1.0" encoding="utf-8"?>
<RK7QueryResult ServerVersion="7.5.3.1" XmlVersion="88" Status="Ok" Processed="1">
    <CommandResult CMD="SetRefData" Status="Ok" ErrorText="" DateTime="2013-05-16T18:49:12" WorkTime="0"/>
</RK7QueryResult>
XML

Creation of Classifications

Please remember that there is a limit to the number of classifications. Once it is reached, the server returns an error.

<?xml version="1.0" encoding="utf-8" ?> 
  <RK7Query>
    <RK7Command CMD="SetRefData" RefName="classificatorgroups">
      <Items>
      	<Item Status="3" Name="New classification" AltName="New Classification" Ident="1024" GUIDString="{72DEC7B5-C57E-4A96-ACEB-881ABB35F06A}" /> 
      </Items>
    </RK7Command>
  </RK7Query>
XML

Please remember that when generating a new classification, the Ident has to be indicated manually and to be a multiple of 256. Everything that is not a multiple of 256 is considered a category.

Mandatory fields:

Attribute

Value type


GUIDString

GUID

Unique Object ID

Ident

Integer

Unique Object ID

Name

string

item name

Creation of Categories

<?xml version="1.0" encoding="utf-8" ?> 
<RK7Query>
  <RK7Command CMD="SetRefData" RefName="classificatorgroups">
    <Items>
      <Item Status="3" Name="new category" AltName="new category" MainParentIdent="768" Ident="773" GUIDString="{5C6C9489-9B22-4248-ABB4-85498686E4CE}" /> 
    </Items>
  </RK7Command>
</RK7Query>
When generating a category, the Ident also has to be indicated manually; it has to be greater than MainParentIdent and less than (MainParentIdent + 256).
XML

Mandatory fields:

Attribute

Value type


GUIDString

GUID

Unique Object ID

MainParentIdent

GUID

reference to the parent classification. The parent must exist or be already present in an xml

Ident

Integer

Unique Object ID

Name

string

item name

Creation of Modifier Schemes

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
  <RK7Command CMD="SetRefData" RefName="modischemes">
    <Items>
      <Item GUIDString="{644BDCC5-9211-4B45-B114-3C73722E9117}" 
            Code="3" 
            Name="Scheme for sauces" 
            AltName="Scheme sauce" 
            MainParentIdent="0" 
            Status="3" 
            ModiSchemeType="1" 
            AutoOpen="0" 
            IgnoreDefaultForKitchen="0"  
            />
    </Items>
  </RK7Command>
</RK7Query>
XML

Mandatory fields:

Attribute

Value type


GUIDString

GUID

Unique Object ID

MainParentIdent

GUID

reference to the parent classification. The parent must exist or be already present in an xml

Name

string

item name

where:

SalesTerms_StartSale means the sales start date SalesTerms_StopSale means the sales end date PRICETYPES-1000231 means the price in kopeks for the price type having the Ident = 1000231 TRADEGROUPS-1000132=«3» means specifying a value for an item group having the Ident = 1000132

Creation of Modifier Schemes

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
  <RK7Command CMD="SetRefData" RefName="modischemes">
    <Items>
      <Item GUIDString="{644BDCC5-9211-4B45-B114-3C73722E9117}" 
            Code="3" 
            Name="Scheme for sauces" 
            AltName="Scheme sauce" 
            MainParentIdent="0" 
            Status="3" 
            ModiSchemeType="1" 
            AutoOpen="0" 
            IgnoreDefaultForKitchen="0"  
            />
    </Items>
  </RK7Command>
</RK7Query>
XML

where:

MainParentIdent is the parent set if there is a ModiSchemeType (scheme type) AutoOpen means automatic opening IgnoreDefaultForKitchen means ignoring the default option

Assigning a Modifier Scheme to a Dish

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
  <RK7Command CMD="SetRefData" RefName="menuitems">
    <Items>
      <Item GUIDString="{A94581EE-E6F7-4063-8275-0E35E4E9726F}" 
            ModiScheme="100013" />
    </Items>
  </RK7Command>
</RK7Query>
XML

where ModiScheme is the Ident of the modifier scheme.

Combo Dish Recording

Creation of a Combo Group

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
	<RK7CMD CMD="SetRefData" RefName="ModiSchemes">
		<Items>
			<Item 	GUIDString="{e107f57a-97ae-4d94-946b-761335e602ab}"
					ModiSchemeType="mstCombo"
					MainParentIdent="0"
					Name="Test Combo Scheme"
					Status="rsActive"/>
		</Items>
	</RK7CMD>
</RK7Query>
XML

ModiSchemeType is the scheme type, a constant

Creation of a Combo Element

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
	<RK7CMD CMD="SetRefData" RefName="Modifiers">
		<Items>
			<Item 	GUIDString="{3d19a58a-abb3-4e27-8364-3e18b429f3e5}"
					MainParentIdent="{ccfbaa92-5cdb-4c30-9d01-54343d66c830}"
					Dish="{D9085A2B-A618-4268-9EC7-E5C8AFEAE442}"
					Name="Combo Dish"
					PRICETYPES-3="3000"
					Status="rsActive"/>
		</Items>
	</RK7CMD>
</RK7Query>
XML

MainParentIdent is the combo group identifier Dish is the guid of a dish being added PRICETYPES-3 is specifying the price, please indicate the price type identifier instead of 3. The amount is indicated in kopeks, i. e. multiplied by 100. You can specify several price types.

Filling in a Combo Scheme, Detailing

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
	<RK7CMD CMD="SetRefData" RefName="ModiSchemeDetails">
		<Items>
			<Item 	GUIDString="{642f29bd-4ea5-4680-b5ab-596a2a0a2d83}"
					ModiScheme="1001027"
					ModiGroup="1001026"
					DefaultModifier="1001029"
					DownLimit="1"
					UpLimit="2"
					Flags="[msoUpLimited,msoDownLimited,msoReplaceDefModifier]"
					Status="rsActive"/>
		</Items>
	</RK7CMD>
</RK7Query>
XML

ModiScheme is the modifier scheme Ident ModiGroup is the modifier group Ident DefaultModifier is the default dish DownLimit is the minimum number of elements UpLimit is the maximum number of elements Flags are constants, properties

Adding a Combo Dish to the Menu

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
	<RK7CMD CMD="SetRefData" RefName="MenuItems">
		<Items>
			<Item 	GUIDString="{efbcd72c-a6ef-4c7b-98cd-cd7ae541a717}"
					MainParentIdent="1000974"
					code="1025"
					Name="Combo by XML"
					SaleObjectType="sotComboMenuItem"
					ComboScheme="1001027"										
					Status="rsActive"/>
		</Items>
	</RK7CMD>
</RK7Query>
XML

MainParentIdent is the parent folder Ident in the menu; code is the dish code; name is the dish name; SaleObjectType is the menu object type, indicated constant for combo dishes; ComboScheme is the combo scheme Ident

Working with Orders

Delivery Order

<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>
XML

List of orders

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7Command CMD="GetOrderList" >
 </RK7Command>
</RK7Query>
XML

Order

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7Command CMD="GetOrder">
  <Order guid="{577FFA69-348A-41D7-810B-CF0A32489BE1}"/>
 </RK7Command>
</RK7Query>
XML

or by the visit+orderident combination:

 <?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7Command CMD="GetOrder">
  <Order visit="543555" ident="256"/>
 </RK7Command>
</RK7Query>
XML

Creation of a New Order

To create a new order, the following query is necessary:

<?xml version="1.0" encoding="UTF-8"?>
<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>
XML

The only mandatory parameter here is the table Parameters: PersistentComment is a savable comment to an order; Table is a table. Access is granted when indicating any of its fields: code, ident or guid. Similarly to all other parameters; Waiter is the waiter on whose behalf an order is created. If the Waiter is not specified, an order is created by the system; Station is the station; GuestType is a guest type; In the <Guests> section you indicate guests and enter their names. Once an empty order is created, the following response is sent:

<?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"/>
XML

To continue working, this response must contain either the visit + orderid combination or the guid. In this example we use the visit + orderid key.

To fill an order, the following query is sent:

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="SaveOrder">
  <Order visit="356255787" orderIdent="256"/>
  <Session>
   <Station id="15015"/>
   <Dish id="1043439" quantity="1000" price="0"/>
  </Session>
 </RK7CMD>
</RK7Query>
XML

In the example the call is made by the key that is the visit + orderid field combination. The station is not a mandatory parameter so it can be omitted. Dishes are what is most interesting about this query. You can access them by their id, guid or code. The quantity is multiplied by 1000!!! The price is not a mandatory parameter.

To indicate a modifier, the following query is made:

<Dish id="1043439" quantity="1000" price="0">
 <Modi id="100" count="1" price="100"/>
 </Dish>
XML

Access by the id, guid or code. The price is a non-mandatory parameter; count is in measurement units.

Example of filling an order with a dish providing an order discount

<?xml version="1.0" encoding="UTF-8"?>
<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>
XML

Example of adding an order discount to an order

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="SaveOrder">
  <Order guid="{5AAEB01D-C8BE-4C11-A1EC-348EF361F3AE}"/>
  <Session>
   <Station id="15002"/>
   <Discount id="1000229"/>
  </Session>
 </RK7CMD>
</RK7Query>
XML

Example of adding a dish discount to an order

<?xml version="1.0" encoding="UTF-8"?>
<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>
XML

<Session line_guid=«{9DC95843-E141-42BF-BB78-9818BCDED302}»> here data are taken from the GetOrder query <Dish line_guid=«{A409B650-DC23-45B3-8509-97DE257F00EF}»> here data are taken from the GetOrder query for filling an order with a combo dish

<?xml version="1.0" encoding="UTF-8"?>
<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>
XML

where Combo id=«1000205» is a dish identifier in the menu Component id=«1000033» is the identifier of a dish linked to a combo element.

Creation of a Banquet Order

1.To create a banquet order, you should use the CreateOrderxml query.

Example of an XML query:

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
<RK7CMD CMD="CreateOrder" openTime="2025-04-17T10:00:00" duration="T05:00:00" holder="OOO Plunder and Flee">
       <Table code="44"/>
       <Waiter code = "1"/>
</RK7CMD>
</RK7Query>

XML

2. To get banquet order properties, you use the GetOrder query

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
<RK7CMD CMD="GetOrder">
   <Order guid="{871891FB-FFC3-40D7-B2E0-4D30853E88EE}"/>
</RK7CMD>
</RK7Query>
XML

3. To add dishes to an order, you use the SaveOrder query:

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
<RK7CMD CMD="SaveOrder">
  <Order guid="{871891FB-FFC3-40D7-B2E0-4D30853E88EE}"/>
  <Session>
    <Dish code="18" quantity="1000"/>
  </Session>
</RK7CMD>
</RK7Query>
XML

Payments

Order payment

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
	<RK7CMD CMD="PayOrder">
		<Order guid="{668401AA-BD04-4935-B76C-C8506CC8EF36}"/>
		<Cashier code="5"/>
		<Station code="1"/>
		<Payment id="1" amount="50000"/>
		<Payment id="1030240" amount="10000"/>
	</RK7CMD>
</RK7Query>
XML

Where: Cashier means access by the code, id or guid Station means a station Payment means the payment currency. There can be several ones; amount means the amount * 100 Please note: For the query to be run successfully, the amount of all payment parameters must be exactly the same as the order amount at the moment of payment. If the amount is not enough, an error will be returned because of insufficient funds.

Depositing Prepayment

Its structure is similar to filling an order

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="SaveOrder">
  <Order guid="{BED30F72-70B1-4929-AF40-A36E652FDC10}"/>
  <Session>
   <Prepay id="1" amount="60000">
    <Reason id="1043926"/>
   </Prepay>
  </Session>
 </RK7CMD>
</RK7Query>
XML

Where: Prepay is the prepayment currency; amount is the amount * 100; Reason is the reason for depositing a prepayment. This is a mandatory tag.

Deleting Dishes from an Order

Its structure is similar to filling an order

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="SaveOrder">
  <Order guid="order guid" />
  <Session uni="sessionuni">
   <Dish uni="dishuni" code="1000" price="0">
<Void id="ident of the reason for deletion" quantity="how many to delete"/>
   </Dish>
  </Session>
 </RK7CMD>
</RK7Query>
XML

Deleting an Order

Before deleting an order you have to clear it as only an empty order can be deleted:

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="CloseVisit" VisitID="393873942"/>
</RK7Query>
XML

Receiving a response:

<?xml version="1.0" encoding="utf-8"?>
<RK7Query>
  <RK7CMD CMD="GetPrintLayout" TextReport="1" >
    <Layout id="1001922">
 </Layout>
  </RK7CMD>
</RK7Query>
XML

Pre-Bill Printing

<?xml version="1.0" encoding="UTF-8"?>
<RK7Query>
 <RK7CMD CMD="PrintBill">
	<Order guid="{A3A3D2B0-A1E1-41CF-90AA-6A814A939423}"/>
	<Station code="1"/>
	<Cashier code="2"/>
 </RK7CMD>	
</RK7Query>
XML