Списък с геозони API

API за списък на геозоните е предназначен за извеждане на информация за геозоните на потребителя (всички видими геозони: създадени от потребителя и споделени с него).

Структура на заявката:

GET /geozones?api_key=&version=1&limit=&continuation_token=<...><...><...> HTTP/1.1
Домакин: api.fm-track.com
Content-Type: application/json;charset=UTF-8

Параметри на заявката:

ParameterTypeDescriptionRequired
api_keyStringUser identification keyYes
versionIntegerAPI versionYes
limitIntegerLimits geozones count in responseNo
continuation_tokenIntegerDisplays from what date and time the data is shown if the record limit was reachedNo

Пример за отговор:

{
    "continuation_token": 1,
    "items": [
        {
            "id": "d4e18901",
            "name": "asdada",
            "notes": "aaa fff",
            "type": "POINT",
            "circle": {
                "latitude": 54.689538538142585,
                "longitude": 25.270938071441606,
                "radius": 250.0
            }
        },
        ...
    ]
}

Ако даден параметър е въведен неправилно, системата ще отговори с код за грешка. Всички кодове за грешки са описани в раздела API. Параметри, за които не са предоставени данни, не се включват в отговора. Пълен списък на параметрите на отговора е наличен в края на този раздел.

Параметри на отговора:

ParameterTypeDescription
continuation_tokenIntegerContinuation token is sent when number of geozones in response exceed limit
itemsArrayContainer for all user geozones
idStringExternal geozone ID
nameStringGeozone name
notesStringGeozone notes
typeEnumGeozone type. There are two types: point and polygon
circleArrayContainer for point information. If it is a polygon type, this parameter will be NULL
latitudeDoubleLatitude of point center
longitudeDoubleLongitude of point center
radiusDoubleRadius in meters