Retrieve the JobSummary for a Job
curl --request GET \
--url https://api.tread-horizon.com/v1/jobs/{job-id}/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tread-horizon.com/v1/jobs/{job-id}/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tread-horizon.com/v1/jobs/{job-id}/summary', 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.tread-horizon.com/v1/jobs/{job-id}/summary",
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.tread-horizon.com/v1/jobs/{job-id}/summary"
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.tread-horizon.com/v1/jobs/{job-id}/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/jobs/{job-id}/summary")
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{
"data": {
"has_gps_data": true,
"logging_started_at": "2023-11-07T05:31:56Z",
"logging_ended_at": "2023-11-07T05:31:56Z",
"completed_loads_count": 1,
"break_time_minutes": 1,
"work_time_minutes": 1,
"approved_work_time_minutes": 123,
"first_geofence_entry_at": "2023-11-07T05:31:56Z",
"last_geofence_exit_at": "2023-11-07T05:31:56Z",
"job_phase_name": "<string>",
"job_phase_code": "<string>",
"foreman_external_id": "<string>",
"delivered_quantities": [
{
"delivered": "<string>",
"unit_of_measure": "Load",
"material_name": "<string>",
"total": "<string>",
"ticketed": true
}
],
"adjusted_logging_started_at": "2023-11-07T05:31:56Z",
"adjusted_logging_ended_at": "2023-11-07T05:31:56Z",
"editable": true,
"loads_with_tickets_count": 123,
"pre_clamp_logging_ended_at": "2023-11-07T05:31:56Z",
"travelled_distance_meters": "<string>",
"first_sent_at": "2023-11-07T05:31:56Z",
"sent_to_driver_at": "2023-11-07T05:31:56Z",
"driver_accepted_at": "2023-11-07T05:31:56Z",
"driver_declined_at": "2023-11-07T05:31:56Z",
"first_accepted_at": "2023-11-07T05:31:56Z",
"first_declined_at": "2023-11-07T05:31:56Z",
"first_canceled_at": "2023-11-07T05:31:56Z",
"pickup_geofence_entry_count": 1,
"dropoff_geofence_entry_count": 1,
"gps_active_period_minutes": 1,
"gps_total_pings": 1,
"gps_offline_pings": 1,
"gps_expected_pings": 1
}
}{
"error": {
"code": "<string>",
"error_type": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}JobSummaries
Retrieve the JobSummary for a Job
Retrieve the JobSummary for a Job.
A JobSummary will only exist for a Job in the completed state.
GET
/
v1
/
jobs
/
{job-id}
/
summary
Retrieve the JobSummary for a Job
curl --request GET \
--url https://api.tread-horizon.com/v1/jobs/{job-id}/summary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tread-horizon.com/v1/jobs/{job-id}/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tread-horizon.com/v1/jobs/{job-id}/summary', 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.tread-horizon.com/v1/jobs/{job-id}/summary",
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.tread-horizon.com/v1/jobs/{job-id}/summary"
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.tread-horizon.com/v1/jobs/{job-id}/summary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/jobs/{job-id}/summary")
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{
"data": {
"has_gps_data": true,
"logging_started_at": "2023-11-07T05:31:56Z",
"logging_ended_at": "2023-11-07T05:31:56Z",
"completed_loads_count": 1,
"break_time_minutes": 1,
"work_time_minutes": 1,
"approved_work_time_minutes": 123,
"first_geofence_entry_at": "2023-11-07T05:31:56Z",
"last_geofence_exit_at": "2023-11-07T05:31:56Z",
"job_phase_name": "<string>",
"job_phase_code": "<string>",
"foreman_external_id": "<string>",
"delivered_quantities": [
{
"delivered": "<string>",
"unit_of_measure": "Load",
"material_name": "<string>",
"total": "<string>",
"ticketed": true
}
],
"adjusted_logging_started_at": "2023-11-07T05:31:56Z",
"adjusted_logging_ended_at": "2023-11-07T05:31:56Z",
"editable": true,
"loads_with_tickets_count": 123,
"pre_clamp_logging_ended_at": "2023-11-07T05:31:56Z",
"travelled_distance_meters": "<string>",
"first_sent_at": "2023-11-07T05:31:56Z",
"sent_to_driver_at": "2023-11-07T05:31:56Z",
"driver_accepted_at": "2023-11-07T05:31:56Z",
"driver_declined_at": "2023-11-07T05:31:56Z",
"first_accepted_at": "2023-11-07T05:31:56Z",
"first_declined_at": "2023-11-07T05:31:56Z",
"first_canceled_at": "2023-11-07T05:31:56Z",
"pickup_geofence_entry_count": 1,
"dropoff_geofence_entry_count": 1,
"gps_active_period_minutes": 1,
"gps_total_pings": 1,
"gps_offline_pings": 1,
"gps_expected_pings": 1
}
}{
"error": {
"code": "<string>",
"error_type": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The Accept-Language request HTTP header indicates the natural language and locale that the client prefers.
Example:
"en"
Path Parameters
Job ID
Response
OK
Show child attributes
Show child attributes
⌘I