/visits
Retrieves a list of visits records or creates a new one.
Adress: https://instance_name/api/v1.5/visits/
Methods:
- GET — list visits;
 - POST — create visit.
 
Content-type: application/json
- GET
 - POST
 
Request body parameters
limit integer
Number of results to return per page.
offset integer
The initial index from which to return the results.
Request example
curl –i –X GET
  https://test.inspector-cloud.com/api/v1.5/visits/
  -H ‘Authorization: Token <<your_token>>’ 
  –F "limit=1" \
  –F "offset=0" 
Response example
{
  "count": 1,
  "next": "http://example.com",
  "previous": null,
  "results": [
    {
      "id": 2323,
      "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-b8d50e279a20",
        "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. Arrive across develop address across. Business suffer responsibility choice rich account involve.",
        "retail_chain": 5,
        "store_type": null,
        "group": null,
        "agent_routes": []
      },
      "images": [
        {
          "12859": "https://test.inspector-cloud.com/media/2020/07/27/b42e4d19-05aa-4485-8141-4bb59775fce8.jpg"
        }
      ],
      "current_agent_name": "agent",
      "current_agent_route": "staging",
      "moderation": null,
      "results": {
        "id": 25314,
        "status": "POSITIVE",
        "update_type": "VISIT RESULTS",
        "message_type": "TEXT",
        "message": " <h2> Количество обработанных кассовых узлов: 5 из 3 </h2> ...",
        "created_date": "2020-07-27T18:43:13.624437Z",
        "updated_at": "2020-07-27T18:43:13.624482Z",
        "message_short": null,
        "agent": 864,
        "visit": 2323,
        "scene": null
      },
      "helpdesk": null
    }
  ]
}
Response definitions
count integer
next string (uri) Nullable
Next page.
previous string (uri) Nullable
Previous page.
results Array of objects
Required. Array of objects with information about planograms.
id string
Visit ID.
shop string
Shop ID.
agent string
The agent who performs the visit.
started_date string (date-time)
Date and time of the start of the visit (UTC) in the format «YYYY-MM-DDTHH:MM:SSZ».
task string
latitude float
The coordinates of the merchandiser during the visit. Width
longitude float
The coordinates of the merchandiser during the visit. Longitude
shop_name string
shop_area string
gps_shop Array of objects
An array with information about the point of sale where the visit takes place.
id string
Shop ID.
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
View nested 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
Photos in visit.
current_agent_name string
current_agent_route string
moderation string
results Array of objects
Visit results.
id string
status string
update_type string
message_type text
The data type in which the result is output.
message text
Information about the results in visit.
helpdesk string
Request body parameters
id string
Visit ID.
shop string
Client-specific customer/outlet/shop/... ID.
agent string
Client-specific agent name/id/route/...
started_date string (date-time)
Date and time of the visit start (UTC time). To create a visit, expect a date in the format «YYYY-MM-DDTHH:MM:SSZ».
latitude float 
Location of the merchandiser at the time of the visit by latitude.
longitude float 
Location of the merchandiser at the time of the visit by longitude.
Request example
curl –i –X POST
  https://test.inspector-cloud.com/api/v1.5/visits/ 
  -H ‘Authorization: Token <<your_token>>’ 
  -F "id=2323" \ 
  -F "shop=1504553224092" \
  -F "agent=alex"
  ...
Response example
Response code: 201