curl --request POST \
--url https://api.tread-horizon.com/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phases": [
{
"name": "<string>",
"code": "<string>",
"primary": true
}
],
"project_material_totals": [
{
"material_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": 123,
"unit_of_measure": "Load"
}
],
"sales_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreman_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collaborator_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"salesperson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"customer_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"driver_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hauler_rate_type": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_class_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_time": 123,
"order_quantity": 123,
"equipment_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loads_per_truck": 13,
"truck_count": 100,
"units_per_hour": 123,
"job_quantity": 123,
"waypoints": [
{
"type": "pickup",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordinality": 123,
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"customer_rate_value": 123,
"customer_rate_type": "RatePerHour",
"vendor_rate_value": 123,
"vendor_rate_type": "RatePerHour",
"driver_rate_value": 123,
"driver_rate_type": "RatePerHour",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipment_type_gross_capacity": 123,
"load_unit_of_measure": "Load",
"recurring_loads": true,
"order_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": true,
"default_digital_ticket_view": false,
"tax_rate": 123,
"tax_freight": false,
"tax_material": false,
"tax_add_ons": false
}
'import requests
url = "https://api.tread-horizon.com/v1/projects"
payload = {
"name": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phases": [
{
"name": "<string>",
"code": "<string>",
"primary": True
}
],
"project_material_totals": [
{
"material_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": 123,
"unit_of_measure": "Load"
}
],
"sales_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreman_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collaborator_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"salesperson_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"customer_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"driver_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hauler_rate_type": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_class_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_time": 123,
"order_quantity": 123,
"equipment_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loads_per_truck": 13,
"truck_count": 100,
"units_per_hour": 123,
"job_quantity": 123,
"waypoints": [
{
"type": "pickup",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordinality": 123,
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"customer_rate_value": 123,
"customer_rate_type": "RatePerHour",
"vendor_rate_value": 123,
"vendor_rate_type": "RatePerHour",
"driver_rate_value": 123,
"driver_rate_type": "RatePerHour",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipment_type_gross_capacity": 123,
"load_unit_of_measure": "Load",
"recurring_loads": True,
"order_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": True,
"default_digital_ticket_view": False,
"tax_rate": 123,
"tax_freight": False,
"tax_material": False,
"tax_add_ons": False
}
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({
name: '<string>',
effective_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
notes: '<string>',
order_notes: '<string>',
job_notes: '<string>',
internal_notes: '<string>',
po_job_number: '<string>',
external_id: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
site_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
phases: [{name: '<string>', code: '<string>', primary: true}],
project_material_totals: [
{
material_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
total_quantity: 123,
unit_of_measure: 'Load'
}
],
sales_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
foreman_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
supervisor_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
collaborator_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
department_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
foreman_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collaborator_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
salesperson_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
customer_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vendor_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
driver_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
hauler_rate_type: '<string>',
service_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
service_class_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
job_time: 123,
order_quantity: 123,
equipment_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
loads_per_truck: 13,
truck_count: 100,
units_per_hour: 123,
job_quantity: 123,
waypoints: [
{
type: 'pickup',
site_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ordinality: 123,
contact: {name: '<string>', email: '<string>', phone: '+18885551234'}
}
],
customer_rate_value: 123,
customer_rate_type: 'RatePerHour',
vendor_rate_value: 123,
vendor_rate_type: 'RatePerHour',
driver_rate_value: 123,
driver_rate_type: 'RatePerHour',
requester_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
equipment_type_gross_capacity: 123,
load_unit_of_measure: 'Load',
recurring_loads: true,
order_unit_of_measure: 'Load',
job_unit_of_measure: 'Load',
equipment_type_gross_capacity_unit_of_measure: 'Load',
charge_to_account: '<string>',
chase_missing_tickets: true,
default_digital_ticket_view: false,
tax_rate: 123,
tax_freight: false,
tax_material: false,
tax_add_ons: false
})
};
fetch('https://api.tread-horizon.com/v1/projects', 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/projects",
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([
'name' => '<string>',
'effective_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'order_notes' => '<string>',
'job_notes' => '<string>',
'internal_notes' => '<string>',
'po_job_number' => '<string>',
'external_id' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'site_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'company_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'phases' => [
[
'name' => '<string>',
'code' => '<string>',
'primary' => true
]
],
'project_material_totals' => [
[
'material_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'total_quantity' => 123,
'unit_of_measure' => 'Load'
]
],
'sales_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'foreman_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'supervisor_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'collaborator_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'department_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'foreman_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'collaborator_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'salesperson_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'customer_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vendor_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'driver_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'hauler_rate_type' => '<string>',
'service_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'service_class_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'job_time' => 123,
'order_quantity' => 123,
'equipment_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'loads_per_truck' => 13,
'truck_count' => 100,
'units_per_hour' => 123,
'job_quantity' => 123,
'waypoints' => [
[
'type' => 'pickup',
'site_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ordinality' => 123,
'contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
]
]
],
'customer_rate_value' => 123,
'customer_rate_type' => 'RatePerHour',
'vendor_rate_value' => 123,
'vendor_rate_type' => 'RatePerHour',
'driver_rate_value' => 123,
'driver_rate_type' => 'RatePerHour',
'requester_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'equipment_type_gross_capacity' => 123,
'load_unit_of_measure' => 'Load',
'recurring_loads' => true,
'order_unit_of_measure' => 'Load',
'job_unit_of_measure' => 'Load',
'equipment_type_gross_capacity_unit_of_measure' => 'Load',
'charge_to_account' => '<string>',
'chase_missing_tickets' => true,
'default_digital_ticket_view' => false,
'tax_rate' => 123,
'tax_freight' => false,
'tax_material' => false,
'tax_add_ons' => false
]),
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/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\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/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/projects")
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 \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\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",
"expires_at": "<string>",
"effective_at": "<string>",
"name": "<string>",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"state": "active",
"project_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"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"
}
},
"phases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"project_material_totals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": "<string>",
"unit_of_measure": "Load",
"material": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"foremen": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"discarded_at": "2023-11-07T05:31:56Z",
"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"
}
}
],
"collaborators": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
}
],
"salespeople": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
}
],
"hauler_rate_type": "<string>",
"job_time": 123,
"order_quantity": "<string>",
"loads_per_truck": 123,
"truck_count": 123,
"units_per_hour": 123,
"job_quantity": "<string>",
"customer_rate_value": "<string>",
"customer_rate_type": "RatePerHour",
"vendor_rate_value": "<string>",
"vendor_rate_type": "RatePerHour",
"driver_rate_value": "<string>",
"driver_rate_type": "RatePerHour",
"equipment_type_gross_capacity": "<string>",
"load_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"order_unit_of_measure": "Load",
"recurring_loads": true,
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": true,
"tax_rate": "<string>",
"tax_freight": false,
"tax_material": false,
"tax_add_ons": false,
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"lat": "<string>",
"lon": "<string>",
"full_address": "<string>",
"routable": true,
"discarded_at": "2023-11-07T05:31:56Z",
"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>"
},
"next_billion_geofence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geofence": {
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geojson": {
"type": "<string>",
"coordinates": [
[
[
"<unknown>"
]
]
]
},
"circle_center": {
"lat": 123,
"lon": 123
},
"circle_radius": 123
},
"moving_geofence": false
}
},
"sales_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"customer_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"vendor_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"driver_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"service_class": {
"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>"
},
"waypoints": [
{
"type": "pickup",
"ordinality": 123,
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"lat": "<string>",
"lon": "<string>",
"full_address": "<string>",
"routable": true,
"discarded_at": "2023-11-07T05:31:56Z",
"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>"
},
"next_billion_geofence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geofence": {
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geojson": {
"type": "<string>",
"coordinates": [
[
[
"<unknown>"
]
]
]
},
"circle_center": {
"lat": 123,
"lon": 123
},
"circle_radius": 123
},
"moving_geofence": false
}
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"requester": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
},
"dispatch_number": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"default_digital_ticket_view": false
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"error_type": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"errors": [
{
"model": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}
}Create a Project in the current Company
Create a new Project
This endpoint requires the create_project permission
curl --request POST \
--url https://api.tread-horizon.com/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phases": [
{
"name": "<string>",
"code": "<string>",
"primary": true
}
],
"project_material_totals": [
{
"material_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": 123,
"unit_of_measure": "Load"
}
],
"sales_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreman_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"collaborator_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"salesperson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"customer_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"driver_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hauler_rate_type": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_class_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_time": 123,
"order_quantity": 123,
"equipment_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loads_per_truck": 13,
"truck_count": 100,
"units_per_hour": 123,
"job_quantity": 123,
"waypoints": [
{
"type": "pickup",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordinality": 123,
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"customer_rate_value": 123,
"customer_rate_type": "RatePerHour",
"vendor_rate_value": 123,
"vendor_rate_type": "RatePerHour",
"driver_rate_value": 123,
"driver_rate_type": "RatePerHour",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipment_type_gross_capacity": 123,
"load_unit_of_measure": "Load",
"recurring_loads": true,
"order_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": true,
"default_digital_ticket_view": false,
"tax_rate": 123,
"tax_freight": false,
"tax_material": false,
"tax_add_ons": false
}
'import requests
url = "https://api.tread-horizon.com/v1/projects"
payload = {
"name": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phases": [
{
"name": "<string>",
"code": "<string>",
"primary": True
}
],
"project_material_totals": [
{
"material_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": 123,
"unit_of_measure": "Load"
}
],
"sales_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreman_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"collaborator_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"salesperson_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"customer_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"driver_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hauler_rate_type": "<string>",
"service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_class_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_time": 123,
"order_quantity": 123,
"equipment_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loads_per_truck": 13,
"truck_count": 100,
"units_per_hour": 123,
"job_quantity": 123,
"waypoints": [
{
"type": "pickup",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordinality": 123,
"contact": {
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"customer_rate_value": 123,
"customer_rate_type": "RatePerHour",
"vendor_rate_value": 123,
"vendor_rate_type": "RatePerHour",
"driver_rate_value": 123,
"driver_rate_type": "RatePerHour",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"equipment_type_gross_capacity": 123,
"load_unit_of_measure": "Load",
"recurring_loads": True,
"order_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": True,
"default_digital_ticket_view": False,
"tax_rate": 123,
"tax_freight": False,
"tax_material": False,
"tax_add_ons": False
}
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({
name: '<string>',
effective_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
notes: '<string>',
order_notes: '<string>',
job_notes: '<string>',
internal_notes: '<string>',
po_job_number: '<string>',
external_id: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
site_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
phases: [{name: '<string>', code: '<string>', primary: true}],
project_material_totals: [
{
material_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
total_quantity: 123,
unit_of_measure: 'Load'
}
],
sales_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
foreman_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
supervisor_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
collaborator_contact: {name: '<string>', email: '<string>', phone: '+18885551234'},
department_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
foreman_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
collaborator_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
salesperson_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
customer_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vendor_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
driver_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
hauler_rate_type: '<string>',
service_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
service_class_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
job_time: 123,
order_quantity: 123,
equipment_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
loads_per_truck: 13,
truck_count: 100,
units_per_hour: 123,
job_quantity: 123,
waypoints: [
{
type: 'pickup',
site_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ordinality: 123,
contact: {name: '<string>', email: '<string>', phone: '+18885551234'}
}
],
customer_rate_value: 123,
customer_rate_type: 'RatePerHour',
vendor_rate_value: 123,
vendor_rate_type: 'RatePerHour',
driver_rate_value: 123,
driver_rate_type: 'RatePerHour',
requester_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
equipment_type_gross_capacity: 123,
load_unit_of_measure: 'Load',
recurring_loads: true,
order_unit_of_measure: 'Load',
job_unit_of_measure: 'Load',
equipment_type_gross_capacity_unit_of_measure: 'Load',
charge_to_account: '<string>',
chase_missing_tickets: true,
default_digital_ticket_view: false,
tax_rate: 123,
tax_freight: false,
tax_material: false,
tax_add_ons: false
})
};
fetch('https://api.tread-horizon.com/v1/projects', 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/projects",
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([
'name' => '<string>',
'effective_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'order_notes' => '<string>',
'job_notes' => '<string>',
'internal_notes' => '<string>',
'po_job_number' => '<string>',
'external_id' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'site_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'company_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'phases' => [
[
'name' => '<string>',
'code' => '<string>',
'primary' => true
]
],
'project_material_totals' => [
[
'material_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'total_quantity' => 123,
'unit_of_measure' => 'Load'
]
],
'sales_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'foreman_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'supervisor_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'collaborator_contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
],
'department_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'foreman_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'collaborator_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'salesperson_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'customer_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vendor_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'driver_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'hauler_rate_type' => '<string>',
'service_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'service_class_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'job_time' => 123,
'order_quantity' => 123,
'equipment_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'loads_per_truck' => 13,
'truck_count' => 100,
'units_per_hour' => 123,
'job_quantity' => 123,
'waypoints' => [
[
'type' => 'pickup',
'site_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ordinality' => 123,
'contact' => [
'name' => '<string>',
'email' => '<string>',
'phone' => '+18885551234'
]
]
],
'customer_rate_value' => 123,
'customer_rate_type' => 'RatePerHour',
'vendor_rate_value' => 123,
'vendor_rate_type' => 'RatePerHour',
'driver_rate_value' => 123,
'driver_rate_type' => 'RatePerHour',
'requester_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'equipment_type_gross_capacity' => 123,
'load_unit_of_measure' => 'Load',
'recurring_loads' => true,
'order_unit_of_measure' => 'Load',
'job_unit_of_measure' => 'Load',
'equipment_type_gross_capacity_unit_of_measure' => 'Load',
'charge_to_account' => '<string>',
'chase_missing_tickets' => true,
'default_digital_ticket_view' => false,
'tax_rate' => 123,
'tax_freight' => false,
'tax_material' => false,
'tax_add_ons' => false
]),
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/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\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/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tread-horizon.com/v1/projects")
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 \"name\": \"<string>\",\n \"effective_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"order_notes\": \"<string>\",\n \"job_notes\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"po_job_number\": \"<string>\",\n \"external_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"company_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"primary\": true\n }\n ],\n \"project_material_totals\": [\n {\n \"material_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"total_quantity\": 123,\n \"unit_of_measure\": \"Load\"\n }\n ],\n \"sales_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"foreman_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"supervisor_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"collaborator_contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n },\n \"department_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"foreman_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"collaborator_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"salesperson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"customer_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vendor_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"driver_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"hauler_rate_type\": \"<string>\",\n \"service_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"service_class_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"job_time\": 123,\n \"order_quantity\": 123,\n \"equipment_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"loads_per_truck\": 13,\n \"truck_count\": 100,\n \"units_per_hour\": 123,\n \"job_quantity\": 123,\n \"waypoints\": [\n {\n \"type\": \"pickup\",\n \"site_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ordinality\": 123,\n \"contact\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"+18885551234\"\n }\n }\n ],\n \"customer_rate_value\": 123,\n \"customer_rate_type\": \"RatePerHour\",\n \"vendor_rate_value\": 123,\n \"vendor_rate_type\": \"RatePerHour\",\n \"driver_rate_value\": 123,\n \"driver_rate_type\": \"RatePerHour\",\n \"requester_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"equipment_type_gross_capacity\": 123,\n \"load_unit_of_measure\": \"Load\",\n \"recurring_loads\": true,\n \"order_unit_of_measure\": \"Load\",\n \"job_unit_of_measure\": \"Load\",\n \"equipment_type_gross_capacity_unit_of_measure\": \"Load\",\n \"charge_to_account\": \"<string>\",\n \"chase_missing_tickets\": true,\n \"default_digital_ticket_view\": false,\n \"tax_rate\": 123,\n \"tax_freight\": false,\n \"tax_material\": false,\n \"tax_add_ons\": false\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",
"expires_at": "<string>",
"effective_at": "<string>",
"name": "<string>",
"notes": "<string>",
"order_notes": "<string>",
"job_notes": "<string>",
"internal_notes": "<string>",
"po_job_number": "<string>",
"external_id": "<string>",
"state": "active",
"project_id": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"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"
}
},
"phases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"code": "<string>",
"primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"project_material_totals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_quantity": "<string>",
"unit_of_measure": "Load",
"material": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"foremen": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "<string>",
"company": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tread_id": "ABC123",
"legal_name": "<string>",
"company_type": "hauler"
},
"discarded_at": "2023-11-07T05:31:56Z",
"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"
}
}
],
"collaborators": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
}
],
"salespeople": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
}
],
"hauler_rate_type": "<string>",
"job_time": 123,
"order_quantity": "<string>",
"loads_per_truck": 123,
"truck_count": 123,
"units_per_hour": 123,
"job_quantity": "<string>",
"customer_rate_value": "<string>",
"customer_rate_type": "RatePerHour",
"vendor_rate_value": "<string>",
"vendor_rate_type": "RatePerHour",
"driver_rate_value": "<string>",
"driver_rate_type": "RatePerHour",
"equipment_type_gross_capacity": "<string>",
"load_unit_of_measure": "Load",
"job_unit_of_measure": "Load",
"order_unit_of_measure": "Load",
"recurring_loads": true,
"equipment_type_gross_capacity_unit_of_measure": "Load",
"charge_to_account": "<string>",
"chase_missing_tickets": true,
"tax_rate": "<string>",
"tax_freight": false,
"tax_material": false,
"tax_add_ons": false,
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"lat": "<string>",
"lon": "<string>",
"full_address": "<string>",
"routable": true,
"discarded_at": "2023-11-07T05:31:56Z",
"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>"
},
"next_billion_geofence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geofence": {
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geojson": {
"type": "<string>",
"coordinates": [
[
[
"<unknown>"
]
]
]
},
"circle_center": {
"lat": 123,
"lon": 123
},
"circle_radius": 123
},
"moving_geofence": false
}
},
"sales_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"foreman_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"supervisor_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"collaborator_contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
},
"department": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"customer_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"vendor_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"driver_rate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "RatePerHour",
"time_rate": 123
},
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"service_class": {
"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>"
},
"waypoints": [
{
"type": "pickup",
"ordinality": 123,
"site": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"lat": "<string>",
"lon": "<string>",
"full_address": "<string>",
"routable": true,
"discarded_at": "2023-11-07T05:31:56Z",
"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>"
},
"next_billion_geofence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geofence": {
"name": "<string>",
"type": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"geojson": {
"type": "<string>",
"coordinates": [
[
[
"<unknown>"
]
]
]
},
"circle_center": {
"lat": 123,
"lon": 123
},
"circle_radius": 123
},
"moving_geofence": false
}
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>",
"phone": "+18885551234"
}
}
],
"requester": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"discarded_at": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"external_id": "<string>",
"schedule_on": true
},
"dispatch_number": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"default_digital_ticket_view": false
}
}{
"error": {
"code": "<string>"
}
}{
"error": {
"code": "<string>",
"error_type": "<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.
"en"
Body
Project name, must be unique in the current Company
Timestamp of the Project's effective start. Must be less than expires_at if expires_at is present.
Timestamp of the Project's effective end. Must be greater than effective_at if effective_at is present.
Project notes
Order notes
Job notes
Project notes
PO/Job # for Project
External # for Project, must be unique in the current Company
Account ID.
One of account_id or account is required.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Time in minutes
1 <= x <= 251 <= x <= 200Show child attributes
Show child attributes
RatePerHour, RatePerDay, RatePerLoad, RatePerTon, RatePerTonne, RatePerYard, RatePerBushel, RateCommission, RateFlatCommission, RateFlatRate "RatePerHour"
RatePerHour, RatePerDay, RatePerLoad, RatePerTon, RatePerTonne, RatePerYard, RatePerBushel, RateCommission, RateFlatCommission, RateFlatRate "RatePerHour"
RatePerHour, RatePerDay, RatePerLoad, RatePerTon, RatePerTonne, RatePerYard, RatePerBushel, RateCommission, RateFlatCommission, RateFlatRate "RatePerHour"
Load, Tonne, Ton, Yard, Meter, Foot, Liter, Hour, Bushel, Gallon, CubicMeter, Mile, Kilometer, Barrel, Bag, Pallet "Load"
Show child attributes
Show child attributes
Load, Tonne, Ton, Yard, Meter, Foot, Liter, Hour, Bushel, Gallon, CubicMeter, Mile, Kilometer, Barrel, Bag, Pallet "Load"
Load, Tonne, Ton, Yard, Meter, Foot, Liter, Hour, Bushel, Gallon, CubicMeter, Mile, Kilometer, Barrel, Bag, Pallet "Load"
Load, Tonne, Ton, Yard, Meter, Foot, Liter, Hour, Bushel, Gallon, CubicMeter, Mile, Kilometer, Barrel, Bag, Pallet "Load"
Enable ticket chasing for jobs in orders with this project
Use the default digital ticket view for orders in this project
Tax rate percentage (up to 4 decimal places)
Whether freight line items and FSC are taxable
Whether material line items are taxable
Whether add-on charges are taxable (dual-confirm with add_on.taxable)
Response
Created
Read model for Project
Show child attributes
Show child attributes