---
title: "List nearest regions for this device"
method: GET
path: "/region/bylocation/{latitude}/{longitude}"
tags: ["Region"]
---

# List nearest regions for this device

`GET /region/bylocation/{latitude}/{longitude}`

## Request

- Base URL: `https://cloud.notifica.re/api`
- URL: `https://cloud.notifica.re/api/region/bylocation/{latitude}/{longitude}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/notificare/apis/notificare-cloud-api/docs/region/bylocation/:latitude/:longitude/get.ts> (a function with typed inputs; its response is checked against the schema)

Get nearest regions for this device, sorted by distance. Only regions of category `fence` will be listed.

## Path parameters

- `latitude` number, required
- `longitude` number, required

## Query parameters

- `limit` number
- `skip` number

## Response `200`

OK

- RegionList
  - `regions` RegionModel[]
    - `tags` string[]: The list of tags this region should be associated with.
    - `address` string: The address for this region. This field is merely informative.
    - `country` string: The country for this region. This field is merely informative.
    - `advancedGeometry` Polygon
      - `coordinates` CoordinatesRing[], required
        - Coordinates[]
          - number[]
      - `type` 'Polygon', required
    - `category` 'fence' | 'poi' | 'county' | 'city' | 'country', required: The category of this region. Regions should be categorised as fence to be used as monitored geo-zones. There's also the possibility to mark regions as poi, city and country. These type of regions will not be monitored.
    - `description` string: The description for this region. This field is merely informative.
    - `distance` number: The radius of a circle for the region. This field is required if geometry is being passed. If advancedGeometry is used then this field will be automatically calculated for you.
    - `geometry` Point
      - `coordinates` number[], required
      - `type` 'Point', required
    - `icon` string: The icon used for this region. Must be a publicly accessible URL.
    - `major` number: The major identifier for the region. If you intend to use beacons this field must match the major identifier for your beacons.
    - `name` string, required: The name for the region.
    - `referenceKey` string: The foreign key for this region. This field is can be used to match regions in other systems.
    - `timezone` string: The timezone for this region
    - `timeZoneOffset` number

## Changes

- **2020-08-24** `7991a5633150`: 1 breaking, 1 info
  - the `path` request parameter `latitude` became required
  - api operation id `getRegion` removed and replaced with `getRegionByLocation`
- **2020-03-11** `5ed31e104b6f`: 1 info
  - the endpoint scheme security `ApplicationSecret` was added to the API

[Operation history](https://skmtc.dev/notificare/apis/notificare-cloud-api/changes/region/bylocation/:latitude/:longitude/get.md)

---

[API](https://skmtc.dev/notificare/apis/notificare-cloud-api.md) - [All operations](https://skmtc.dev/notificare/apis/notificare-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/notificare/apis/notificare-cloud-api/revisions/aad692b34bab?raw)
