Create a Settlement for a Company
curl --request POST \
--url https://api.tread-horizon.com/v1/companies/{company-id}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"settlement_line_item_type": "order",
"settlement_line_item_groupings": [
"material"
],
"include_loads_in_pdf": true
}
'import requests
url = "https://api.tread-horizon.com/v1/companies/{company-id}/settlements"
payload = {
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"settlement_line_item_type": "order",
"settlement_line_item_groupings": ["material"],
"include_loads_in_pdf": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
settlement_line_item_type: 'order',
settlement_line_item_groupings: ['material'],
include_loads_in_pdf: true
})
};
fetch('https://api.tread-horizon.com/v1/companies/{company-id}/settlements', 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/companies/{company-id}/settlements",
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([
'invoice_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'settlement_line_item_type' => 'order',
'settlement_line_item_groupings' => [
'material'
],
'include_loads_in_pdf' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.tread-horizon.com/v1/companies/{company-id}/settlements"
payload := strings.NewReader("{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tread-horizon.com/v1/companies/{company-id}/settlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/companies/{company-id}/settlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"adjustments_total_amount": "<string>",
"data": {
"friendly_order_ids": [
"<string>"
],
"quantities_per_uom": [
"<string>"
]
},
"exported_at": "2023-11-07T05:31:56Z",
"jobs_count": 123,
"state": "pending",
"total_amount": "<string>",
"settlement_id": "<string>",
"ar_settlement_id": "<string>",
"ap_settlement_id": "<string>",
"settlement_line_item_type": "order",
"settlement_line_item_groupings": [
"material"
],
"add_on_charges_total_amount": "<string>",
"invoices_total_amount": "<string>",
"state_events": [],
"editable": true,
"void_reason": "<string>",
"rebillable": true,
"rebill_total_amount": "<string>",
"rebill_add_on_charges_total_amount": "<string>",
"rebill_invoices_total_amount": "<string>",
"voided_at": "2023-11-07T05:31:56Z",
"approved": true,
"approvable": true,
"unapprovable": true,
"billing_approved_at": "2023-11-07T05:31:56Z",
"delivered_quantities": [
{
"delivered": "<string>",
"unit_of_measure": "Load",
"material_name": "<string>",
"total": "<string>",
"ticketed": true
}
],
"include_loads_in_pdf": true,
"invoices_tax_total_amount": "<string>",
"rebill_invoices_tax_total_amount": "<string>",
"customer_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"account_types": [
"customer"
],
"external_id": "<string>",
"accounting_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schedule_on": true,
"billing_address": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thoroughfare": "<string>",
"premise": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country": "US",
"lat": "<string>",
"lon": "<string>",
"place_id": "<string>"
},
"connected_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"billing_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
},
"vendor_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"account_types": [
"customer"
],
"external_id": "<string>",
"accounting_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schedule_on": true,
"billing_address": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thoroughfare": "<string>",
"premise": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country": "US",
"lat": "<string>",
"lon": "<string>",
"place_id": "<string>"
},
"connected_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"billing_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
},
"driver": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"schedule_on": true,
"phone": "<string>",
"managed": true,
"gps_status": {
"last_ping_at": "2023-11-07T05:31:56Z"
},
"email": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z",
"default_equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"equipment_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
}
},
"equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"external_id": "<string>",
"equipment_id": "<string>",
"license_number": "<string>",
"zone": "<string>",
"accounting_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
},
"default_equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"external_id": "<string>",
"equipment_id": "<string>",
"license_number": "<string>",
"zone": "<string>",
"accounting_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
},
"company_day_driver_stat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"jobs_count": 123
},
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>"
}
]
},
"last_settlement_email_delivery": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"sender_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
}
},
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "initiated",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"original_settlement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlement_id": "<string>",
"ar_settlement_id": "<string>",
"ap_settlement_id": "<string>"
},
"agave_settlement_export": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agave_invoice_id": "<string>",
"exported_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"exported_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
}
}
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"error_type": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
{
"model": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}
}Settlements
Create a Settlement for a Company
Create a Settlement from approved Invoices for the specified company
POST
/
v1
/
companies
/
{company-id}
/
settlements
Create a Settlement for a Company
curl --request POST \
--url https://api.tread-horizon.com/v1/companies/{company-id}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"settlement_line_item_type": "order",
"settlement_line_item_groupings": [
"material"
],
"include_loads_in_pdf": true
}
'import requests
url = "https://api.tread-horizon.com/v1/companies/{company-id}/settlements"
payload = {
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"settlement_line_item_type": "order",
"settlement_line_item_groupings": ["material"],
"include_loads_in_pdf": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
settlement_line_item_type: 'order',
settlement_line_item_groupings: ['material'],
include_loads_in_pdf: true
})
};
fetch('https://api.tread-horizon.com/v1/companies/{company-id}/settlements', 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/companies/{company-id}/settlements",
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([
'invoice_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'settlement_line_item_type' => 'order',
'settlement_line_item_groupings' => [
'material'
],
'include_loads_in_pdf' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.tread-horizon.com/v1/companies/{company-id}/settlements"
payload := strings.NewReader("{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tread-horizon.com/v1/companies/{company-id}/settlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/companies/{company-id}/settlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settlement_line_item_type\": \"order\",\n \"settlement_line_item_groupings\": [\n \"material\"\n ],\n \"include_loads_in_pdf\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"adjustments_total_amount": "<string>",
"data": {
"friendly_order_ids": [
"<string>"
],
"quantities_per_uom": [
"<string>"
]
},
"exported_at": "2023-11-07T05:31:56Z",
"jobs_count": 123,
"state": "pending",
"total_amount": "<string>",
"settlement_id": "<string>",
"ar_settlement_id": "<string>",
"ap_settlement_id": "<string>",
"settlement_line_item_type": "order",
"settlement_line_item_groupings": [
"material"
],
"add_on_charges_total_amount": "<string>",
"invoices_total_amount": "<string>",
"state_events": [],
"editable": true,
"void_reason": "<string>",
"rebillable": true,
"rebill_total_amount": "<string>",
"rebill_add_on_charges_total_amount": "<string>",
"rebill_invoices_total_amount": "<string>",
"voided_at": "2023-11-07T05:31:56Z",
"approved": true,
"approvable": true,
"unapprovable": true,
"billing_approved_at": "2023-11-07T05:31:56Z",
"delivered_quantities": [
{
"delivered": "<string>",
"unit_of_measure": "Load",
"material_name": "<string>",
"total": "<string>",
"ticketed": true
}
],
"include_loads_in_pdf": true,
"invoices_tax_total_amount": "<string>",
"rebill_invoices_tax_total_amount": "<string>",
"customer_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"account_types": [
"customer"
],
"external_id": "<string>",
"accounting_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schedule_on": true,
"billing_address": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thoroughfare": "<string>",
"premise": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country": "US",
"lat": "<string>",
"lon": "<string>",
"place_id": "<string>"
},
"connected_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"billing_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
},
"vendor_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"account_types": [
"customer"
],
"external_id": "<string>",
"accounting_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"schedule_on": true,
"billing_address": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thoroughfare": "<string>",
"premise": "<string>",
"locality": "<string>",
"administrative_area": "<string>",
"postal_code": "<string>",
"country": "US",
"lat": "<string>",
"lon": "<string>",
"place_id": "<string>"
},
"connected_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"billing_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
},
"driver": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"schedule_on": true,
"phone": "<string>",
"managed": true,
"gps_status": {
"last_ping_at": "2023-11-07T05:31:56Z"
},
"email": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z",
"default_equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"equipment_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
}
},
"equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"external_id": "<string>",
"equipment_id": "<string>",
"license_number": "<string>",
"zone": "<string>",
"accounting_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
},
"default_equipment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"equipment_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"system": true,
"external_id": "<string>",
"accounting_id": "<string>"
},
"external_id": "<string>",
"equipment_id": "<string>",
"license_number": "<string>",
"zone": "<string>",
"accounting_id": "<string>",
"company_share": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"ticket_match_id": "<string>",
"sender_company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"dispatchable": true,
"schedule_on": true,
"rate_override": true,
"expires_at": "2023-11-07T05:31:56Z"
}
},
"company_day_driver_stat": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"jobs_count": 123
},
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>"
}
]
},
"last_settlement_email_delivery": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"sender_user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
}
},
"settlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "initiated",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"original_settlement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlement_id": "<string>",
"ar_settlement_id": "<string>",
"ap_settlement_id": "<string>"
},
"agave_settlement_export": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agave_invoice_id": "<string>",
"exported_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"exported_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
}
}
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"error_type": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
{
"model": "<string>",
"field": "<string>",
"message": "<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
Company ID
Body
application/json
Available options:
order, job, load Example:
"order"
Available options:
material, equipment_type, service Controls whether load details are included in settlement PDFs
Response
Created
Show child attributes
Show child attributes
⌘I