Contents

List of restaurants by corporation (GET)

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

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,

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,

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,

 \\
"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,

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:*
\{
  "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:

*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:

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>|C:\Users\Kirill\AppData\Local\Temp\Temp1_completed-8-UCS-0006.zip\webdelivery_crm_api.webdelivery_crm_api.html]. 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,

*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

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,

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

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:

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:

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:

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:

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.