Update an alert rule
curl --request PATCH \
--url https://api.hellotracks.com/v1/alerts/configs/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "paused"
}
'import requests
url = "https://api.hellotracks.com/v1/alerts/configs/{id}"
payload = { "status": "paused" }
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'paused'})
};
fetch('https://api.hellotracks.com/v1/alerts/configs/{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.hellotracks.com/v1/alerts/configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'paused'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hellotracks.com/v1/alerts/configs/{id}"
payload := strings.NewReader("{\n \"status\": \"paused\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hellotracks.com/v1/alerts/configs/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"paused\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/alerts/configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"paused\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"id": "1700000000001",
"createdAt": 1761900000000,
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"actionCode": 4,
"actionLabel": "Does not check in",
"duration": "",
"intervalMs": 0,
"memberIds": [
"a1b2c3"
],
"teamIds": [],
"placeIds": [
"d4e5f6"
],
"andPlaceIds": [],
"zoneIds": [],
"zones": [],
"emails": [
"dispatch@example.com"
],
"email": "dispatch@example.com",
"phone": "",
"slackChannelId": "",
"weekdays": 31,
"weekdayNames": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"timeStart": "08:00",
"timeEnd": "09:00",
"timeStartCode": 800,
"timeEndCode": 900,
"status": 1,
"statusText": "paused",
"type": 1,
"typeText": "regular",
"companyUid": "c0c0c0"
}
},
"error": null,
"meta": {
"path": "/v1/alerts/configs/1700000000001",
"method": "PATCH"
}
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "date must be YYYY-MM-DD"
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "Invalid Hellotracks API key."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "forbidden",
"message": "No permission."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "throttled",
"message": "Too many requests."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Hellotracks API is temporarily unavailable."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}Alerts
Update an alert rule
Changes the fields sent; the whole rule is checked again afterwards (title, zones, members, time window). Fields the action does not use are cleared. Geofences are refreshed on the phones when the rule watched or now watches zones. An unknown or foreign id is answered with 400 invalid_request. Admins, operators and the company key may call it; workers get 403.
PATCH
/
alerts
/
configs
/
{id}
Update an alert rule
curl --request PATCH \
--url https://api.hellotracks.com/v1/alerts/configs/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "paused"
}
'import requests
url = "https://api.hellotracks.com/v1/alerts/configs/{id}"
payload = { "status": "paused" }
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'paused'})
};
fetch('https://api.hellotracks.com/v1/alerts/configs/{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.hellotracks.com/v1/alerts/configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'paused'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hellotracks.com/v1/alerts/configs/{id}"
payload := strings.NewReader("{\n \"status\": \"paused\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hellotracks.com/v1/alerts/configs/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"paused\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/alerts/configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"paused\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"config": {
"id": "1700000000001",
"createdAt": 1761900000000,
"title": "Late at warehouse",
"description": "Did not check in at the warehouse",
"action": "no_check_in",
"actionCode": 4,
"actionLabel": "Does not check in",
"duration": "",
"intervalMs": 0,
"memberIds": [
"a1b2c3"
],
"teamIds": [],
"placeIds": [
"d4e5f6"
],
"andPlaceIds": [],
"zoneIds": [],
"zones": [],
"emails": [
"dispatch@example.com"
],
"email": "dispatch@example.com",
"phone": "",
"slackChannelId": "",
"weekdays": 31,
"weekdayNames": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"timeStart": "08:00",
"timeEnd": "09:00",
"timeStartCode": 800,
"timeEndCode": 900,
"status": 1,
"statusText": "paused",
"type": 1,
"typeText": "regular",
"companyUid": "c0c0c0"
}
},
"error": null,
"meta": {
"path": "/v1/alerts/configs/1700000000001",
"method": "PATCH"
}
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "date must be YYYY-MM-DD"
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "Invalid Hellotracks API key."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "forbidden",
"message": "No permission."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "throttled",
"message": "Too many requests."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Hellotracks API is temporarily unavailable."
},
"meta": {
"path": "/jobs",
"method": "GET"
}
}Authorizations
Body
application/json
Fields of an alert rule. Unknown fields are refused. On create, title and an action are required; on update, only the fields sent change. Also accepted: actionCode/action1 for action, andActionCode/action2 for andAction, message for description, place1Ids for placeIds, place2Ids for andPlaceIds, zones for zoneIds, email for emails, interval/intervalMs for duration.