Replace a saved report
curl --request PATCH \
--url https://api.hellotracks.com/v1/reports/saved/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weekly timesheet",
"request": {
"report": "timesheet",
"view": "perPerson"
},
"formats": [
"xlsx"
],
"schedule": {
"frequency": "week",
"weekday": 1,
"hour": 7
},
"recipients": {
"emails": [
"office@example.com"
]
},
"status": "paused"
}
'import requests
url = "https://api.hellotracks.com/v1/reports/saved/{id}"
payload = {
"name": "Weekly timesheet",
"request": {
"report": "timesheet",
"view": "perPerson"
},
"formats": ["xlsx"],
"schedule": {
"frequency": "week",
"weekday": 1,
"hour": 7
},
"recipients": { "emails": ["office@example.com"] },
"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({
name: 'Weekly timesheet',
request: {report: 'timesheet', view: 'perPerson'},
formats: ['xlsx'],
schedule: {frequency: 'week', weekday: 1, hour: 7},
recipients: {emails: ['office@example.com']},
status: 'paused'
})
};
fetch('https://api.hellotracks.com/v1/reports/saved/{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/reports/saved/{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([
'name' => 'Weekly timesheet',
'request' => [
'report' => 'timesheet',
'view' => 'perPerson'
],
'formats' => [
'xlsx'
],
'schedule' => [
'frequency' => 'week',
'weekday' => 1,
'hour' => 7
],
'recipients' => [
'emails' => [
'office@example.com'
]
],
'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/reports/saved/{id}"
payload := strings.NewReader("{\n \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\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/reports/saved/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\n \"status\": \"paused\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/reports/saved/{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 \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\n \"status\": \"paused\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"saved": {
"id": "6560000000000000000000b1",
"classic": false,
"name": "Weekly timesheet",
"report": "timesheet",
"request": {
"report": "timesheet",
"view": "perPerson",
"period": "lastWeek",
"compare": true,
"who": {
"kind": "people",
"teamIds": [],
"memberUids": [
"a1b2c3"
]
},
"places": {
"kind": "all",
"field": "",
"value": "",
"teamIds": [],
"placeUids": []
},
"options": {},
"format": "xlsx"
},
"formats": [
"xlsx"
],
"schedule": {
"frequency": "week",
"weekdays": [],
"weekday": 1,
"monthDay": 1,
"hour": 7,
"minute": 0
},
"scheduleText": "Every Monday at 7:00, covering last week",
"recipients": {
"memberUids": [
"a1b2c3"
],
"emails": [
"office@example.com"
]
},
"delivery": "attach",
"status": "paused",
"nextRunTs": 0,
"lastSentTs": 0,
"lastStatus": "",
"lastError": "",
"createdTs": 1761901100000,
"createdBy": "a1b2c3"
}
},
"error": null,
"meta": {
"path": "/v1/reports/saved/6560000000000000000000b1",
"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"
}
}Reports
Replace a saved report
Despite the method, this replaces the saved report: send the whole SavedReportInput, request included (400 without it). name, formats, schedule, recipients and delivery fall back to their defaults when left out; status is kept. An unknown or foreign id is answered with 403 permission_denied. Admins, operators and the company key may call it; workers get 403 permission_denied. jobs, form-answers and visit-report need a Dispatch plan (403 on a Location plan). Same envelope; errors here use the codes invalid_request (400), permission_denied (403) and internal_error (500).
PATCH
/
reports
/
saved
/
{id}
Replace a saved report
curl --request PATCH \
--url https://api.hellotracks.com/v1/reports/saved/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Weekly timesheet",
"request": {
"report": "timesheet",
"view": "perPerson"
},
"formats": [
"xlsx"
],
"schedule": {
"frequency": "week",
"weekday": 1,
"hour": 7
},
"recipients": {
"emails": [
"office@example.com"
]
},
"status": "paused"
}
'import requests
url = "https://api.hellotracks.com/v1/reports/saved/{id}"
payload = {
"name": "Weekly timesheet",
"request": {
"report": "timesheet",
"view": "perPerson"
},
"formats": ["xlsx"],
"schedule": {
"frequency": "week",
"weekday": 1,
"hour": 7
},
"recipients": { "emails": ["office@example.com"] },
"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({
name: 'Weekly timesheet',
request: {report: 'timesheet', view: 'perPerson'},
formats: ['xlsx'],
schedule: {frequency: 'week', weekday: 1, hour: 7},
recipients: {emails: ['office@example.com']},
status: 'paused'
})
};
fetch('https://api.hellotracks.com/v1/reports/saved/{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/reports/saved/{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([
'name' => 'Weekly timesheet',
'request' => [
'report' => 'timesheet',
'view' => 'perPerson'
],
'formats' => [
'xlsx'
],
'schedule' => [
'frequency' => 'week',
'weekday' => 1,
'hour' => 7
],
'recipients' => [
'emails' => [
'office@example.com'
]
],
'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/reports/saved/{id}"
payload := strings.NewReader("{\n \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\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/reports/saved/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\n \"status\": \"paused\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/reports/saved/{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 \"name\": \"Weekly timesheet\",\n \"request\": {\n \"report\": \"timesheet\",\n \"view\": \"perPerson\"\n },\n \"formats\": [\n \"xlsx\"\n ],\n \"schedule\": {\n \"frequency\": \"week\",\n \"weekday\": 1,\n \"hour\": 7\n },\n \"recipients\": {\n \"emails\": [\n \"office@example.com\"\n ]\n },\n \"status\": \"paused\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"saved": {
"id": "6560000000000000000000b1",
"classic": false,
"name": "Weekly timesheet",
"report": "timesheet",
"request": {
"report": "timesheet",
"view": "perPerson",
"period": "lastWeek",
"compare": true,
"who": {
"kind": "people",
"teamIds": [],
"memberUids": [
"a1b2c3"
]
},
"places": {
"kind": "all",
"field": "",
"value": "",
"teamIds": [],
"placeUids": []
},
"options": {},
"format": "xlsx"
},
"formats": [
"xlsx"
],
"schedule": {
"frequency": "week",
"weekdays": [],
"weekday": 1,
"monthDay": 1,
"hour": 7,
"minute": 0
},
"scheduleText": "Every Monday at 7:00, covering last week",
"recipients": {
"memberUids": [
"a1b2c3"
],
"emails": [
"office@example.com"
]
},
"delivery": "attach",
"status": "paused",
"nextRunTs": 0,
"lastSentTs": 0,
"lastStatus": "",
"lastError": "",
"createdTs": 1761901100000,
"createdBy": "a1b2c3"
}
},
"error": null,
"meta": {
"path": "/v1/reports/saved/6560000000000000000000b1",
"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
A saved report. PATCH replaces the whole saved report: request is required there too, and fields left out go back to their defaults.