const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({altitude: 123, relevantText: '<string>', latitude: 0, longitude: 0})
};
fetch('https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"altitude": 123,
"relevantText": "<string>",
"latitude": 0,
"longitude": 0
}
'import requests
url = "https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId}"
payload = {
"altitude": 123,
"relevantText": "<string>",
"latitude": 0,
"longitude": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"latitude": 123,
"id": "<string>",
"longitude": 123,
"altitude": 123,
"relevantText": "<string>"
},
"requestId": "<string>"
}{
"requestId": "<string>",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request parameters",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "FORBIDDEN",
"message": "Access denied to this resource",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred",
"details": {}
}
}Update pass geofence by ID
Update one of the pass’s geofence overrides. Omitted fields keep their values, and at least one field is required. Coordinates already used by another geofence on the pass return 400, with details.geofenceId naming it when it has an id. Program geofences can’t be changed per pass; their IDs return 404.
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({altitude: 123, relevantText: '<string>', latitude: 0, longitude: 0})
};
fetch('https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"altitude": 123,
"relevantText": "<string>",
"latitude": 0,
"longitude": 0
}
'import requests
url = "https://api.platform.getstell.com/v1/passes/{passId}/geofences/{geofenceId}"
payload = {
"altitude": 123,
"relevantText": "<string>",
"latitude": 0,
"longitude": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"latitude": 123,
"id": "<string>",
"longitude": 123,
"altitude": 123,
"relevantText": "<string>"
},
"requestId": "<string>"
}{
"requestId": "<string>",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request parameters",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "FORBIDDEN",
"message": "Access denied to this resource",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": {}
}
}{
"requestId": "<string>",
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred",
"details": {}
}
}Authorizations
API key authentication. Include your API key as a Bearer token.
Example: Bearer sk_prod_xxxxxx
Get your API key from the Stell Dashboard.
Path Parameters
Pass ID
ID of a pass override geofence: the stored id of a PASS_OVERRIDE entry from GET /v1/passes/{passId}/geofences, or the ID returned by POST or PUT. Program geofence IDs, and generated pass-geofence-… IDs for overrides stored without an ID, return 404.
Body
Geofence fields to update
Request to update a geofence on a pass.
Was this page helpful?