Contents

List of restaurants by corporation (GET)

url = BaseUrl + 'rests?corpid=19999'
here,

  • corpid — corporation identifier

Sample response:
{
"data": {
"rests": [
{
"id": 199999999,
"name": "UCS showroom",
"address": "B. Pochtovaya str., 18/20, bld 6"
"country": "Russia",
"city_name": "Moscow",
"status": "Active",
"min_check_amount": 300,
"delivery_period": {
"begin": "8:00",
"end": "22:00"
},
"delivery_price": 300,
"currencies": [
{
"id": "ASSIST",
"currency_code": "RUB",
"url": "https://payments.demo.paysecure.ru/",
"merchant_id": "115981"
}
]
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-29T15:23:10",
"status": "Ok"
}
here,

  • id — restaurant identifier
  • name — restaurant name
  • address — restaurant address
  • country — country
  • city_name — city
  • status — restaurant status. The value is taken from the licensing server.
  • min_check_amount — the minimum purchase amount (specified in the administration section of the dealer)
  • delivery_period — delivery time, from hour ("begin") to hour ("end"). (Specified in the administration section of the dealer)
  • delivery_price — delivery cost (specified in the administration section of the dealer)
  • currencies — external payment system ASSIST (everything specified in the administration section of the dealer)
  • » id — text identifier of the external payment service (ASSIST)
  • » currency_code — currency code in ASSIST
  • » url — URL used to navigate to the payment service page
  • » merchant_id — enterprise identifier ("Store number") in the ASSIST system

List of restaurants by delivery address and corporation (POST)

url = BaseUrl + 'rests'
In the JSON request body:
{
"address": "Russia, Moscow, B. Pochtovaya str., 18/20, bld 6",
"lat": "55.776877",
"lon": "37.696391",
"corpid": 19999,
"default_object": 199994335
}
here,

  • address — delivery address line (mandatory)
  • lat & lon — latitude and longitude of the delivery address (optional)
  • corpid — corporation identifier (mandatory)
  • default_object — default object, if there is no delivery area at the specified address (mandatory)

If "lat" and "lon" are specified, they are used to define the restaurant providing services in the delivery area at the given address. The address line, if specified, should be ignored then.
Response example (if the areas do not intersect, the response should contain the parameters of a single restaurant):
{
"data": {
"rests": [
{
"id": 199994335,
"name": "Restaurant 313 crabs and a shrimp",
"address": "B. Pochtovaya str., 18/20, bld 6",
"country": "Russia",
"city_name": "Moscow",
"status": "Active",
"min_check_amount": 300,
"delivery_period": {
"begin": "8:20",
"end": "22:00"
},
"delivery_price": 300,
"currencies": [
{
"id": "ASSIST",
"currency_code": "RUB",
"url": "https://payments.demo.paysecure.ru/",
"merchant_id": "115981"
}
]
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-29T15:41:08",
"status": "Ok"
}

Menu tree (list of menu categories) by object identifier (GET)

The results of this request execution are cached on the WebDelivery server. Cache update time is 15 minutes.
url = BaseUrl + 'menutree?objectid=199994335&lang=ru'
here,

  • objectid — object/restaurant identifier (mandatory)
  • lang — language used for menu names, ru or en (optional). If not specified, the list of localized resources for all languages will be returned. If specified, localized resources for the selected language will be returned.


"locres": {
"name": "First courses"
}
Response example without lang specified (url = BaseUrl + 'menutree?objectid=199994335&lang=ru'):
{
"data": {
"selectors": [
{
"pid": 0,
"type": "SELECTORS",
"level": 0,
"items": [
{
"pid": 0,
"type": "SELECTORS",
"level": 1,
"items": [
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000039,
1000040
],
"id": 1000258,
"guid": "{BC31E51B-5248-4230-9924-4B0A80900BFE}",
"code": 42,
"name": "First courses",
"locres": {
"name": "First courses"
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000016,
1000018
],
"id": 1000255,
"guid": "{B0A1E19F-0C8E-4F9E-9F82-F715992A5014}",
"code": 41,
"name": "Second courses",
"locres": {
"name": "Second courses"
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000042,
1000043,
1000072
],
"id": 1000267,
"guid": "{931CB22C-4E52-4125-BD2A-F4D94C5812DA}",
"code": 43,
"name": "Beverages",
"locres": {
"name": "Beverages"
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [],
"id": 1000401,
"guid": "{9E644F23-AC74-433F-A742-00C7C8771824}",
"code": 44,
"name": "Combo",
"locres": {
"name": "Combo"
}
}
],
"dishes": [],
"id": 1000248,
"guid": "{CDE469EC-7600-44EA-847E-161ABA71D835}",
"code": 40,
"name": "Web menu",
"locres": {
"name": "Web menu"
}
}
],
"dishes": [],
"id": 11048,
"guid": "{70DC9856-7791-42BC-8D89-57C8CE51EB31}",
"code": 11048,
"name": "Initial choice",
"altname": "Initial Choice",
"locres": {}
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-30T14:56:27",
"status": "Ok"
}
Response example without lang specified (url = BaseUrl + 'menutree?objectid=199994335&lang=')
{
"data": {
"selectors": [
{
"pid": 0,
"type": "SELECTORS",
"level": 0,
"items": [
{
"pid": 0,
"type": "SELECTORS",
"level": 1,
"items": [
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000039,
1000040
],
"active": 1,
"id": 1000258,
"guid": "{BC31E51B-5248-4230-9924-4B0A80900BFE}",
"code": 42,
"name": "First courses",
"locres": {
"ru": {
"name": "Первые блюда"
},
"en": {
"name": "First courses"
}
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000016,
1000018
],
"active": 1,
"id": 1000255,
"guid": "{B0A1E19F-0C8E-4F9E-9F82-F715992A5014}",
"code": 41,
"name": "Second courses",
"locres": {
"ru": {
"name": "Вторые блюда"
},
"en": {
"name": "Second courses"
}
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [
1000042,
1000043,
1000072
],
"active": 1,
"id": 1000267,
"guid": "{931CB22C-4E52-4125-BD2A-F4D94C5812DA}",
"code": 43,
"name": "Beverages",
"locres": {
"ru": {
"name": "Напитки"
},
"en": {
"name": "Beverages"
}
}
},
{
"pid": 1000248,
"type": "SELECTORS",
"level": 2,
"items": [],
"dishes": [],
"active": 1,
"id": 1000401,
"guid": "{9E644F23-AC74-433F-A742-00C7C8771824}",
"code": 44,
"name": "Combo",
"locres": {
"ru": {
"name": "Комбо"
},
"en": {
"name": "Combo"
}
}
}
],
"dishes": [],
"active": 1,
"id": 1000248,
"guid": "{CDE469EC-7600-44EA-847E-161ABA71D835}",
"code": 40,
"name": "Internet-menu",
"locres": {
"ru": {
"name": "Интернет-меню"
},
"en": {
"name": "Internet-menu"
}
}
}
],
"dishes": [],
"active": 1,
"id": 11048,
"guid": "{70DC9856-7791-42BC-8D89-57C8CE51EB31}",
"code": 11048,
"name": "Initial choice",
"altname": "Initial Choice"
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-30T14:56:52",
"status": "Ok"
}
Fields "id", "guid", "code", "name", "altname" correspond to the cash desk server parameters "Identifier", "GUID", "Code", "Name", "Alternative name", respectively.
The "type" field for similar data structures enables their distinction by type and takes the value "SELECTORS" or "MENUITEM". In this implementation, only the "SELECTORS" value is used.

List of dishes by object identifier (GET)

The results of this request execution are cached on the WebDelivery server. Cache update time is 15 minutes.
url = BaseUrl + 'dishes?objectid=199994335&lang=ru'
here,

  • objectid — object/restaurant identifier (mandatory)
  • lang — language used for menu names (optional). If "lang" is not specified in the request, all localized dish resources will be returned

Response example (menu language not specified):
{
"data": {
"dishes": [
{
"price": 5000,
"modischeme": 0,
"recommended": [],
"active": 1,
"id": 1000039,
"guid": "{9E3F46BF-D89D-49F8-A1AE-182479B3AF46}",
"code": 24,
"name": "Beetroot soup",
"altname": "Borscht",
"images": [
"img24.png"
],
"locres": {
"ru": {
"name": "Борщ"
},
"en": {
"name": "Borscht"
}
}
},
{
"price": 9500,
"modischeme": 0,
"recommended": [],
"active": 1,
"id": 1000040,
"guid": "{634EA5E0-CF00-4316-A639-5BF1809D3D08}",
"code": 25,
"name": "Solyanka",
"images": [
"img25.png",
"img25_1.png"
],
"locres": {
"ru": {
"name": "Солянка"
},
"en": {
"name": "Solyanka"
}
}
},
{
"price": 5000,
"modischeme": 1000384,
"recommended": [],
"active": 1,
"id": 1000016,
"guid": "{532EB43B-6661-4063-97BA-B5BBBDC1577F}",
"code": 4,
"name": "Pelmeni",
"images": [
"img4.png",
"img4_1.png"
],
"locres": {
"ru": {
"name": "Пельмени сибирские",
"comment": "Пельмени сибирские",
"long_comment": "Домашние пельмени приготовленные вручную со свининой и говядиной, со сметаной"
},
"en": {
"name": "Pelmeni Sibirskie",
"comment": "Pelmeni Sibirskie",
"long_comment": "Russian homemade pelmeni Sibirskie with pork and beef with sour cream"
}
}
},
{
"price": 3000,
"modischeme": 0,
"recommended": [],
"active": 1,
"id": 1000018,
"guid": "{465FCA56-5C19-4479-89A2-F715DE111ACC}",
"code": 6,
"name": "Spaghetti",
"images": [
"img6.png",
"img6_1.png"
],
"locres": {
"ru": {
"name": "Спагетти \"Филата\"",
"comment": "Спагетти \"Филата\"",
"long_comment": "Спагетти, сливочное и растительное масло, твердый сыр Пармезан, сыр Дор Блю, сыр Ольтермани, чеснок"
},
"en": {
"name": "Spaghetti \"Filata\"",
"comment": "Spaghetti \"Filata\"",
"long_comment": "Spaghetti, butter and vegetable oil, hard Parmesan cheese, Dor Blue cheese, Oltermani cheese, garlic"
}
}
},
{
"price": 8000,
"modischeme": 1000331,
"recommended": [],
"active": 1,
"id": 1000042,
"guid": "{ABB96A2B-A704-475C-A6F1-795BF550197D}",
"code": 27,
"name": "Apple juice",
"images": [
"img27.png"
],
"locres": {
"ru": {
"name": "Яблочный сок"
},
"en": {
"name": "Apple juice"
}
}
},
{
"price": 10000,
"modischeme": 1000331,
"recommended": [],
"active": 1,
"id": 1000043,
"guid": "{4275F46E-AE20-461C-99BA-E95D6D1AE4AA}",
"code": 28,
"name": "Orange juice",
"images": [
"img28.png"
],
"locres": {
"ru": {
"name": "Апельсиновый сок"
},
"en": {
"name": "Orange juice"
}
}
},
{
"price": 10000,
"modischeme": 1000331,
"recommended": [],
"active": 1,
"id": 1000072,
"guid": "{1336C583-C799-47C2-9730-190228AE9DBE}",
"code": 17,
"name": "Grapefruit juice",
"images": [
"img17.png",
"img17_1.png"
],
"locres": {
"ru": {
"name": "Грейпфрутовый сок"
},
"en": {
"name": "Grapefruit juice"
}
}
}
],
"modifiers": [
{
"pid": 0,
"group": [
{
"useDownLimit": 1,
"downLimit": 1,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 2003,
"name": "USAIS EAN13",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 1,
"upLimit": 1,
"active": 1,
"id": 2001,
"name": "USAIS EAN13"
},
{
"useDownLimit": 1,
"downLimit": 1,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 2004,
"name": "PDF417",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 1,
"upLimit": 1,
"active": 1,
"id": 2002,
"name": "PDF417"
}
],
"item": [],
"active": 1,
"id": 2007,
"code": 2007,
"name": null
},
{
"pid": 0,
"group": [],
"item": [],
"active": 1,
"id": 1000194,
"code": 1,
"name": null
},
{
"pid": 0,
"group": [
{
"useDownLimit": 0,
"downLimit": 0,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000324,
"name": "Cinnamon",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000325,
"name": "Sugar",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000327,
"name": "Meringue",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000329,
"name": "Milk",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 0,
"upLimit": 0,
"active": 1,
"id": 1000323,
"name": "123"
}
],
"item": [],
"active": 1,
"id": 1000331,
"code": 2,
"name": null
},
{
"pid": 0,
"group": [
{
"useDownLimit": 0,
"downLimit": 0,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000392,
"name": "p",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 1,
"price": 500,
"active": 1,
"id": 1000393,
"name": "v",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 10,
"price": 6320,
"active": 1,
"id": 1000394,
"name": "hoop",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 0,
"upLimit": 0,
"active": 1,
"id": 1000391,
"name": "apapa"
}
],
"item": [],
"active": 1,
"id": 1000384,
"code": 3,
"name": null
},
{
"pid": 0,
"group": [],
"item": [],
"active": 1,
"id": 1000399,
"code": 4,
"name": null
}
],
"commonModifiers": [
{
"pid": 0,
"group": [
{
"useDownLimit": 0,
"downLimit": 0,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 7,
"price": 0,
"active": 1,
"id": 1000386,
"name": "First",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 3,
"price": -139,
"active": 0,
"id": 1000387,
"name": "Second",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 2,
"price": 1263,
"active": 1,
"id": 1000388,
"name": "Third",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 0,
"price": 0,
"active": 1,
"id": 1000389,
"name": "unlimited",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 0,
"upLimit": 0,
"active": 1,
"id": 1000385,
"name": "General_"
},
{
"useDownLimit": 0,
"downLimit": 0,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 7,
"price": 1,
"active": 1,
"id": 1000397,
"name": "one",
"images": [ "" ]
},
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 1000398,
"name": "two",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 0,
"upLimit": 0,
"active": 1,
"id": 1000396,
"name": "New"
}
],
"item": [],
"active": 1,
"id": 1000384,
"code": 3,
"name": null
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-30T11:21:17",
"status": "Ok"
}
here:

  • dishes — the list of dishes
  • modifiers — the list of modifiers
  • commonModifiers — the list of common modifiers (description is similar to "modifiers")

dishes — the list of dishes:
{
"price": 5000,
"modischeme": 1000384,
"recommended": [],
"active": 1,
"id": 1000016,
"guid": "{532EB43B-6661-4063-97BA-B5BBBDC1577F}",
"code": 4,
"name": "Pelmeni",
"images": [
"img4.png",
"img4_1.png"
],
"locres": {
"ru": {
"name": "Пельмени сибирские",
"comment": "Пельмени сибирские",
"long_comment": "Домашние пельмени приготовленные вручную со свининой и говядиной, со сметаной"
},
"en": {
"name": "Pelmeni Sibirskie",
"comment": "Pelmeni Sibirskie",
"long_comment": "Russian homemade pelmeni Sibirskie with pork and beef with sour cream"
}
}
}
here:

  • price — price in kopecks
  • modischeme — modifier scheme identifier
  • recommended — the list of recommended dishes
  • active — dish is active (1), or inactive (0)
  • id — dish identifier
  • guid — dish GUID
  • code — dish code (taken from the RK7 reference book settings)
  • name — dish name
  • images — the list of names assigned to image files
  • locres — localized resources
  • –» here:
  • –» name — localized dish name
  • –» comment — a short comment
  • –» long_comment — a long comment
  • item — reserved, currently not used

modifiers — modifier schemes:
{
"pid": 0
"active": 1,
"id": 2007,
"code": 2007,
"name": null,
"group": [
{
"useDownLimit": 1,
"downLimit": 1,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 2003,
"name": "USAIS EAN13",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 1,
"upLimit": 1,
"active": 1,
"id": 2001,
"name": "USAIS EAN13"
},
{
"useDownLimit": 1,
"downLimit": 1,
"defaultModifier": 0,
"modi": [
{
"dishid": 0,
"maxOneDish": 1,
"price": 0,
"active": 1,
"id": 2004,
"name": "PDF417",
"images": [ "" ]
}
],
"replaceDefModifier": 0,
"useUpLimit": 1,
"upLimit": 1,
"active": 1,
"id": 2002,
"name": "PDF417"
}
]
}
here:

  • pid — root node identifier (parent id). Used to generate a tree structure for the order; refers to the identifier of the node, to which the given dish or modifier is assigned.
  • active — active (1) / inactive scheme (0)
  • id — scheme identifier;
  • code — scheme code (taken from the RK7 reference book settings)
  • name — scheme name;
  • group — the list of modifier groups
  • —→ id — identifier
  • —→ name — name
  • —→ useDownLimit — an indicator of using the lower limit (by quantity)
  • —→ downLimit — the minimum modifier quantity for a dish
  • —→ defaultModifier — default modifier identifier ("dishid" field in modifiers)
  • —→ replaceDefModifier — default modifier replacement (1 = yes, 0 = no). Sets the user interface behavior: if replaceDefModifier = 1, the set default modifier should be replaced with the one selected by the user; if replaceDefModifier = 0, the modifier, selected by the user, should be added to the order without replacing the default modifier.
  • —→ useUpLimit — an indicator of using the upper limit (by quantity)
  • —→ upLimit — the maximum modifier quantity for a dish
  • —→ active — active/inactive modifier group
  • —→ modi — the list of modifiers in a group
  • —→—→ dishid — dish identifier, if the modifier is a combo component; otherwise — 0
  • —→—→ maxOneDish — maximum quantity per one dish
  • —→—→ price — modifier price
  • —→—→ active — active/inactive modifier
  • —→—→ id — modifier identifier
  • —→—→ name — modifier name
  • —→—→ images — the list of names assigned to image files

Order saving for a new customer (POST)

A new customer can be created with the use of [<span style="color: #0000ff"><span style="text-decoration: underline; ">API CRM</span></span>]. Another way is to specify the customer data directly in the order save request. In this case, the web order service will automatically create a new customer record in CRM, and then save the order for this customer. Both methods of order saving are shown below.
url = BaseUrl + 'savedeliveryorder'
In the JSON request body:
self-pickup order
{
"objectid": 199994335,
"delivery_time": "2017-03-29T23:52:00",
"comment": " Online payment. Payment via ASSIST",
"order_type": 0,
"pay_type": 2,
"client": {
"phone": "79996661010",
"email": "e.korsunov@ucs.ru",
"ln": "Testov",
"fn": "Test"
},
"order": [
{
"id": "1000039",
"type": "d",
"qnt": 1000,
"items": [
{
"id": 1000388,
"type": "m",
"qnt": 3000,
"items": []
},
{
"id": "100143",
"type": "dc",
"crm": true
}
]
},
{
"id": "101706",
"type": "dc",
"crm": true
}
]
}
delivery order
{
"objectid": 199994335,
"delivery_time": "2016-10-14T13:43:00",
"comment": "Order notes: change for 500",
"order_type": 1,
"pay_type": 0,
"client": {
"phone": "79131112233",
"email": "ivan_ivanov@mail.com",
"ln": "Ivanov Ivan Ivanovich"
},
"address": {
"country": "Russia",
"city": "Voronezh",
"street": "Lizyukova",
"house": "20",
"building": "",
"entry": "",
"floor": "",
"apartments": "",
"lat": "55.776877",
"lon": "37.696391"
},
"order": [
{
"id": 1000418,
"type": "d",
"qnt": 1000,
"items": [
{
"id": 1000162,
"type": "m",
"qnt": 1000,
"items": []
},
{
"id": "100143",
"type": "dc",
"crm": true
}
]
},
{
"id": "101706",
"type": "dc",
"crm": true
}
]
}
delivery order with a combo dish and modifiers
{
"version_app": "0.4.7",
"objectid": 199994545,
"delivery_time": "2018-05-08T13:08:00",
"comment": "Payment: cash",
"order_type": 1,
"pay_type": 0,
"client": {
"phone": "71111111111",
"email": "qw@com.com",
"ln": "Ivanov",
"fn": "Ivan"
},
"address": {
"country": "Russia",
"city": "Moscow",
"street": "Bolshaya Pochtovaya",
"house": "18",
"building": "20",
"lat": "55.776031",
"lon": "37.6926"
},
"order": [
{
"id": "100720",
"type": "c",
"qnt": 2000,
"items": [
{
"id": 101763,
"type": "cc",
"qnt": 1000,
"items": [
{
"id": 102705,
"type": "m",
"qnt": 1000,
"items": []
}
]
},
{
"id": 101757,
"type": "cc",
"qnt": 1000,
"items": []
},
{
"id": 101769,
"type": "cc",
"qnt": 1000,
"items": [
{
"id": 100173,
"type": "m",
"qnt": 1000,
"items": []
}
]
},
{
"id": 101771,
"type": "cc",
"qnt": 1000,
"items": []
},
{
"id": 101779,
"type": "cc",
"qnt": 1000,
"items": []
}
]
}
]
}
here,

  • objectid — object identifier (mandatory)
  • delivery_time — delivery date and time, formatted as 'YYYY-MM-DDTHH:mm:ss' (mandatory)
  • comment — order comment (optional)
  • order_type — order type: 0 = self-pickup order, 1 = delivery order (mandatory)
  • pay_type — payment type: 0 = with cash to the courier, 1 — with bank card to the courier, the order will be blocked (mandatory).
  • client — customer data
    • phone — phone number (mandatory)
    • email — email address (optional)
    • ln — last name (mandatory)
    • fn — first name (optional)
    • mn — middle/patronymic name (optional)
  • address — delivery address (mandatory in case of a delivery order)
    • country — country
    • city — city
    • street — street
    • house — house
    • building — building
    • entry — entrance
    • floor — floor
    • apartments — apartment
  • order — order contents (list)
    • id — dish identifier
    • type — type. 'd' = dish, 'c' = combo dish, 'cc' = combo dish component, 'm' = modifier, 'dc' = discount for order
    • qnt — quantity in thousands (in case of 1 pcs the value will be 1000)
    • crm — if the field exists, and its value is "true", the cash server will need to receive the discount value from CRM (parameter is applicable only for type="dc").
    • items — the list of components (modifiers)
    • —→ id — identifier
    • —→ type — type. "m" = modifier, "d" = dish (if the main dish is a combo dish), "dc" = discount for dish
    • —→ qnt — quantity
    • —→ items — the list of modifiers/combo components
    • —→ crm — if the field exists, and its value is "true", the cash server will need to receive the discount value from CRM (parameter is applicable only for type="dc").

Response
{
"data": {
"visit_id": "412747060",
"visit_guid": "{F60F10FA-7F09-450C-84F6-CA03580442B9}",
"table_name": "Dlvr",
"order_sum": "8350",
"unpaid_sum": "8350",
"discount_sum": "-439",
"seq_number": "5",
"dishes": [
{
"modi": [
{
"id": 1000388,
"guid": "{864866E8-013E-44D4-B55A-2B8D164D2459}",
"code": 14,
"name": "Third",
"price": 1263,
"quantity": 3000
}
],
"id": "1000039",
"guid": "{9E3F46BF-D89D-49F8-A1AE-182479B3AF46}",
"code": "24",
"name": "Beetroot soup",
"price": "5000",
"amount": "8350",
"quantity": "1000",
// discounts for dish
"discounts": [
{
"id": "100143",
"name": "15 Festival"
}
]
}
],
// discounts for dish
"discounts": [
{
"id": "101706",
"name": "20%"
},
{
"id": "100154",
"name": "1 Cheap ice-cream"
}
],
"Payments": [
{
"id": 1,
"code": 1,
"name": "Rubles",
"guid": "{16D72549-14D8-4F31-9E2A-0A833D4F5EED}",
"amount": 19000
},
{
"id": 2,
"code": 22,
"name": "Euro",
"guid": "{2A426EA7-CA4A-482C-B74C-45347F18759F}",
"amount": 543
},
{
"id": 3,
"code": 3,
"name": "US Dollar",
"guid": "{D2DB2A5B-CB57-4626-AFB3-0851DCCA4724}",
"amount": 600
}
]
},
"ver": "1.1.7.4",
"timestamp": "2017-03-30T15:27:42",
"status": "Ok"
}
here

  • visit_id — visit identifier
  • visit_guid — visit GUID
  • table_name — table number/name (not used)
  • order_sum — order amount
  • unpaid_sum — amount to be paid
  • discount_sum — discount amount
  • seq_number — order sequential number
  • dishes — order contents
    • —→ id — dish identifier
    • —→ guid — dish GUID
    • —→ code — dish code
    • —→ name — dish name (base name from RK7 without localization)
    • —→ price — price (in kopecks)
    • —→ amount — amount (in kopecks)
    • —→ quantity — quantity (in thousands)
    • —→ modi — modifiers
    • —→ discounts — discounts for dish
  • discounts — discounts for order
    • —→ id — discount identifier
    • —→ name — discount name (base name from RK7 without localization)
  • Payments — amount to be paid, with all discounts taken into consideration
    • —→ id — currency identifier
    • —→ code — currency code
    • —→ name — currency name
    • —→ guid — currency GUID
    • —→ amount — amount to be paid in the selected currency

The result of this request depends on the setting "geocoding mode" in the administrator dashboard.

Order saving for an existing customer (POST)

url = BaseUrl + 'savedeliveryorder?objectId=<object number>'
In the JSON request body:
{
"version_app": "0.4.7",
"delivery_time": "2018-09-27T13:32:00",
"comment": "Payment: cash",
"order_type": 0,
"pay_type": 0,
"pay_online_type": "",
"client": {
"id": "10000000009188",
"phone": "+79998887766"
},
"address": {
"id": "10000000003276"
},
"order": [
{
"id": "101757",
"type": "d",
"qnt": 4000,
"items": []
}
]
}
here,

  • delivery_time — delivery date and time, formatted as 'YYYY-MM-DDTHH:mm:ss' (mandatory)
  • comment — order comment (optional)
  • order_type — order type: 0 = self-pickup order, 1 = delivery order (mandatory)
  • pay_type — payment type: 0 = with cash to the courier, 1 — with bank card to the courier, the order will be blocked (mandatory).
  • client — customer data
    • id — customer identifier from CRM
    • phone — phone number that will be specified in the order (e.g., if the customer has multiple numbers). This is an optional parameter.
  • address — delivery address (mandatory in case of a delivery order)
    • id — delivery address identifier from CRM
  • order — order contents (list)
    • id — dish identifier
    • type — type. 'd' = dish, 'c' = combo dish, 'cc' = combo dish component, 'm' = modifier
    • qnt — quantity in thousands (in case of 1 pcs the value will be 1000)
    • items — the list of components (modifiers)
    • —→ id — identifier
    • —→ type — type. "m" = modifier, "d" = dish (if the main dish is a combo dish), "dc" = discount for dish
    • —→ qnt — quantity
    • —→ items — the list of modifiers/combo components
    • —→ crm — an indicator of a discount taken from CRM (applicable for type="dc")
  • discounts — discount for order
    • id — discount identifier
    • crm — an indicator of a discount taken from CRM

Response
The response is the same as in the section "Order saving for a new customer".
Note The result of this request depends on the setting "geocoding mode" in the administrator dashboard.

Calculating the amount to be paid with due regard to discounts, in different currencies (POST)

url = BaseUrl + 'CalcOrder'
In the request body, the same contents are transmitted, as in the SaveDeliveryOrder request.
Response:
{
"data": {
"Payments": [
{
"id": 1,
"code": 1,
"name": "Rubles",
"guid": "{16D72549-14D8-4F31-9E2A-0A833D4F5EED}",
"amount": 19000
},
{
"id": 2,
"code": 22,
"name": "Euro",
"guid": "{2A426EA7-CA4A-482C-B74C-45347F18759F}",
"amount": 543
},
{
"id": 3,
"code": 3,
"name": "US Dollar",
"guid": "{D2DB2A5B-CB57-4626-AFB3-0851DCCA4724}",
"amount": 600
}
]
},
"ver": "1.1.15.15",
"timestamp": "2018-10-03T15:26:02",
"status": "Ok",
"requestId": "4925c8c968834372a0cbaa7be99e4106"
}
here

  • id — currency identifier
  • code — currency code
  • name — currency name
  • guid — currency GUID
  • amount — amount to be paid in the selected currency

In the list of currencies, only those currencies are returned, for which the advanced property ForDelivery=1 is set.
The result of this request depends on the setting "geocoding mode" in the administrator dashboard.

Order payment posting (POST)

url = BaseUrl + 'payment'
In the request body:
{
"object_id": 199990001,
"visit_id": 411765152,
"payments": [
{
"currency_id": 1000379,
"extpay_id": "ASSIST",
"amount": 62718,
"promised": true
}
]
}
here:

  • object_id — object code
  • visit_id — visit identifier
  • payments
  • —→ currency_id — currency identifier in RK7
  • —→ extpay_id — external transaction information, stored in the field ExtTransactionInfo in RK7
  • —→ amount — payment amount in kopecks (base units of measurement)
  • —→ promised — payment type (true = pledge payment; false = advanced payment)

The result of this request depends on the setting "geocoding mode" in the administrator dashboard.

Getting data for an executed order with courier coordinates (GET)

url = BaseUrl + courier?objectId=<objectId>&visitId=<visitId>
here:

  • objectId — the number of the object (restaurant), where the order has been executed
  • visitId — order number

Response without courier coordinates:
{
"data": {
"object_id": <objectId>,
"visit_id": <visitId>,
"courier_location": null,
"dlvStateID": 0,
"DlvStateName": "not confirmed"
},
"ver": "1.1.14.12",
"timestamp": "2018-10-09T12:10:00",
"status": "Ok",
"requestId": "a6ecbf6a35a54ccd984bd9a05999868f"
}
here:

  • object_id — the number of the object (restaurant), where the order has been executed
  • visit_id — order number
  • courier_location — current courier location
  • dlvStateID — order status. May take the following values:
    • 0: unconfirmed
    • 1: new confirmed order
    • 2: in preparation
    • 3: sent
    • 4: delivered
    • 5: completed (archive)
    • 6: order is being edited
    • 7: ready (prepared in the kitchen, ready for shipment)
    • 8: confirmed (used, if the order confirmation is enabled)
  • DlvStateName — order status name. May take the following values:
    • "not confirmed",
    • "accepted for processing",
    • "in preparation",
    • "sent with a forwarding agent",
    • "delivered",
    • "archived",
    • "is being edited",
    • "ready for shipment",
    • "confirmed by the executing restaurant"

Response with courier coordinates:
{
"data": {
"object_id": <objectId>,
"visit_id": <visiId>,
"courier_location": {
"lon": <longitude>,
"lat": <latitude>,
},
"dlvStateID": 0,
"DlvStateName": "not confirmed"
},
"ver": "1.1.14.12",
"timestamp": "2018-10-09T12:10:00",
"status": "Ok",
"requestId": "a6ecbf6a35a54ccd984bd9a05999868f"
}

Getting order information (GET)

url = BaseUrl + 'Order?objectId=<object identifier>&visitId=<order number>'
Response:
{
"data": {
"visit_id": 449382195,
"visit_guid": "{13EC8EDF-F1B8-4C6D-830E-C94CC165F40E}",
"table_name": "D44",
"order_sum": 19000,
"unpaid_sum": 19000,
"prepay_sum": 0,
"promised_sum": 0,
"discount_sum": -1000,
"seq_number": "72",
"dishes": [
{
"modi": [],
"id": "101757",
"guid": "{6A57F1BB-2EAD-4432-A21C-D51B841E479B}",
"code": "31",
"name": "Голубцы",
"price": "5000",
"amount": "19000",
"quantity": "4000",
"discounts": [
{
"id": "100143",
"name": "15 Festival"
}
]
}
],
"discounts": [
{
"id": "101706",
"name": "20%"
},
{
"id": "100154",
"name": "1 Cheap ice-cream"
}
],
"travel_time": 60,
"DeliveryBlock": {
"DeliveryState": "4",
"StartTime": "2018-10-10T17:42:26",
"MinCookTime": "1899-12-30T00:30:00"
}
},
"ver": "1.1.15.16",
"timestamp": "2018-10-10T17:44:37",
"status": "Ok",
"requestId": "152c1c190de446e5b37ef9e6f073d393"
}
The request format corresponds to the response returned by the SaveDeliveryOrder request, except for the information on amounts to be paid ("Payments" section).

Getting the list of currencies (GET)

url = BaseUrl + 'Currency?objectId=<object identifier>'
Response:
{
"data": [
{
"curid": 1,
"name": "Rubles",
"promised": ""
},
{
"curid": 2,
"name": "Euro",
"promised": ""
},
{
"curid": 3,
"name": "US Dollar",
"promised": ""
},
{
"curid": 1000033,
"name": "Bar coupon",
"promised": ""
},
{
"curid": 1000221,
"name": "Free",
"promised": ""
}
],
"ver": "1.3.0.32",
"timestamp": "2019-12-27T16:32:22",
"status": "Ok",
"requestId": "d2dc73ea861d43de82abde031aa67477"
}
here:

  • curid — currency identifier;
  • name — currency name;
  • promised — the value of the advanced property genPromised;

The list of currencies for web orders is filtered with the use of the advanced property genForDelivery, set for each currency. If genForDelivery=1, the currency is added to the resulting list.
This request is cacheable. Cache update time is 5 minutes.

  • No labels