1. Wiki
  2. API
  3. Получение рекомендаций на контакт

Получение рекомендаций на контакт

URL метода

GET/POST contact/get_recommendations/

Например:
https://(ваша компания).stocrm.ru/api/external/v1/contact/get_recommendations?SID=666_abcdefgh

Параметры:

Параметр Тип Описание
CONTACT_ID int ID контакта

Пример полученных данных:

1    {
2      "RESPONSE": {
3        "46": {
4          "RECOMMENDATION_ID": 46,
5          "HODL_ID": 1,
6          "CAR_PROFILE_ID": 1,
7          "TYPE": "REQUIRE",
8          "OFFER_ID": 1,
9          "WORK_ID": false,
10         "WORK_ID_VIRTUAL": "N",
11         "REQUIRE_ID": 3602,
12         "REQUIRE_ID_VIRTUAL": "3602",
13         "ORDER_ID": false,
14         "ORDER_ID_VIRTUAL": "N",
15         "STATE": "A",
16         "DATE_CREATE": "2019-06-24 16:45:51",
17         "DATE_UPDATE": "2019-10-14 13:19:41",
18         "CREATOR_ID": 5,
19         "UPDATER_ID": 5,
20         "REQUIRE": {
21           "REQUIRE_ID": 3602,
22           "HODL_ID": 1,
23           "OFFER_ID": 1154,
24           "BRAND": "TRW",
25           "SKU": "gdb1550",
26           "TITLE": "",
27           "LOCK": false,
28           "LOCK_DATE": false,
29           "LOCK_USER_ID": false,
30           "IS_RECOMMENDATION": "Y",
31           "ORDERS": {
32             "3705": {
33               "ORDER_ID": 3705,
34               "HODL_ID": 1,
35               "OFFER_ID": 1154,
36               "REQUIRE_ID": 3602,
37               "VERSION": 2,
38               "FORMATTED_STOCK": {
39                 "MS": {
40                   "KEY": "MARKUP",
41                   "MARKUP": 1000,
42                   "RESULT": true,
43                   "RULE_ID": 0
44                 },
45                 "SKU": "GDB1550",
46                 "UID": "c89dfbb830fd5adfb17e73c2acd81b7a",
47                 "NAME": "Колодки передние (SKODA OCTAVIA (1Z_). FABIA II. VW PASSAT (36_. 3C_. 357)) E100",
48                 "BRAND": "TRW",
49                 "PRICE": 23210,
50                 "AMOUNT": "5",
51                 "RAW_STOCK": {
52                   "group": "823",
53                   "maker": "TRW",
54                   "price": "2110",
55                   "number": "GDB1550",
56                   "makerId": "823",
57                   "quantity": "5",
58                   "orderDate": "2019-06-21 08:00:00",
59                   "placement": "Владимир",
60                   "providerId": 290,
61                   "storehouse": false,
62                   "description": "Колодки передние (SKODA OCTAVIA (1Z_). FABIA II. VW PASSAT (36_. 3C_. 357)) E100",
63                   "detailGroup": "Original",
64                   "minQuantity": 1,
65                   "placementId": "5",
66                   "expectedDate": "2019-06-22 19:15:00",
67                   "expectedDays": 1,
68                   "statProvider": 80,
69                   "lastOrderDate": "",
70                   "customerPickup": false,
71                   "guaranteedDate": "2019-06-25 08:00:00",
72                   "guaranteedDays": 4,
73                   "lastUpdateDate": "2019-06-20 18:51:54",
74                   "statRefusalPercent": 0,
75                   "statSuccessPercent": 0,
76                   "providerDescription": "МСК склад"
77                 },
78                 "PRICE_SUPP": "2110",
79                 "STOCK_TYPE": "DEFAULT",
80                 "SUPPLIER_ID": 6,
81                 "WAREHOUSE_ID": 290,
82                 "SUPPLIER_NAME": "ПартКом",
83                 "DELIVERY_HOURS": 24,
84                 "ORIGINAL_PRICE": 23210,
85                 "PRICE_SUPP_HUM": "2110.00",
86                 "WAREHOUSE_NAME": "МСК склад",
87                 "MEASUREMENT_UNIT_ID": 1,
88                 "MEASUREMENT_UNIT_NAME": "Шт",
89                 "SUPPLIERS_INFO": false
90               },
91               "MARKUP_CURRENT": 1000,
92               "FIX_USER_PRICE": false,
93               "QUANTITY_CURRENT": 1,
94               "DISCOUNT_CURRENT": 0,
95               "QUANTITY_IDS": false,
96               "ORDER_SUM": 23210,
97               "ACTIVE": "Y",
98               "CUSTOM_BRAND": "TRW",
99               "CUSTOM_SKU": "GDB1550",
100              "STOCK_TYPE": "DEFAULT",
101              "NO_ROUND": "N",
102              "IS_REFUND": "N",
103              "PURCHASE": false,
104              "IS_RECOMMENDATION": "Y",
105              "STOCKS_PRICES": false,
106              "CITY_ID": false,
107              "SEGMENT_ID": false,
108              "PURCHASE_STATUS": "Закупка не производилась",
109              "MARKUP_MIN": 0,
110              "MARKUP_MAX": 1000,
111              "MARKUP_STEP": 1,
112              "DISCOUNT_MIN": 0,
113              "DISCOUNT_MAX": 75,
114              "DISCOUNT_STEP": 1,
115              "QUANTITY_MIN": 1,
116              "QUANTITY_MAX": "5",
117              "QUANTITY_STEP": 1,
118              "ORDER_STATUS": "LIGHT_STOCK",
119              "PRICE_POSITION": "2110",
120              "PRICE_POSITION_ON_MARKUP": 23210,
121              "PRICE_POSITION_ON_MARKUP_AND_DISCOUNT": 23210,
122              "PRICE_POSITION_FINAL": 23210,
123              "PRICE_POSITION_FINAL_WO_DISCOUNT": 23210,
124              "UID": "c89dfbb830fd5adfb17e73c2acd81b7a",
125              "FIX_USER_PRICE_MIN": "527.50",
126              "FIX_USER_PRICE_MAX": "23210.00",
127              "FIX_USER_PRICE_STEP": 0.01,
128              "FIX_USER_PRICE_CURRENT": false
129            }
130          }
131        }
132      },
133      "48": {
134        "RECOMMENDATION_ID": 48,
135        "HODL_ID": 1,
136        "CAR_PROFILE_ID": 1,
137        "TYPE": "REQUIRE",
138        "OFFER_ID": 1,
139        "WORK_ID": false,
140        "WORK_ID_VIRTUAL": "N",
141        "REQUIRE_ID": 3634,
142        "REQUIRE_ID_VIRTUAL": "3634",
143        "ORDER_ID": false,
144        "ORDER_ID_VIRTUAL": "N",
145        "STATE": "A",
146        "DATE_CREATE": "2019-06-24 17:20:57",
147        "DATE_UPDATE": "2019-10-14 13:19:41",
148        "CREATOR_ID": 5,
149        "UPDATER_ID": 5,
150        "REQUIRE": {
151          "REQUIRE_ID": 3634,
152          "HODL_ID": 1,
153          "OFFER_ID": 1154,
154          "BRAND": "",
155          "SKU": "gdb1550",
156          "TITLE": "",
157          "LOCK": false,
158          "LOCK_DATE": false,
159          "LOCK_USER_ID": false,
160          "IS_RECOMMENDATION": "Y",
161          "ORDERS": false
162        }
163      },
164      "165": {
165        "RECOMMENDATION_ID": 165,
166        "HODL_ID": 1,
167        "CAR_PROFILE_ID": 1,
168        "TYPE": "WORK",
169        "OFFER_ID": 1296,
170        "WORK_ID": 1076,
171        "WORK_ID_VIRTUAL": "1076",
172        "REQUIRE_ID": false,
173        "REQUIRE_ID_VIRTUAL": "N",
174        "ORDER_ID": false,
175        "ORDER_ID_VIRTUAL": "N",
176        "STATE": "A",
177        "DATE_CREATE": "2019-08-09 13:55:14",
178        "DATE_UPDATE": "2019-10-14 13:18:37",
179        "CREATOR_ID": 5,
180        "UPDATER_ID": 5,
181        "WORK": {
182          "WORK_ID": 1076,
183          "OFFER_ID": 1296,
184          "CUSTOMER_ID": 2,
185          "TYPE": "RECOMMENDATION",
186          "DESCRIPTION": false,
187          "WORKING_HOUR": "2.500",
188          "DISCOUNT": "1.000000",
189          "WORK_COMPLETENESS_ID": 4,
190          "PRICE_OF_HOUR": "1000.00",
191          "SUM": "2500.0000",
192          "SUM_WO_HOURS": "1000.0000000000",
193          "id_car_modification": false,
194          "WORK_OBJECT_ID": 16,
195          "WORK_ACTION_ID": 4,
196          "WORK_COEFFICIENT_ID": false,
197          "WORK_PLACE_BIT": [
198            512
199          ],
200          "WORK_OBJECT_COUNT_ID": 1,
201          "DATE_CREATE": "2019-08-09 13:55:01",
202          "DATE_UPDATE": "2019-08-09 13:55:14",
203          "CREATOR_ID": 5,
204          "UPDATER_ID": 5,
205          "DISCOUNT_PERCENT": "0.000000",
206          "WORK_ACTION_NAME": "Ремонт",
207          "WORK_OBJECT_NAME": "Головка блока цилиндров",
208          "WORK_OBJECT_INFLECT_FLAG": "Y",
209          "WORK_OBJECT_INFLECT_CASE": "rod",
210          "WORK_OBJECT_INFLECT_AS_MULTIPLE": "N",
211          "WORK_OBJECT_COUNT": "1.0",
212          "PERFORMERS": false,
213          "TITLE": "ремонт головки блока цилиндров",
214          "DOCUMENT_TITLE": "ремонт головки блока цилиндров"
215        }
216      },
217      "180": {
218        "RECOMMENDATION_ID": 180,
219        "HODL_ID": 1,
220        "CAR_PROFILE_ID": 1,
221        "TYPE": "WORK",
222        "OFFER_ID": 1422,
223        "WORK_ID": 1191,
224        "WORK_ID_VIRTUAL": "1191",
225        "REQUIRE_ID": false,
226        "REQUIRE_ID_VIRTUAL": "N",
227        "ORDER_ID": false,
228        "ORDER_ID_VIRTUAL": "N",
229        "STATE": "A",
230        "DATE_CREATE": "2019-09-16 20:46:56",
231        "DATE_UPDATE": "2019-09-16 20:46:56",
232        "CREATOR_ID": 5,
233        "UPDATER_ID": 5,
234        "WORK": {
235          "WORK_ID": 1191,
236          "OFFER_ID": 1422,
237          "CUSTOMER_ID": 2,
238          "TYPE": "RECOMMENDATION",
239          "DESCRIPTION": false,
240          "WORKING_HOUR": "3.920",
241          "DISCOUNT": "1.000000",
242          "WORK_COMPLETENESS_ID": 4,
243          "PRICE_OF_HOUR": "1000.00",
244          "SUM": "3920.0000",
245          "SUM_WO_HOURS": "1000.0000000000",
246          "id_car_modification": false,
247          "WORK_OBJECT_ID": 16,
248          "WORK_ACTION_ID": 1,
249          "WORK_COEFFICIENT_ID": false,
250          "WORK_PLACE_BIT": [
251            512
252          ],
253          "WORK_OBJECT_COUNT_ID": 1,
254          "DATE_CREATE": "2019-09-16 20:46:45",
255          "DATE_UPDATE": "2019-09-16 20:46:56",
256          "CREATOR_ID": 5,
257          "UPDATER_ID": 5,
258          "DISCOUNT_PERCENT": "0.000000",
259          "WORK_ACTION_NAME": "Замена",
260          "WORK_OBJECT_NAME": "Головка блока цилиндров",
261          "WORK_OBJECT_INFLECT_FLAG": "Y",
262          "WORK_OBJECT_INFLECT_CASE": "rod",
263          "WORK_OBJECT_INFLECT_AS_MULTIPLE": "N",
264          "WORK_OBJECT_COUNT": "1.0",
265          "PERFORMERS": false,
266          "TITLE": "замена головки блока цилиндров",
267          "DOCUMENT_TITLE": "замена головки блока цилиндров"
268        }
269      }
270    },
271    "MESSAGE": "ok",
272    "CODE": 200
273  }
Обновлено Октябрь 23, 2019

Related Articles