Skip to main content

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

Required. Visit ID.

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)

Required. Closing date of visit in the format «YYYY-MM-DDTHH:MM:SSZ».

created_at string (date-time)

Required. Date of visit creation in the format «YYYY-MM-DDTHH:MM:SSZ».

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.

id integer

Scene ID.


created_at string (date-time)

Date of creation of the scene in the format «YYYY-MM-DDTHH:MM:SSZ».


task_id integer

Task ID.


portal_url string

Scene link on the portal.


images string

Scene images.


image_quality object

Information about the data from the image.

id integer

Required.

sharpness integer

Required.

perspective_angles integer

Required.

shelfs_count integer non-empty

Required.

facing_count integer

Required.

clone_id integer [ -2147483648 .. 2147483647 ] Nullable

ID of the image copy.


question_groups object

View nested objects

id integer


questions object

View nested objects

id integer


type string non-empty


answer string non-empty


options Array of objects

Required.
View nested objects

id integer


value string Nullable`



created_at string (date-time)


text string Nullable


required boolean


cid string <= 255 characters Nullable


created_at string (date-time)


name string <= 255 characters Nullable


cid string <= 255 characters Nullable



assortment object

View nested objects

sku_id string


sku_cid string


quantity integer


status string



facing_counts object

View nested objects

sku_id integer

Required.

sku_cid string


FG integer non-empty

Required.


kpi_values Array of objects

An array with information about KPI in the visit.

id integer


kpi_id string


kpi_cid string non-empty


updated_at string (date-time)


category string <= 255 characters Nullable


value number

Required. KPI value.

target_value string Nullable

The target value of the KPI.


details object

Required.

exclude_from_reports boolean


exclude_from_reports_comment string <= 255 characters Nullable


clone_id string [ -2147483648 .. 2147483647 ]



prices Array of objects

An array with information about the price tags in the visit.

id integer


scene_id string


sku_id string


sku_cid string non-empty


price number Nullable


target_price number Nullable


is_promo boolean Nullable


id_competitor string


updated_at string (date-time)



oos_reasons Array of objects

An array with information about the OOS reasons in the visit.

id integer


scene_id string


sku_id string


sku_cid string non-empty


reason string Nullable


updated_at string (date-time)


diagnosis string

The result of OOS processing determined by internal project rules.


fixed bollean

Was the SKU identified as “found” as a result of photo proof.



dqi Array of objects

Array with information about DQI. available from version 1.1 and higher

id integer (bigint)

DQI ID.


type integer (bigint)

Тип DQI.


created_at string (date-time)

Date and time of creation DQI in format «YYYY-MM-DDTHH:MM:SSZ».


updated_at string (date-time)

Date and time of updating DQI in format «YYYY-MM-DDTHH:MM:SSZ».


visit_id integer (bigint) Nullable

Visit ID.


scene_id integer (bigint) Nullable

Scene ID.


image_id integer (bigint) Nullable

Image ID.


severity string

DQI severity.


threshold float

Required. The threshold below or above which the DQI should not fall.

value float

Required. DQI value.

json json

Additional information on DQI is determined by the internal rules of the project.