API списку геозон призначений для виведення інформації про геозони користувача (всі видимі геозони: створені користувачем і надані користувачеві).
Структура запиту:
GET /geozones?api_key=&version=1&limit=&continuation_token=<...><...><...> HTTP/1.1
Host: api.fm-track.com
Content-Type: application/json;charset=UTF-8
Параметри запиту:
| Parameter | Type | Description | Required |
|---|---|---|---|
| api_key | String | User identification key | Yes |
| version | Integer | API version | Yes |
| limit | Integer | Limits geozones count in response | No |
| continuation_token | Integer | Displays from what date and time the data is shown if the record limit was reached | No |
Приклад відповіді:
{
"continuation_token": 1,
"items": [
{
"id": "d4e18901",
"name": "asdada",
"notes": "aaa fff",
"type": "POINT",
"circle": {
"latitude": 54.689538538142585,
"longitude": 25.270938071441606,
"radius": 250.0
}
},
...
]
}Якщо параметр було введено неправильно, система відповість кодом помилки. Всі коди помилок описані в розділі API. Параметри, для яких не надано жодних даних, не включаються у відповідь. Повний список параметрів відповіді доступний в кінці цього розділу.
Параметри відповіді:
| Parameter | Type | Description |
|---|---|---|
| continuation_token | Integer | Continuation token is sent when number of geozones in response exceed limit |
| items | Array | Container for all user geozones |
| id | String | External geozone ID |
| name | String | Geozone name |
| notes | String | Geozone notes |
| type | Enum | Geozone type. There are two types: point and polygon |
| circle | Array | Container for point information. If it is a polygon type, this parameter will be NULL |
| latitude | Double | Latitude of point center |
| longitude | Double | Longitude of point center |
| radius | Double | Radius in meters |