Geofences
Get Geofence
Read one geofence
GET
/
api
/
v1
/
geofences
/
{id}
Get Geofence
curl --request GET \
--url https://api.sequenzy.com/api/v1/geofences/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/geofences/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/geofences/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/geofences/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/geofences/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/geofences/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/geofences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"geofence": {
"id": "<string>",
"name": "<string>",
"externalId": {},
"group": {},
"latitude": 123,
"longitude": 123,
"radiusMeters": 123,
"dwellSeconds": {},
"cooldownSeconds": 123,
"active": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Returns one geofence. Requires the
geofences:read scope.
string
required
Geofence ID.
curl "https://api.sequenzy.com/api/v1/geofences/geo_123" \
-H "Authorization: Bearer $SEQUENZY_API_KEY"
Response
object
Show properties
Show properties
string
Geofence ID.
string
Name.
string | null
Your ID for the place.
string | null
Group label.
number
Center latitude.
number
Center longitude.
integer
Radius in meters.
integer | null
Dwell time, or
null when off.integer
Cooldown per contact and transition.
boolean
Whether apps watch it.
string
ISO 8601 creation time.
string
ISO 8601 time of the last change.
Errors
| Status | When |
|---|---|
| 400 | A field is out of range or has the wrong type. The message names the field, for example radiusMeters must be between 100 and 10000. |
| 401 | The API key is missing or invalid. |
| 403 | The key lacks the required scope or has no company selected. |
| 404 | No geofence with this ID in the workspace. |
⌘I
Get Geofence
curl --request GET \
--url https://api.sequenzy.com/api/v1/geofences/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/geofences/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/geofences/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/geofences/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/geofences/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/geofences/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/geofences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"geofence": {
"id": "<string>",
"name": "<string>",
"externalId": {},
"group": {},
"latitude": 123,
"longitude": 123,
"radiusMeters": 123,
"dwellSeconds": {},
"cooldownSeconds": 123,
"active": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}
}