Geolocation

Lanewise reverse-geocodes every POI in the background when you create or move it, and links it to a country, a city and a zip code. These endpoints list the places your team's POIs are in, with the IDs you need to filter POIs by location.

All three endpoints need the read-pois permission, are paginated, and only return places that at least one of your POIs is in. Their IDs are UUIDs, so their cursor is a UUID as well.

The models

  • Name
    country
    Type
    object
    Description

    id and name, such as Spain.

  • Name
    city
    Type
    object
    Description

    id and name, such as Barcelona. Cities with the same name in different countries are different cities.

  • Name
    zipcode
    Type
    object
    Description

    id and code, such as 08002.


GET/v1/geo/countries

List countries

List the countries your POIs are in, sorted by ID.

Optional attributes

  • Name
    name
    Type
    string
    Description

    Only return countries whose name contains this text.

  • Name
    limit
    Type
    integer
    Description

    Between 1 and 100. Defaults to 15.

  • Name
    cursor
    Type
    string
    Description

    The next value of the previous page.

Request

GET
/v1/geo/countries
curl -G https://api.lanewise.app/v1/geo/countries \
  -H "X-API-KEY: {YOUR_API_KEY}"

Response

{
  "data": [
    { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "Spain" }
  ],
  "next": null
}

GET/v1/geo/cities

List cities

List the cities your POIs are in, sorted by ID.

Optional attributes

  • Name
    country_id
    Type
    string
    Description

    Only return cities where your POIs in this country are.

  • Name
    name
    Type
    string
    Description

    Only return cities whose name contains this text.

  • Name
    limit
    Type
    integer
    Description

    Between 1 and 100. Defaults to 15.

  • Name
    cursor
    Type
    string
    Description

    The next value of the previous page.

Request

GET
/v1/geo/cities
curl -G https://api.lanewise.app/v1/geo/cities \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d country_id=9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d

Response

{
  "data": [
    { "id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "name": "Barcelona" }
  ],
  "next": null
}

GET/v1/geo/zipcodes

List zip codes

List the zip codes your POIs are in, sorted by ID.

Optional attributes

  • Name
    country_id
    Type
    string
    Description

    Only return zip codes of your POIs in this country.

  • Name
    city_id
    Type
    string
    Description

    Only return zip codes of your POIs in this city.

  • Name
    name
    Type
    string
    Description

    Only return zip codes that contain this text.

  • Name
    limit
    Type
    integer
    Description

    Between 1 and 100. Defaults to 15.

  • Name
    cursor
    Type
    string
    Description

    The next value of the previous page.

Request

GET
/v1/geo/zipcodes
curl -G https://api.lanewise.app/v1/geo/zipcodes \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d city_id=1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed

Response

{
  "data": [
    { "id": "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b", "code": "08002" }
  ],
  "next": null
}