Contents
Web orders API
The web orders service consists of two REST API groups: RK7 interaction subsystem and CRM interaction subsystem.
Incoming request
BaseUrl is the basic URL of the WebDelivery server (dlv.ucs.ru).
Access to RK7 API:
BaseUrl = dlv.ucs.ru/api/v1/
Access to CRM API:
BaseUrl = https://dlv.ucs.ru/api/v1/crm/
The header of each request should contain the access key (SID). This key is generated upon the dealer login to their personal account at dlv.ucs.ru, on the page containing the list of all objects. Example:
sid: 21f8221aabd495fad11f73c0500e8cd03821deabe038d82d67cf143d9b31ea21
Important information!
- The key is linked to the dealer account. The change of the dealer, login, or password leads to an automatic generation of a new SID.
- The key grants access to the restaurant resources R_Keeper and R_Keeper CRM, so it should not be stored in public places (e.g., in cookies, or explicitly on the website).
When accessing the CRM API, the relevant object number should be transmitted in the request parameters.
https://dlv.ucs.ru/api/v1/crm/Countries?objectId=<object number>
General response format
{
"data": {
<Returned data>
},
"ver": "1.1.15.15",
"timestamp": "2018-10-03T15:26:02",
"status": "Ok",
"errors": [
{
"code": "DLW-0023",
"text": "RK7 error",
"details": "Not answer from WS"
}
]
"requestId": "4925c8c968834372a0cbaa7be99e4106"
}
The response is returned in JSON format and includes the following fields:
data — the requested data. This field is optional. In case of an "Err" status, it is not returned.
ver — the current WebDelivery software version.
timestamp — the current time, when the response was issued to the user. Returns in the following format:
yyyy-mm-ddThh:MM:ss
where yyyy = year, mm = month, dd = day, hh = hour, MM = minute, ss = second. The WebDelivery server time is used.
status — the status of successful execution of the returned response. It takes the following values: Ok — in case of a successful request execution; Err — if an error occurred.
errors — the list of errors. This is an optional field, returned only if the status is "Err". The field format is an array. Array elements are represented by structures describing the errors, which occurred during the request execution. The composition of the data structure describing an error:
- code — error code.
- text — error text. Error text is preceded by the following prefixes: SAC or CRM — the error occurred in CRM; RK7 — the error was generated by the cash desk server; WS — the error occurred on the WhiteServer side; DLW — the error was generated by the WebDelivery server.
- details — comments to the error text, recommendation on how to fix it. This field is optional.
requestId — a unique identifier of each request. This identifier can be used in the administrator dashboard to search all records in the event log, which are related to the execution of the given request.
Description of API functions
The package of API functions can be divided into several subsystems:
CRM API
RK7 API