/visits/{id}/
Получает подробную информацию о визите по идентификатору, либо обновляет поля в визите (указанные или все).
Адрес: https://instance_name/api/v1.5/visits/{id}
Методы:
- GET — получает подробную информацию о визите по его идентификатору;
- PUT — обновляет все поля в визите;
- PATCH — обновляет определенные поля в визите.
Content-type: application/json
- GET
- PUT
- PATCH
Параметры path
id
string
Пример запроса
curl –i –X GET
https://test.inspector-cloud.com/api/v1.5/visits/2032/
-H ‘Authorization: Token <<your_token>>’
Пример ответа
Код ответа: 200
{
"id": 2032,
"shop": "1504553224092",
"agent": "agent",
"started_date": "2020-07-27T18:35:46.586695Z",
"task": null,
"latitude": 53.7356226,
"longitude": 91.4279673,
"shop_name": "The one with ondemand task groups",
"shop_area": null,
"gps_shop": {
"id": 5316,
"logo": null,
"route": "939-EAH",
"route_type_description": null,
"customer_id": "1504553224092",
"customer_name": "The one with ondemand task groups",
"region": "South Ashley",
"region_l3": null,
"region_l4": null,
"area": null,
"area_l5": null,
"area_l6": null,
"city": "Garrisonfurt",
"sales_route_id": null,
"latitude": -45.5718055,
"longitude": 110.701806,
"created_at": "2020-06-29T15:24:18.290885Z",
"updated_at": "2021-10-08T08:16:02.513126Z",
"address": "51805 James StreamWilliamsview, NM 65300",
"distr_name": null,
"team_id": null,
"rsm_name": null,
"rsm_code": null,
"tsm_name": null,
"route_type_full": null,
"segment": null,
"pos_code": null,
"matrix_name": null,
"gtm_role_id_description": null,
"id_dealer": null,
"golden_id": null,
"sector": null,
"manager": null,
"inn": null,
"kpp": null,
"sale_channel": null,
"country": "Somalia",
"fss": null,
"fss_code": null,
"sfss": null,
"sfss_code": null,
"em": null,
"em_code": null,
"agency": null,
"agency_region": null,
"kam_food": null,
"kam_food_code": null,
"kam_hpc": null,
"kam_hpc_code": null,
"ctl": null,
"ctl_code": null,
"mte": null,
"mte_code": null,
"nsd": null,
"nsd_code": null,
"visit_plan_id": null,
"driver_id": null,
"sap_code": null,
"sales_group": null,
"visit_type": null,
"hierarchy_l5": null,
"hierarchy_l6": null,
"visit_frequency": null,
"dsd_distr": null,
"store_number": null,
"virtual_flag": null,
"lka_segment": null,
"customer_segment": null,
"y_cust_hier_level_6": null,
"y_cust_hier_level_8": null,
"store_format": null,
"team_route": null,
"route_type_dsd": null,
"route_merch": null,
"service_type": null,
"svm": null,
"tm": null,
"rmm": null,
"kam_ekam": null,
"skam": null,
"days_sequence_code": null,
"weekly_frequency": null,
"bm": null,
"sv": null,
"se": null,
"task_type": null,
"task_subtype": null,
"enabled": true,
"week_days": "1,2,3,4,5,6,7",
"uuid": "5be684a7-7fd8-4256-92cc-b8d50e279a",
"global_channel": null,
"sync_point": null,
"master_code": null,
"dt": null,
"svme": null,
"me": null,
"description_toloka": null,
"visits_per_month": 1,
"supervisor_code": null,
"ka_dt": null,
"svme_code": null,
"svme_email": null,
"me_code": null,
"json": {
"RAR": 16,
"WAV": 17,
"attr": "Test value"
},
"description": "Stop again across.",
"retail_chain": 5,
"store_type": null,
"group": null,
"agent_routes": []
},
"images": [..],
"current_agent_name": "agent",
"current_agent_route": "staging",
"moderation": null,
"results": {..},
"helpdesk": null
}
Параметры ответа
id
string
Уникальный идентификатор визита.
shop
string
Идентификатор магазина.
agent
string
Агент, который выполняет визит.
started_date
string (date-time)
Дата и время начала визита (UTC) в формате «ГГГГ-ММ-ДДTЧЧ:ММ:ССZ».
task
string
latitude
float
Координаты мерчендайзера во время визита. Широта
longitude
float
Координаты мерчендайзера во время визита. Долгота
shop_name
string
shop_area
string
gps_shop
Array of objects
Массив с информацией о точке продаж, в которой проходит визит.
id
string
Идентификатор магазина.
logo
string
route
string
route_type_description
string
customer_id
string
customer_name
string
region
string
region_l3
string
region_l4
string
area
string
area_l5
string
area_l6
string
city
string
sales_route_id
string
latitude
float
longitude
float
created_at
string
updated_at
string
address
string
distr_name
string
team_id
string
rsm_name
string
rsm_code
string
tsm_name
string
route_type_full
string
segment
string
pos_code
string
matrix_name
string
gtm_role_id_description
string
id_dealer
string
golden_id
string
sector
string
manager
string
inn
string
kpp
string
sale_channel
string
country
string
fss
string
fss_code
string
sfss
string
sfss_code
string
em
string
em_code
string
agency
string
agency_region
string
kam_food
string
kam_food_code
string
kam_hpc
string
kam_hpc_code
string
ctl
string
ctl_code
string
mte
string
mte_code
string
nsd
string
nsd_code
string
visit_plan_id
string
driver_id
string
sap_code
string
sales_group
string
visit_type
string
hierarchy_l5
string
hierarchy_l6
string
visit_frequency
string
dsd_distr
string
store_number
string
virtual_flag
string
lka_segment
string
customer_segment
string
y_cust_hier_level_6
string
y_cust_hier_level_8
string
store_format
string
team_route
string
route_type_dsd
string
route_merch
string
service_type
string
svm
string
tm
string
rmm
string
kam_ekam
string
skam
string
days_sequence_code
string
weekly_frequency
string
bm
string
sv
string
se
string
task_type
string
task_subtype
string
enabled
boolean
week_days
string
uuid
string
global_channel
string
sync_point
string
master_code
string
dt
string
svme
string
me
string
description_toloka
string
visits_per_month
number
supervisor_code
string
ka_dt
string
svme_code
string
svme_email
string
me_code
string
json
Array of objects
Просмотреть вложенные объекты
RAR
number
WAV
number
attr
string
description
string
retail_chain
string
store_type
string
group
string
agent_routes
Array of objects
images
Array of objects
Фотографии в визите.
current_agent_name
string
current_agent_route
string
moderation
string
results
Array of objects
Результаты визита.
id
string
status
string
update_type
string
message_type
text
Тип данных, в котором выводится результат.
message
text
Информация о результатах визита.
helpdesk
string
Параметры path
id
string
Пример запроса
curl –i –X PUT
https://test.inspector-cloud.com/api/v1.5/visits/2032/
-H ‘Authorization: Token <<your_token>>’
-F "id=9846"
...
Пример ответа
Код ответа: 200
{
"id": 9846,
"shop": "1504553224092",
"agent": "agent",
"started_date": "2020-07-27T18:35:46.586695Z",
"task": null,
"latitude": 53.7356226,
"longitude": 91.4279673,
"shop_name": "The one with ondemand task groups",
"shop_area": null,
"gps_shop": {..},
"images": [..],
"current_agent_name": "agent",
"current_agent_route": "staging",
"moderation": null,
"results": {..},
"helpdesk": null
}
Параметры path
id
string
Пример запроса
curl –i –X PATCH
https://test.inspector-cloud.com/api/v1.5/visits/2032/
-H ‘Authorization: Token <<your_token>>’
-F "id=9846" \
-F "shop=1504553224"
Пример ответа
Код ответа: 200
{
"id": 9846,
"shop": "1504553224",
"agent": "agent",
"started_date": "2020-07-27T18:35:46.586695Z",
"task": null,
"latitude": 53.7356226,
"longitude": 91.4279673,
"shop_name": "The one with ondemand task groups",
"shop_area": null,
"gps_shop": {..},
"images": [..],
"current_agent_name": "agent",
"current_agent_route": "staging",
"moderation": null,
"results": {..},
"helpdesk": null
}