GET /visits/{id}
Returns information about visit by ID.
Address: GET https://instance_name/api/data/v1.3/visits/{id}/
Content-type: application/json
Path parameters
id
integer
Request example
curl –i –X GET
https://test.inspector-cloud.com/api/data/v1.3/visits/324096/
-H ‘Authorization: Token <<your_token>>’
Response example
Response code: 200
{
"id": 324096,
"cid": "",
"portal_url": "https://test.inspector-cloud.com/portal/visit/324096",
"agent_id": 5633,
"current_agent_name": "Alex",
"current_agent_route": "164780",
"current_agent_role": null,
"store_id": 11020,
"customer_id": "{9E90FAC2-4073-E911-811D-00505601}",
"is_closed": true,
"is_deleted": false,
"is_new": true,
"latitude": 54.5208487,
"longitude": 37.0463798,
"closed_latitude": 54.520429,
"closed_longitude": 37.0467814,
"closed_at": "2020-07-29T12:40:07.440127+03:00",
"created_at": "2020-07-29T10:24:53.526334+03:00",
"updated_at": "2020-07-30T08:07:03.598354Z",
"app_created_at": "2020-07-29T07:24:50.291000Z",
"app_closed_at": "2020-07-29T09:39:54.146000Z",
"scenes": [
{
"id": 7969,
"created_at": "2020-07-29T07:24:55.860627Z",
"task_id": 3835,
"portal_url": "https://test.inspector-cloud.com/portal/visit/324096/scene/7969",
"images": [],
"image_quality": [],
"clone_id": 0,
"question_groups": [],
"assortment": [],
"facing_counts": []
},
{
"id": 8022,
"created_at": "2020-07-29T08:49:31.907239Z",
"task_id": 48,
"portal_url": "https://test.inspector-cloud.com/portal/visit/324096/scene/8022",
"images": [
{
"id": 26810278,
"created_at": "2020-07-29T08:49:33.007637Z",
"original_url": "https://storage.com/picture.jpg",
"corrected_perspective_url": "https://storage.com/picture.jpg",
"is_deleted": false,
"annotations": [],
"shelf_annotations": [],
"price_annotations": []
}
],
"image_quality": [],
"clone_id": 0,
"question_groups": [],
"assortment": [],
"facing_counts": []
},
{
"id": 8029,
"created_at": "2020-07-29T09:01:16.174781Z",
"task_id": 7185,
"portal_url": "https://test.inspector-cloud.com/portal/visit/324096/scene/8029",
"images": [
{
"id": 26873089,
"created_at": "2020-07-29T09:22:38.401699Z",
"original_url": "https://storage.com/picture.jpg",
"corrected_perspective_url": "https://storage.com/picture.jpg",
"is_deleted": false,
"annotations": [],
"shelf_annotations": [],
"price_annotations": []
}
],
"image_quality": [],
"clone_id": 0,
"question_groups": [
{
"id": 130,
"questions": [
{
"id": 25,
"type": "select_one",
"answer": {
"66942": "Промо выполняется"
},
"options": [
{
"id": 66943,
"value": "Не пришел продукт"
},
{
"id": 66944,
"value": "Недостаточный сток"
},
{
"id": 66948,
"value": "Виртуальный сток"
},
{
"id": 66945,
"value": "Продукт в блоке"
},
{
"id": 66946,
"value": "Нет инфо о промо в точке"
},
{
"id": 66947,
"value": "Нет в матрице сети"
},
{
"id": 66942,
"value": "Промо выполняется"
}
],
"created_at": "2020-03-11T14:33:16.387348Z",
"text": "Статус выполнения промо",
"required": false,
"cid": "PROMO_1"
},
{
"id": 26,
"type": "text",
"answer": null,
"options": [],
"created_at": "2020-03-11T14:33:16.416687Z",
"text": "Комментарий",
"required": false,
"cid": "PROMO_5"
}
],
"created_at": "2021-09-24T17:36:29.466080Z",
"name": "Промо",
"cid": "PROMO_QUESTION_GROUPS"
}
],
"assortment": [],
"facing_counts": []
}
],
"kpi_values": [],
"prices": [
{
"id": 619644,
"scene_id": 8022,
"sku_id": 155279,
"sku_cid": "5900020023308",
"price": 19,
"target_price": null,
"is_promo": true,
"id_competitor": "",
"updated_at": "2020-07-29T08:50:12.223645Z"
},
{
"id": 619645,
"scene_id": 8022,
"sku_id": 155282,
"sku_cid": "5900020023322",
"price": 45,
"target_price": null,
"is_promo": false,
"id_competitor": "",
"updated_at": "2020-07-29T08:50:12.303729Z"
},
{
"id": 619658,
"scene_id": 8022,
"sku_id": 166776,
"sku_cid": "5900020004451",
"price": 109,
"target_price": null,
"is_promo": true,
"id_competitor": "",
"updated_at": "2020-07-29T08:50:12.419022Z"
}
],
"oos_reasons": [
{
"id": 7183552,
"scene_id": 8022,
"sku_id": 166823,
"sku_cid": "7613036868983",
"reason": "Продукт в блоке",
"updated_at": "2020-07-29T09:30:14.828636Z"
},
{
"id": 7184629,
"scene_id": 8022,
"sku_id": 123878,
"sku_cid": "4607085440583",
"reason": "Не пришел продукт",
"updated_at": "2020-07-29T09:32:46.215048Z"
},
{
"id": 7184018,
"scene_id": 8022,
"sku_id": 171682,
"sku_cid": "4600680012162",
"reason": "Ошибка распознавания",
"updated_at": "2020-07-29T09:31:20.650770Z"
}
],
"dqi": [
{
"id": 1979894965,
"uuid": "844e8e37-e4b5-4c8f-9fa8-933e3726e526",
"cid": "DQI_IMAGE_PERSPECTIVE_ANGLE_HORIZONTAL",
"created_at": "2021-09-22T13:27:05.049034Z",
"updated_at": "2021-10-22T15:53:40.395212Z",
"name": "Perspective angle horizontal",
"description": "",
"related_to": "IMAGE",
"severity": "INFO",
"threshold": 0.3
}
]
}
Response definitions
id
integer
Visit ID.
cid
string <= 255 characters
Visit ID in the user's system.
portal_url
string
Visit link on the portal.
agent_id
string
Agent ID.
current_agent_name
string <= 255 characters
current_agent_route
string <= 255 characters
Nullable
current_agent_role
string
store_id
integer
Store ID.
customer_id
string non-empty
Nullable
Customer ID.
is_closed
boolean
Indicates whether the visit is closed. True
if the visit is closed.
is_deleted
boolean
Indicates whether the visit has been deleted. True
if the visit is deleted.
is_new
boolean
A sign of whether the visit is new. True
if the visit is new.
latitude
number Nullable
Latitude coordinate at the start of the visit.
longitude
number Nullable
Longitude coordinate at the start of the visit.
closed_latitude
number Nullable
Latitude coordinate at the time of closing the visit.
closed_longitude
number Nullable
Longitude coordinate at the time of closing the visit.
closed_at
string (date-time)
created_at
string (date-time)
updated_at
string (date-time)
Date of visit update in the format «YYYY-MM-DDTHH:MM:SSZ».
app_created_at
string (date-time) Nullable
Date of visit creation in the application in the format «YYYY-MM-DDTHH:MM:SSZ».
app_closed_at
string (date-time) Nullable
Closing date of visit in the application in the format «YYYY-MM-DDTHH:MM:SSZ».
scenes
Array of objects
An array with information about the scenes in the visit.
kpi_values
Array of objects
An array with information about KPI in the visit.
prices
Array of objects
An array with information about the price tags in the visit.
oos_reasons
Array of objects
An array with information about the OOS reasons in the visit.
dqi
Array of objects