Get all Points
With this endpoint you can get information about all points from your Atlas account.
URL¶
GET https://api.geposit.se/1.1/list/points?{params}
Mandatory header parameters¶
x-api-key
(String) This is your API-key and should be included in the header.
Optional GET parameters¶
-
limit
(Integer) The limit of the number of limit that should be included in the response. -
offset
(Integer) The offset value of the response. This together with thelimit
can be used for pagination of the response.
Example Request¶
curl -X GET -H "X-api-key: {API_KEY}" "https://api.geposit.se/1.1/list/points?limit=2&offset=2"
client()->get("list/points", [
"query" => [
"limit" => 2,
"offset" => 2
],
"headers" => [
"x-api-key" => "your-api-key"
],
]);
Response¶
The response will be in JSON format. Every response comes with a status flag (Integer) where:
status = 0
- Request had bad parameter input / generic error.status = 1
- Request was successful
Valid response¶
{
"status": 1,
"total_count": "9",
"count": 2,
"points": [
{
"point_id": 19,
"name": "Point name",
"my_own_attribute1":"my_own_attribute_value",
"my_own_attribute2":"my_own_attribute_value",
"address_status": 1,
"location_status": 1,
"visible": 1,
"style": {
"color": "85144b",
"icon": "fa-heart"
}
},
{
"point_id": 20,
"name": "Point name 2",
"my_own_attribute1":"my_own_attribute_value",
"my_own_attribute2":"my_own_attribute_value",
"address_status": 1,
"location_status": 1,
"visible": 0,
"style": {
"color": "85144b",
"icon": "fa-heart"
}
}
]
}
-
points
(Array) Array that will contain zero or more areas. If there are no points in the response, you haven't added any points yet. -
point_id
(Integer) The unique identifier of the point. -
name
(String) The name of the Area.
Invalid response¶
Invalid use of supported parameters
{
"status": 0,
"error": "Invalid limit parameter"
}
{
"status": 0,
"error": "Invalid offset parameter"
}
{
"status": 0,
"error": "Generic error"
}