Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
external:integration:api:intersections_inner [2020/08/13 15:23]
alexander удалено
— (текущий)
Строка 1: Строка 1:
-{{indexmenu_n>60}} 
-======= Внутренние Пересечения ====== 
  
-Возвращает пересечения зон объекта друг с другом. 
- 
-Возвращаемая структура состоит из массива данных по этажам объекта. Каждая такая структура включает в себя следующие поля: 
- 
-  * id - идентификатор этажа, 
-  * floor - номер этажа, 
-  * area_ids - идентификаторы зон, находящихся на данном этаже, 
-  * scale - масштаб плана (пикселей на метр), 
-  * floor_distribution - структура, описывающая пересечения этажа с этажами, 
-  * floor_distribution.id - идентификатор этажа, с которым у этажа <floor> есть пересечения за выбранный период, 
-  * floor_distribution.floor - номер этажа, с которым у этажа <floor> есть пересечения за выбранный период, 
-  * floor_distribution.count - количество посетителей этажа <floor>, бывших за выбранный период на данном этаже, 
-  * floor_distribution.percent - процент посетителей этажа <floor>, бывших за выбранный период на данном этаже, 
-  * intersections - структура, включающая в себя данные по пересечениям зон этого этажа с другими зонами и этажами, 
-  * intersections.<area_id>.name - наименование зоны, 
-  * intersections.<area_id>.is_entry - флаг, обозначающий, является ли зона зоной входа, 
-  * intersections.<area_id>.area_type - тип зоны (tenant - арендатор, passage - галерея), 
-  * intersections.<area_id>.count - количество посетителей зоны за выбранный период, 
-  * intersections.<area_id>.distribution - структура, описывающая пересечения зоны с другими зонами, 
-  * intersections.<area_id>.distribution.<another_area_id>.count - количество посетителей зоны <area_id>, бывших за выбранный период также в зоне <another_area_id>, 
-  * intersections.<area_id>.distribution.<another_area_id>.percent - процент посетителей зоны <area_id>, бывших за выбранный период также в зоне <another_area_id>, 
-  * intersections.<area_id>.floor_distribution - структура, описывающая пересечения зоны с этажами, 
-  * intersections.<area_id>.floor_distribution.floor - номер этажа, с которым у зоны <area_id> есть пересечения за выбранный период, 
-  * intersections.<area_id>.floor_distribution.count - количество посетителей зоны <area_id>, бывших за выбранный период на данном этаже, 
-  * intersections.<area_id>.floor_distribution.percent - процент посетителей зоны <area_id>, бывших за выбранный период на данном этаже, 
-  * intersections.<area_id>.point - координаты центра зоны (X, Y) <area_id> в метрах. (Для отбражения необходимо использовать параметр scale, описанный выше) 
- 
- 
-===== URL ===== 
-''/object/:object_id/intersections/inner'' 
- 
-===== Method ===== 
-''GET'' 
- 
-===== GET Params ===== 
-  * ''from=[date]'' 
-  * ''to=[date]'' 
-   
-===== Headers ===== 
-''x-token=[string]'' 
- 
-===== Response ===== 
-<code javascript> 
-[ 
-{ 
-  "id": 3303, 
-  "floor": 1, 
-  "floor_distribution": [ 
-        { 
-          "floor": 2, 
-          "count": 8863, 
-          "percent": 100 
-        } 
-  ], 
-  "intersections": { 
-    "487": { 
-      "name": "Главный вход", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 8863, 
-      "distribution": { 
-        "488": { 
-          "count": 3402, 
-          "percent": 38.4 
-        }, 
-        "489": { 
-          "count": 6538, 
-          "percent": 73.8 
-        }, 
-        "490": { 
-          "count": 1729, 
-          "percent": 19.5 
-        }, 
-        "491": { 
-          "count": 3431, 
-          "percent": 38.7 
-        }, 
-        "509": { 
-          "count": 0, 
-          "percent": 0 
-        } 
-      }, 
-      "floor_distribution": [ 
-        { 
-          "floor": 1, 
-          "count": 8863, 
-          "percent": 100 
-        }, 
-        { 
-          "floor": 2, 
-          "count": 8863, 
-          "percent": 100 
-        } 
-      ], 
-      "point": [ 
-        352.444444444444, 
-        80.4444444444444 
-      ] 
-    }, 
-    "488": { 
-      "name": "Фудкорт", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 16098, 
-      "distribution": { 
-        "487": { 
-          "count": 3402, 
-          "percent": 21.1 
-        }, 
-        "489": { 
-          "count": 11709, 
-          "percent": 72.7 
-        }, 
-        "490": { 
-          "count": 3374, 
-          "percent": 21 
-        }, 
-        "491": { 
-          "count": 6080, 
-          "percent": 37.8 
-        }, 
-        "509": { 
-          "count": 0, 
-          "percent": 0 
-        } 
-      }, 
-      "floor_distribution": [ 
-        { 
-          "floor": 1, 
-          "count": 16098, 
-          "percent": 100 
-        }, 
-        { 
-          "floor": 2, 
-          "count": 16098, 
-          "percent": 100 
-        } 
-      ], 
-      "point": [ 
-        321.333333333333, 
-        230.222222222222 
-      ] 
-    }, 
-    "489": { 
-      "name": "Reebok", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 35751, 
-      "distribution": { 
-        "487": { 
-          "count": 6538, 
-          "percent": 18.3 
-        }, 
-        "488": { 
-          "count": 11709, 
-          "percent": 32.8 
-        }, 
-        "490": { 
-          "count": 7214, 
-          "percent": 20.2 
-        }, 
-        "491": { 
-          "count": 14163, 
-          "percent": 39.6 
-        }, 
-        "509": { 
-          "count": 0, 
-          "percent": 0 
-        } 
-      }, 
-      "floor_distribution": [ 
-        { 
-          "floor": 1, 
-          "count": 35751, 
-          "percent": 100 
-        }, 
-        { 
-          "floor": 2, 
-          "count": 35751, 
-          "percent": 100 
-        } 
-      ], 
-      "point": [ 
-        223.111111111111, 
-        144.444444444444 
-      ] 
-    }, 
-    "490": { 
-      "name": "Декатлон", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 9876, 
-      "distribution": { 
-        "487": { 
-          "count": 1729, 
-          "percent": 17.5 
-        }, 
-        "488": { 
-          "count": 3374, 
-          "percent": 34.2 
-        }, 
-        "489": { 
-          "count": 7214, 
-          "percent": 73 
-        }, 
-        "491": { 
-          "count": 7664, 
-          "percent": 77.6 
-        }, 
-        "509": { 
-          "count": 0, 
-          "percent": 0 
-        } 
-      }, 
-      "floor_distribution": [ 
-        { 
-          "floor": 1, 
-          "count": 9876, 
-          "percent": 100 
-        }, 
-        { 
-          "floor": 2, 
-          "count": 9876, 
-          "percent": 100 
-        } 
-      ], 
-      "point": [ 
-        125.777777777778, 
-        47.5555555555556 
-      ] 
-    }, 
-    "491": { 
-      "name": "Площадка 2", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 18761, 
-      "distribution": { 
-        "487": { 
-          "count": 3431, 
-          "percent": 18.3 
-        }, 
-        "488": { 
-          "count": 6080, 
-          "percent": 32.4 
-        }, 
-        "489": { 
-          "count": 14163, 
-          "percent": 75.5 
-        }, 
-        "490": { 
-          "count": 7664, 
-          "percent": 40.9 
-        }, 
-        "509": { 
-          "count": 0, 
-          "percent": 0 
-        } 
-      }, 
-      "floor_distribution": [ 
-        { 
-          "floor": 1, 
-          "count": 18761, 
-          "percent": 100 
-        }, 
-        { 
-          "floor": 2, 
-          "count": 18761, 
-          "percent": 100 
-        } 
-      ], 
-      "point": [ 
-        172.888888888889, 
-        82.2222222222222 
-      ] 
-    }, 
-    "509": { 
-      "name": "ОКей", 
-      "is_entry": false, 
-      "area_type": "tenant", 
-      "count": 0, 
-      "distribution": {}, 
-      "floor_distribution": null, 
-      "point": [ 
-        174.666666666667, 
-        178.222222222222 
-      ] 
-    } 
-  }, 
-  "area_ids": [ 
-    488, 
-    490, 
-    509, 
-    491, 
-    489, 
-    487 
-  ], 
-  "scale": 2.25 
-}, 
-... 
-] 
-</code> 
- 
-===== Request ===== 
-'' 
-curl 'https://api-public.getshopster.net/object/1290/intersections/inner?from=2016-02-01&to=2016-02-14' -H 'x-token: xxxx' 
-''