---
title: Visits
slug: visits
docTags: 
createdAt: 2022-04-14T07:58:15.000Z
---

Methods allow you to get a list of visits or information on a specific visit. Also, you can confirm receipt of information about the visit and change the value of KPI in visit.

***

::::ExpandableHeading{isOpen="true"}
# <font color="#2166ae">GET</font> /visits

Return a list of visits.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/data/v1.0/visits/",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "limit",
        "type": "Integer",
        "description": "The number of results to return per page."
      },
      {
        "kind": "optional",
        "name": "offset",
        "type": "Integer",
        "description": "The initial index from which to return the results."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n   \"count\":421,\n   \"next\":\"https://test.eyrene.com/api/data/v1.0/visits/?limit=30&offset=60\",\n   \"previous\":\"https://test.eyrene.com/api/data/v1.0/visits/?limit=30\",\n   \"results\":[\n      {\n         \"id\":426,\n         \"cid\":\"\",\n         \"created_at\":\"2021-11-17T12:33:40.835225Z\",\n         \"updated_at\":\"2021-11-17T12:33:40.835950Z\"\n      },\n      {\n         \"id\":427,\n         \"cid\":\"\",\n         \"created_at\":\"2021-11-17T12:33:40.072128Z\",\n         \"updated_at\":\"2021-11-17T12:36:05.343056Z\"\n      },\n      {\n         \"id\":428,\n         \"cid\":\"\",\n         \"created_at\":\"2021-11-17T12:33:38.411075Z\",\n         \"updated_at\":\"2021-11-17T12:33:38.412059Z\"\n      }\"...\"\n   ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/visits/\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "GET /visits",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example",
  "legacyHash": "abZU5w_e01RY7v1fi6pyQ"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1/agents/agents_list#response-definitions)

***

**`count`** *integer*

The number of visits.

***

**`next`** *string (uri)* <font color="#2166ae">Nullable</font>

Next page.

***

**`previous`** *string (uri)* <font color="#2166ae">Nullable</font>

Previous page.

***

**`results`** *array of objects*

An array of objects with information about manufacturers.

- **`id`** *integer*
  Visit ID.
- **`cid`** *string* <font color="#2166ae">&lt;= 255 characters</font>
  Visit ID in the user's system.
- **`name`** *string*
  Visit name.
- **`created_at`** *string (date-time)*
  Date and time of creation in the format «YYYY-MM-DDTHH\:MM\:SSZ».
- **`updated_at`** *string (date-time)*
  Date and time of data update in the format «YYYY-MM-DDTHH\:MM\:SSZ».

***


::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#2166ae">GET</font> /visits/&#x7B;id}

Returns information about visit by ID.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://instance_name/api/data/v1.0/visits/{id}",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Visit ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n  \"id\": 324096,\n  \"cid\": \"\",\n  \"portal_url\": \"https://test.eyrene.com/portal/visit/324096\",\n  \"agent_id\": 5633,\n  \"current_agent_name\": \"Alex\",\n  \"current_agent_route\": \"164780\",\n  \"current_agent_role\": null,\n  \"store_id\": 11020,\n  \"customer_id\": \"{9E90FAC2-4073-E911-811D-00505601}\",\n  \"is_closed\": true,\n  \"is_deleted\": false,\n  \"is_new\": true,\n  \"latitude\": 54.5208487,\n  \"longitude\": 37.0463798,\n  \"closed_latitude\": 54.520429,\n  \"closed_longitude\": 37.0467814,\n  \"closed_at\": \"2020-07-29T12:40:07.440127+03:00\",\n  \"created_at\": \"2020-07-29T10:24:53.526334+03:00\",\n  \"updated_at\": \"2020-07-30T08:07:03.598354Z\",\n  \"app_created_at\": \"2020-07-29T07:24:50.291000Z\",\n  \"app_closed_at\": \"2020-07-29T09:39:54.146000Z\",\n  \"scenes\": [\n    {\n      \"id\": 7969,\n      \"created_at\": \"2020-07-29T07:24:55.860627Z\",\n      \"task_id\": 3835,\n      \"portal_url\": \"https://test.eyrene.com/portal/visit/324096/scene/7969\",\n      \"images\": [],\n      \"image_quality\": [],\n      \"clone_id\": 0,\n      \"question_groups\": [],\n      \"assortment\": [],\n      \"facing_counts\": []\n    },\n    {\n      \"id\": 8022,\n      \"created_at\": \"2020-07-29T08:49:31.907239Z\",\n      \"task_id\": 48,\n      \"portal_url\": \"https://test.eyrene.com/portal/visit/324096/scene/8022\",\n      \"images\": [\n        {\n          \"id\": 26810278,\n          \"created_at\": \"2020-07-29T08:49:33.007637Z\",\n          \"original_url\": \"https://storage.com/picture.jpg\",\n          \"corrected_perspective_url\": \"https://storage.com/picture.jpg\",\n          \"is_deleted\": false,\n          \"annotations\": [],\n          \"shelf_annotations\": [],\n          \"price_annotations\": []\n        }\n      ],\n      \"image_quality\": [],\n      \"clone_id\": 0,\n      \"question_groups\": [],\n      \"assortment\": [],\n      \"facing_counts\": []\n    },\n    {\n      \"id\": 8029,\n      \"created_at\": \"2020-07-29T09:01:16.174781Z\",\n      \"task_id\": 7185,\n      \"portal_url\": \"https://test.inspector-cloud.com/portal/visit/324096/scene/8029\",\n      \"images\": [\n        {\n          \"id\": 26873089,\n          \"created_at\": \"2020-07-29T09:22:38.401699Z\",\n          \"original_url\": \"https://storage.com/picture.jpg\",\n          \"corrected_perspective_url\": \"https://storage.com/picture.jpg\",\n          \"is_deleted\": false,\n          \"annotations\": [],\n          \"shelf_annotations\": [],\n          \"price_annotations\": []\n        }\n      ],\n      \"image_quality\": [],\n      \"clone_id\": 0,\n      \"question_groups\": [\n        {\n          \"id\": 130,\n          \"questions\": [\n            {\n              \"id\": 25,\n              \"type\": \"select_one\",\n              \"answer\": {\n                \"66942\": \"Promo can be done\"\n              },\n              \"options\": [\n                {\n                  \"id\": 66943,\n                  \"value\": \"Product did not arrive\"\n                },\n                {\n                  \"id\": 66944,\n                  \"value\": \"Insufficient stock\"\n                },\n                {\n                  \"id\": 66948,\n                  \"value\": \"Virtual stock\"\n                },\n                {\n                  \"id\": 66945,\n                  \"value\": \"Product is blocked\"\n                },\n                {\n                  \"id\": 66946,\n                  \"value\": \"No promo info in store\"\n                },\n                {\n                  \"id\": 66947,\n                  \"value\": \"Not in the chain matrix\"\n                },\n                {\n                  \"id\": 66942,\n                  \"value\": \"Promo can be done\"\n                }\n              ],\n              \"created_at\": \"2020-03-11T14:33:16.387348Z\",\n              \"text\": \"Promo status\",\n              \"required\": false,\n              \"cid\": \"PROMO_1\"\n            },\n            {\n              \"id\": 26,\n              \"type\": \"text\",\n              \"answer\": null,\n              \"options\": [],\n              \"created_at\": \"2020-03-11T14:33:16.416687Z\",\n              \"text\": \"Description\",\n              \"required\": false,\n              \"cid\": \"PROMO_5\"\n            }\n          ],\n          \"created_at\": \"2021-09-24T17:36:29.466080Z\",\n          \"name\": \"Promo\",\n          \"cid\": \"PROMO_QUESTION_GROUPS\"\n        }\n      ],\n      \"assortment\": [],\n      \"facing_counts\": []\n    }\n  ],\n  \"kpi_values\": [],\n  \"prices\": [\n    {\n      \"id\": 619644,\n      \"scene_id\": 8022,\n      \"sku_id\": 155279,\n      \"sku_cid\": \"5900020023308\",\n      \"price\": 19,\n      \"target_price\": null,\n      \"is_promo\": true,\n      \"id_competitor\": \"\",\n      \"updated_at\": \"2020-07-29T08:50:12.223645Z\"\n    },\n    {\n      \"id\": 619645,\n      \"scene_id\": 8022,\n      \"sku_id\": 155282,\n      \"sku_cid\": \"5900020023322\",\n      \"price\": 45,\n      \"target_price\": null,\n      \"is_promo\": false,\n      \"id_competitor\": \"\",\n      \"updated_at\": \"2020-07-29T08:50:12.303729Z\"\n    },\n    {\n      \"id\": 619658,\n      \"scene_id\": 8022,\n      \"sku_id\": 166776,\n      \"sku_cid\": \"5900020004451\",\n      \"price\": 109,\n      \"target_price\": null,\n      \"is_promo\": true,\n      \"id_competitor\": \"\",\n      \"updated_at\": \"2020-07-29T08:50:12.419022Z\"\n    }\n  ],\n  \"oos_reasons\": [\n    {\n      \"id\": 7183552,\n      \"scene_id\": 8022,\n      \"sku_id\": 166823,\n      \"sku_cid\": \"7613036868983\",\n      \"reason\": \"Product is blocked\",\n      \"updated_at\": \"2020-07-29T09:30:14.828636Z\"\n    },\n    {\n      \"id\": 7184629,\n      \"scene_id\": 8022,\n      \"sku_id\": 123878,\n      \"sku_cid\": \"4607085440583\",\n      \"reason\": \"Product did not arrive\",\n      \"updated_at\": \"2020-07-29T09:32:46.215048Z\"\n    },\n    {\n      \"id\": 7184018,\n      \"scene_id\": 8022,\n      \"sku_id\": 171682,\n      \"sku_cid\": \"4600680012162\",\n      \"reason\": \"Recognition error\",\n      \"updated_at\": \"2020-07-29T09:31:20.650770Z\"\n    }\n  ],\n  \"dqi\": [\n    {\n      \"id\": 1979894965,\n      \"uuid\": \"844e8e37-e4b5-4c8f-9fa8-933e3726e526\",\n      \"cid\": \"DQI_IMAGE_PERSPECTIVE_ANGLE_HORIZONTAL\",\n      \"created_at\": \"2021-09-22T13:27:05.049034Z\",\n      \"updated_at\": \"2021-10-22T15:53:40.395212Z\",\n      \"name\": \"Perspective angle horizontal\",\n      \"description\": \"\",\n      \"related_to\": \"IMAGE\",\n      \"severity\": \"INFO\",\n      \"threshold\": 0.3\n    }\n  ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/visits/324096/\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "GET /visits/{id}",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-1",
  "legacyHash": "CjfFfYrVUW7NWQYeALV-t"
}
```
:::
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#3b9f0f">POST</font> /visits/&#x7B;id}/ack

Confirm receipt of information about the visit. Allows to get an only new visits list.



:::hint{type="warning"}
**Attention**
The is\_new visit attribute is reset to true each time the visit is updated
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://instance_name/api/data/v1.0/visits/{id}/ack/",
  "name": "Request example",
  "method": "POST",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Visit ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "cid",
        "type": "Integer",
        "description": "Visit ID in the user system."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n   \"details\": \"OK\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/visits/98495168681/ack/\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "POST /visits/{id}/ack/",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-2",
  "legacyHash": "-Uu6M1MFZ0YOvIQtLt47E"
}
```
:::
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#3b9f0f">POST</font> /visits/&#x7B;id}/kpivalue

Change the KPI value in visit.

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://instance_name/api/data/v1.0/visits/{id}/kpivalue/",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Visit ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format"
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "kpi",
        "type": "Number",
        "description": "KPI ID."
      },
      {
        "kind": "required",
        "name": "value",
        "type": "Number",
        "description": "New KPI value."
      },
      {
        "kind": "optional",
        "name": "target_value",
        "type": "Number",
        "description": "KPI target value."
      },
      {
        "kind": "optional",
        "name": "category",
        "type": "String",
        "description": "KPI category."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n   \"result\": \"Visit KPI value changed\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/visits/125/\n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’\n  –F \"kpi=86\" \\\n  –F \"value=90\" \\\n  –F \"value=80\" \\\n  –F \"category=tea\" \\",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "POST /visits/{id}/kpivalue",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-3",
  "legacyHash": "AHcg9mimUvcwyKnWOlBAy"
}
```
:::
::::

***

