Beta APIs

[beta] Look up geofence suggestions

Returns geofence suggestion candidates for a seed point. Does not create or update a Place. Applies the same selection rules as geofence.auto on Place write.

<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Read Places under the Places category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

get/places/geofence

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

latitudenumber double required

Seed point latitude in WGS84 decimal degrees.

longitudenumber double required

Seed point longitude in WGS84 decimal degrees.

suggestionTypesstring

Comma-separated geofence suggestion types in priority order. Values: building, parcel, landUse, boundary, facility, infrastructure.

sizeOrder'smallestFirst' | 'largestFirst'

Candidate sort order: smallestFirst (default) or largestFirst. Valid values: smallestFirst, largestFirst

minLatitudenumber double

Search bound minimum latitude (WGS84 decimal degrees). Must be supplied with minLongitude, maxLatitude, and maxLongitude, or omitted entirely.

minLongitudenumber double

Search bound minimum longitude (WGS84 decimal degrees).

maxLatitudenumber double

Search bound maximum latitude (WGS84 decimal degrees).

maxLongitudenumber double

Search bound maximum longitude (WGS84 decimal degrees).

maxAreaSquareMetersnumber double

Drop candidates with area above this value in square meters.

maxSourceVerticesinteger

Drop candidates whose source polygon exceeds this vertex count before simplification.

maxVerticesinteger

Simplify each returned candidate polygon to at most this many vertices.

maxResultsinteger

Page size: max candidates in data[] per page. Default 5, max 20.

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

Response

OK response.

Example response

{
  "data": [
    {
      "areaSquareMeters": 1240.5,
      "geofence": {
        "circle": {
          "latitude": 37.7749,
          "longitude": -122.4194,
          "radiusMeters": 150
        },
        "polygon": {
          "vertices": [
            {
              "latitude": 37.7749,
              "longitude": -122.4194
            }
          ]
        },
        "type": "circle"
      },
      "name": "Oakland Warehouse",
      "type": "building"
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  },
  "recommended": {
    "areaSquareMeters": 1240.5,
    "geofence": {
      "circle": {
        "latitude": 37.7749,
        "longitude": -122.4194,
        "radiusMeters": 150
      },
      "polygon": {
        "vertices": [
          {
            "latitude": 37.7749,
            "longitude": -122.4194
          }
        ]
      },
      "type": "circle"
    },
    "name": "Oakland Warehouse",
    "type": "building"
  }
}

Changes

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