Submit a form
curl --request POST \
--url https://api.hellotracks.com/v1/forms/submissions \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"values": {
"Site clean": "Yes"
},
"memberId": "a1b2c3",
"jobId": "650000000000000000000001",
"location": {
"lat": 37.7749,
"lng": -122.4194
}
}
'import requests
url = "https://api.hellotracks.com/v1/forms/submissions"
payload = {
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"values": { "Site clean": "Yes" },
"memberId": "a1b2c3",
"jobId": "650000000000000000000001",
"location": {
"lat": 37.7749,
"lng": -122.4194
}
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '3f2b8c1e-0000-4000-8000-000000000001',
values: {'Site clean': 'Yes'},
memberId: 'a1b2c3',
jobId: '650000000000000000000001',
location: {lat: 37.7749, lng: -122.4194}
})
};
fetch('https://api.hellotracks.com/v1/forms/submissions', 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/forms/submissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateId' => '3f2b8c1e-0000-4000-8000-000000000001',
'values' => [
'Site clean' => 'Yes'
],
'memberId' => 'a1b2c3',
'jobId' => '650000000000000000000001',
'location' => [
'lat' => 37.7749,
'lng' => -122.4194
]
]),
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/forms/submissions"
payload := strings.NewReader("{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hellotracks.com/v1/forms/submissions")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/forms/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"submission": {
"id": "1761901234567",
"submissionId": 1761901234567,
"submissionUid": "1761901234567",
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"title": "Site check",
"createdAt": 1761901234567,
"createdTs": 1761901234567,
"submittedBy": "Driver 1",
"creatorUid": "a1b2c3",
"jobId": "650000000000000000000001",
"placeId": "d4e5f6",
"location": {
"lat": 37.7749,
"lng": -122.4194
},
"content": {
"id": "3f2b8c1e-0000-4000-8000-000000000001",
"title": "Site check",
"description": "",
"timestamp": 1761901234000,
"content": [
{
"type": "section",
"name": "Arrival",
"options": [],
"value": "",
"required": false,
"conditionals": []
},
{
"type": "radio",
"name": "Site clean",
"options": [
"Yes",
"No"
],
"value": "",
"required": true,
"conditionals": [
{
"equalsTo": "No",
"content": [
{
"type": "paragraph",
"name": "What was wrong",
"options": [],
"value": "",
"required": true
}
]
}
]
},
{
"type": "image",
"name": "Photo",
"options": [],
"value": "",
"required": false,
"conditionals": []
}
]
},
"answers": {
"Arrival.Site clean": "Yes",
"Arrival.Photo": ""
},
"completion": {
"answered": 1,
"total": 2
}
}
},
"error": null,
"meta": {
"path": "/v1/forms/submissions",
"method": "POST"
}
}{
"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"
}
}Forms
Submit a form
Submits a filled-in form for a template. Required fields (also in follow-ups that are shown) and sections’ minAnswers are checked. With jobId the submission is added to the job’s submitted forms. The form-submitted notification is sent as when a phone submits. Workers may call it for templates they can see and only as themselves. Answers 200.
POST
/
forms
/
submissions
Submit a form
curl --request POST \
--url https://api.hellotracks.com/v1/forms/submissions \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"values": {
"Site clean": "Yes"
},
"memberId": "a1b2c3",
"jobId": "650000000000000000000001",
"location": {
"lat": 37.7749,
"lng": -122.4194
}
}
'import requests
url = "https://api.hellotracks.com/v1/forms/submissions"
payload = {
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"values": { "Site clean": "Yes" },
"memberId": "a1b2c3",
"jobId": "650000000000000000000001",
"location": {
"lat": 37.7749,
"lng": -122.4194
}
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '3f2b8c1e-0000-4000-8000-000000000001',
values: {'Site clean': 'Yes'},
memberId: 'a1b2c3',
jobId: '650000000000000000000001',
location: {lat: 37.7749, lng: -122.4194}
})
};
fetch('https://api.hellotracks.com/v1/forms/submissions', 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/forms/submissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateId' => '3f2b8c1e-0000-4000-8000-000000000001',
'values' => [
'Site clean' => 'Yes'
],
'memberId' => 'a1b2c3',
'jobId' => '650000000000000000000001',
'location' => [
'lat' => 37.7749,
'lng' => -122.4194
]
]),
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/forms/submissions"
payload := strings.NewReader("{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hellotracks.com/v1/forms/submissions")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hellotracks.com/v1/forms/submissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"3f2b8c1e-0000-4000-8000-000000000001\",\n \"values\": {\n \"Site clean\": \"Yes\"\n },\n \"memberId\": \"a1b2c3\",\n \"jobId\": \"650000000000000000000001\",\n \"location\": {\n \"lat\": 37.7749,\n \"lng\": -122.4194\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"submission": {
"id": "1761901234567",
"submissionId": 1761901234567,
"submissionUid": "1761901234567",
"templateId": "3f2b8c1e-0000-4000-8000-000000000001",
"title": "Site check",
"createdAt": 1761901234567,
"createdTs": 1761901234567,
"submittedBy": "Driver 1",
"creatorUid": "a1b2c3",
"jobId": "650000000000000000000001",
"placeId": "d4e5f6",
"location": {
"lat": 37.7749,
"lng": -122.4194
},
"content": {
"id": "3f2b8c1e-0000-4000-8000-000000000001",
"title": "Site check",
"description": "",
"timestamp": 1761901234000,
"content": [
{
"type": "section",
"name": "Arrival",
"options": [],
"value": "",
"required": false,
"conditionals": []
},
{
"type": "radio",
"name": "Site clean",
"options": [
"Yes",
"No"
],
"value": "",
"required": true,
"conditionals": [
{
"equalsTo": "No",
"content": [
{
"type": "paragraph",
"name": "What was wrong",
"options": [],
"value": "",
"required": true
}
]
}
]
},
{
"type": "image",
"name": "Photo",
"options": [],
"value": "",
"required": false,
"conditionals": []
}
]
},
"answers": {
"Arrival.Site clean": "Yes",
"Arrival.Photo": ""
},
"completion": {
"answered": 1,
"total": 2
}
}
},
"error": null,
"meta": {
"path": "/v1/forms/submissions",
"method": "POST"
}
}{
"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
Send either values (answers by field name, filled into the template) or a complete content; not both.