Visits
Methods allow you to get a complete list or a specific visit in Eyrene, view information about them, update all fields, or only select visit fields.
Retrieve a list of visits.
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
- limitstringDescriptionThe number of results to return per page.
- offsetstringDescriptionThe initial index from which to return the results.
curl –i –X GET
https://test.eyrene.com/api/v1.5/sku/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
–F "limit=1" \
–F "offset=0" {
"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 parameters
count integer
The number of visits.
next string (uri) Nullable
Next page.
previous string (uri) Nullable
Previous page.
results array of objects
An array of objects with information about visits:
- 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.
- images array of objects Photos the 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 string The data type in which the result is output.
- message text Information about the results of the visit.
- helpdesk string
Сreate a new visit.
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
- idstringDescriptionVisit ID.
- shopstringDescriptionClient-specific customer/outlet/shop/... ID.
- agentstringDescriptionClient-specific agent name/id/route/...
- started_datestringDescriptionDate and time of the visit start (UTC time). To create a visit, expect a date in the format «YYYY-MM-DDTHH:MM:SSZ».
- latitudeIntegerDescriptionLocation of the merchandiser at the time of the visit by latitude.
- longitudestringDescriptionLocation of the merchandiser at the time of the visit by longitude.
curl –i –X POST
https://test.eyrene.com/api/v1.5/sku/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
-F "id=2323" \
-F "shop=1504553224092" \
-F "agent=alex"
...{
"result": "CREATED"
}Retrieve detailed information about a visit by ID.
- idstringrequiredDescriptionVisit ID.
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
curl –i –X GET
https://test.eyrene.com/api/v1.5/visits/2032/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ {
"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
}Response parameters
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 of information about the point of sale where the visit takes place.
images array of objects
Photos in the visit.
current_agent_name string
current_agent_route string
moderation string
results array of objects
Visit results.
helpdesk string
Update all fields of visit.
- idstringrequiredDescriptionSKU ID.
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
curl –i –X PUT
https://test.eyrene.com/api/v1.5/visits/2032/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
-F "id=9846"
...{
"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
}Update some of the visit fields.
- idstringrequiredDescriptionSKU ID.
- AuthorizationstringrequiredDescriptionString in "Token XXXXXX..." format.
- idstringDescriptionSKU ID.
- cidstringDescriptionClient-specific SKU ID, e.g. internal code.
- ean13stringDescriptionEuropean Article Number.
- imagestringDescriptionSKU image ID, available via /uploads or /uploads_by_url.
- namestringDescriptionHuman readable SKU name.
- brandstringDescriptionBrand ID.
- categorystringDescriptionCategory ID.
- manufacturerstringDescriptionManufacturer ID.
- size_x_mmIntegerDescriptionProduct width in mm.
- size_y_mmIntegerDescriptionProduct height in mm.
- size_z_mmIntegerDescriptionProduct depth in mm.
curl –i –X PATCH
https://test.eyrene.com/api/v1.5/sku/2032/
-H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’
-F "id=9846" \
-F "shop=1504553224"{
"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
}