Locations

List locations

This endpoint returns all locations in the account. <br> <br> The results can be filtered by: <br> <ul> <li>Map ID</li> <li>Layer ID</li> <li>External ID</li> <li>Nearest: Returns up to the 24 closest locations from a provided <b>latitude</b> and <b>longitude</b> or <b>address</b> and travel <b>profile</b> ("driving", "cycling", "walking"). This can be sorted by <b>time</b> or <b>distance</b>. Note: If the source location is on water or inaccessible, the server will respond with the nearest locations by direct line and not include a duration or distance.</li> </ul> Example request:

curl --location --request GET 'https://api.mapulus.com/api/v1/locations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-token>' \
--data '{
    "map_id": "<your-map-id>",
    "nearest": {
      "lat": "-27.52851640781164",
      "lon": "152.97921775875503",
      "sort_by": "time",
      "profile": "driving",
      "limit": "10"
    }
}'
get/api/v1/locations

Request

  • Base URL: https://api.mapulus.com
  • URL: https://api.mapulus.com/api/v1/locations
  • Auth: HTTP bearer

Query parameters

map_idstring

Filter: Map ID

layer_idstring

Filter: Layer ID

external_idstring

Filter: External ID

nearest[lat]number

Latitude for nearest filter

nearest[lon]number

Longitude for nearest filter

nearest[address]number

Address for nearest filter (must have either a lat/lon or an address)

nearest[sort_by]string

Sort by "distance" or "time" for nearest filter

nearest[profile]string

Profile for routing ("driving", "cycling", "walking") for nearest filter

nearest[live_traffic]string

Include live traffic ("true" or "false") for nearest filter

nearest[limit]integer

Limit the number of locations returned for nearest filter. Max 24.

Response

Succcess: Returns all locations in account.

objectstring required
total_countinteger

Example response

{
  "object": "list",
  "data": [
    {
      "object": "location",
      "lat": -27.4704528,
      "lon": 153.0260341,
      "title": "Head Office",
      "address": "Brisbane, Australia",
      "contour_mode": "driving",
      "contour_metric": "minutes",
      "contour_style": "polygons",
      "contour_minutes": "15",
      "custom_attributes": [
        {
          "object": "custom_attribute",
          "name": "Location Type",
          "value": "Public Store"
        }
      ]
    }
  ],
  "pages": {
    "object": "pages",
    "total_pages": 1,
    "current_page": 1
  },
  "total_count": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.