To get detailed information about the dishes available for sale at a given time, you need to make two requests to the r_keeper API.

  • The first request is to get the Menu reference. It helps to get names, display parameters and other parameters of dishes created in r_keeper.
  • The second request is to get dishes available for sale. It updates the list of dishes available for sale at a particular cash station, taking into account balances, availability period, trade groups and other restrictions that can be imposed on dishes in the r_keeper settings. This query does not return detailed information about menu items.

In order to display the list of dishes, it is necessary to select from the response to the first request only those dishes whose identifiers are contained in the response to the second one.

Request for Entire Menu

For a complete list of dishes, send an XML request:

<RK7CMD CMD="GetRefData" RefName="MENUITEMS" onlyActive="1"/>

In response to the request, an XML document of the following form will be returned:

<?xml version="1.0" encoding="utf-8"?><RK7QueryResult ServerVersion="" XmlVersion="243" NetName="CONF_MIDSERVER"
Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2019-12-30T11:47:46" WorkTime="15" Processed="1">
<RK7Reference DataVersion="151" ClassName="TRK7MenuItems" Name="MENUITEMS" MinIdent="1" MaxIdent="0" ViewRight="0"
UpdateRight="21" ChildRight="21" DeleteRight="21" XMLExport="true" XMLMask="*" LeafCollectionCount="1">
<Item Ident="1000189" ItemIdent="1000189" SourceIdent="0" GUIDString="{02721FC1-0B02-4AA4-8E6E644F45B40FB2}" AssignChildsOnServer="false" ActiveHierarchy="true" Code="222" Name="Булка°" AltName="" MainParentIdent="1000186"
Status="rsActive" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911"
VisualType_Flags="bsPictureTop" SalesTerms_Flag="[]" SalesTerms_StartSale="3748606669879" SalesTerms_StopSale="3748606669879"
RightLvl="0" AvailabilitySchedule="0" UseStartSale="false" UseStopSale="false" TaxDishType="1" FutureTaxDishType="1" ExtCode="2"
ShortName="" AltShortName="" PortionWeight="0" PortionName="" AltPortion="" Kurs="0" QntDecDigits="3" ModiScheme="0"
ComboScheme="0" ModiWeight="0" CookMins="0" Comment=""
890123456789012345678901234567890" Flags="[miUseRestControl]" TaraWeight="0" ConfirmQnt="0" MInterface="0" MinRestQnt="0"
BarCodes="" PriceMode="pmPerPiece" OpenPrice="false" DontPack="false" ChangeQntOnce="false" AllowPurchasing="false"
UseRestControl="true" UseConfirmQnt="false" CategPath="Бар\Ð�лкоголь" SaleObjectType="sotMenuItem"
ComboJoinMode="cjmNone" ComboSplitMode="csmNone" 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="1000183" HighLevelGroup2="1000186" HighLevelGroup3="0" HighLevelGroup4="0" BarCodesText="" BarcodesFullInfo="">
<RecommendedMenuItems ClassName="TRecommendedMenuItems">
<Childs ClassName="tChildCollection"/>

The response will contain a complete list of dishes, with detailed information on each of them.

In case of an error, the XML document will not contain the RK7Reference nodes, the RK7QueryResult.ErrorText attribute will contain the error text.
To optimize the reference caching, use the RK7QueryResult.XMLVersion attribute.

If there have been any changes in the menu reference since the previous request, the value of this attribute will be different from the previous one.

Getting Dishes Available for Sale

To select only those elements from the dish reference that can currently be sold at the cash station, you should send the following request:

<RK7CMD CMD="GetOrderMenu">
<Station code="1"/>

In the Station.code attribute value, you should specify the code of the station for which the list of dishes will be updated.
Additionally, you can refine the list by the following parameters:

  • Order
  • Waiter
  • Table
  • OrderCategory

These properties can be added to the request in the RK7CMD node, similar to Station, however, for Order, you must use the guid attribute instead of code.

In response to the request, an XML document of the following form will be returned:

<RK7QueryResult ServerVersion="" XmlVersion="243" NetName="CONF_MIDSERVER" Status="Ok" CMD="GetOrderMenu"
ErrorText="" DateTime="2019-12-30T11:37:25" WorkTime="0" Processed="1">
<PriceScale id="3" code="1" name="Основная"/>
<TradeGroup id="7" code="1" name="По умолчанию"/>
<Item Ident="1000189" Price="100" quantity="3000"/>
<Item Ident="1000193" Price="100" quantity="2000"/>
<Item Ident="1000338" Price="100"/>
<Item Ident="2003" ID="2003" Price="0"/>
<Item Ident="1000378" ID="1000378" Price="0"/>

Error handling should work similar to the previous request.
The Dishes and Modifiers nodes will contain the list of dishes and modifiers, respectively, available for sale at the moment.
For each of the positions, the cost per item in kopecks will be returned in the Price attribute. Price="100" — one ruble.
For the positions that have quantity restrictions, the quantity attribute will also be returned, indicating the remainder of the dish in thousandths. That is: quantity = "1000" — One serving.
To display a list of dishes available for order, you must select from the dish reference (the first request) only those dishes that are in the order menu (the second request).
Elements can be linked using the ident attribute.