Fail a Job
curl --request POST \
--url https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"driver_notes": "<string>",
"fail_reason": "<string>",
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": true
}
],
"alternate_drop_type_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type_id": 123,
"customer_id": 123,
"customer_notes": "<string>",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatcher_notes": "<string>",
"do_confirm": true,
"dump_location_id": 123,
"ends_at_customer": true,
"final_location_id": 123,
"flags": "<string>",
"is_acknowledged": true,
"is_separate_from_route_list": true,
"job_group_id": 123,
"line_1": "<string>",
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"reference_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": true,
"require_material": true,
"require_materials": true,
"require_signature": true,
"require_weights": true,
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location_id": 123,
"starts_at_customer": true,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"truck_id": 123,
"type": "<string>"
}
'import requests
url = "https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail"
payload = {
"driver_notes": "<string>",
"fail_reason": "<string>",
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": True
}
],
"alternate_drop_type_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type_id": 123,
"customer_id": 123,
"customer_notes": "<string>",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatcher_notes": "<string>",
"do_confirm": True,
"dump_location_id": 123,
"ends_at_customer": True,
"final_location_id": 123,
"flags": "<string>",
"is_acknowledged": True,
"is_separate_from_route_list": True,
"job_group_id": 123,
"line_1": "<string>",
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"reference_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": True,
"require_material": True,
"require_materials": True,
"require_signature": True,
"require_weights": True,
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location_id": 123,
"starts_at_customer": True,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"truck_id": 123,
"type": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
driver_notes: '<string>',
fail_reason: '<string>',
add_to_routes: '<string>',
add_to_routes_settings: [{id: 123, priority: 123, skip: true}],
alternate_drop_type_id: 123,
asset_id: 123,
asset_quantity: 123,
asset_type_id: 123,
customer_id: 123,
customer_notes: '<string>',
desired_asset_desc: '<string>',
desired_end_time: '2023-11-07T05:31:56Z',
desired_start_time: '2023-11-07T05:31:56Z',
dispatch_priority: '<string>',
dispatcher_notes: '<string>',
do_confirm: true,
dump_location_id: 123,
ends_at_customer: true,
final_location_id: 123,
flags: '<string>',
is_acknowledged: true,
is_separate_from_route_list: true,
job_group_id: 123,
line_1: '<string>',
merged_with_route_id: 123,
original_schedule_date: '2023-11-07T05:31:56Z',
pickup_date: '2023-11-07T05:31:56Z',
pickup_item: 123,
priority: 123,
reference_number: '<string>',
requested_by: 123,
requested_on: '2023-11-07T05:31:56Z',
require_image: true,
require_material: true,
require_materials: true,
require_signature: true,
require_weights: true,
scale_ticket: '<string>',
schedule_date: '2023-11-07T05:31:56Z',
start_location_id: 123,
starts_at_customer: true,
third_party_hauler_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
truck_id: 123,
type: '<string>'
})
};
fetch('https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail', 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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail",
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([
'driver_notes' => '<string>',
'fail_reason' => '<string>',
'add_to_routes' => '<string>',
'add_to_routes_settings' => [
[
'id' => 123,
'priority' => 123,
'skip' => true
]
],
'alternate_drop_type_id' => 123,
'asset_id' => 123,
'asset_quantity' => 123,
'asset_type_id' => 123,
'customer_id' => 123,
'customer_notes' => '<string>',
'desired_asset_desc' => '<string>',
'desired_end_time' => '2023-11-07T05:31:56Z',
'desired_start_time' => '2023-11-07T05:31:56Z',
'dispatch_priority' => '<string>',
'dispatcher_notes' => '<string>',
'do_confirm' => true,
'dump_location_id' => 123,
'ends_at_customer' => true,
'final_location_id' => 123,
'flags' => '<string>',
'is_acknowledged' => true,
'is_separate_from_route_list' => true,
'job_group_id' => 123,
'line_1' => '<string>',
'merged_with_route_id' => 123,
'original_schedule_date' => '2023-11-07T05:31:56Z',
'pickup_date' => '2023-11-07T05:31:56Z',
'pickup_item' => 123,
'priority' => 123,
'reference_number' => '<string>',
'requested_by' => 123,
'requested_on' => '2023-11-07T05:31:56Z',
'require_image' => true,
'require_material' => true,
'require_materials' => true,
'require_signature' => true,
'require_weights' => true,
'scale_ticket' => '<string>',
'schedule_date' => '2023-11-07T05:31:56Z',
'start_location_id' => 123,
'starts_at_customer' => true,
'third_party_hauler_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'truck_id' => 123,
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail"
payload := strings.NewReader("{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": true
}
],
"additional_items": [
{
"deduct_weight": "<string>",
"description": "<string>",
"heavy_weight": "<string>",
"id": 123,
"is_completed": true,
"is_declined": true,
"is_failed": true,
"job_id": 123,
"light_weight": "<string>",
"material_item_id": 123,
"notes": "<string>",
"quantity": "<string>",
"required": true
}
],
"alternate_drop_type_id": 123,
"arrived_at_destination_on": "2023-11-07T05:31:56Z",
"arrived_on": "2023-11-07T05:31:56Z",
"asset": {
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"cluster": 123,
"customer_id": 123,
"description": "<string>",
"dispatched_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_returned": true,
"last_activity_on": "2023-11-07T05:31:56Z",
"last_rental_invoice_on": "2023-11-07T05:31:56Z",
"latitude": "<string>",
"location": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"locality": "<string>",
"longitude": "<string>",
"region": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"postcode": "<string>"
},
"location_id": 123,
"longitude": "<string>",
"number": "<string>",
"quantity": 123,
"returned_on": "2023-11-07T05:31:56Z"
},
"asset_dropped_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"completed_by": 123,
"completed_on": "2023-11-07T05:31:56Z",
"confirmed_on": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_driver": true,
"created_with_portal": true,
"customer": {
"account_number_1": "<string>",
"account_number_2": "<string>",
"addresses": [
{
"country": "<string>",
"id": 123,
"is_active": true,
"is_billing": true,
"is_physical": true,
"is_shipping": true,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
}
],
"contacts": [
{
"email": "jsmith@example.com",
"fax": "<string>",
"id": 123,
"name": "<string>",
"notify_on_acknowledged_request": true,
"notify_on_completed_request": true,
"notify_on_dispatched_request": true,
"notify_on_failed_request": true,
"notify_on_new_request": true,
"number": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_active": true,
"last_updated_on": "2023-11-07T05:31:56Z",
"location_id": 123,
"locations": [
{
"created_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_active": true,
"last_updated_on": "2023-11-07T05:31:56Z",
"location_id": 123,
"renewal_date": "2023-11-07T05:31:56Z",
"is_commercial": true,
"note": "<string>",
"reference_number": "<string>",
"sales_rep": "<string>",
"sales_rep_id": "<string>",
"suspension_id": 123
}
],
"name": "<string>",
"parent_id": 123,
"renewal_date": "2023-11-07T05:31:56Z",
"is_commercial": true,
"note": "<string>",
"reference_number": "<string>",
"sales_rep": "<string>",
"sales_rep_id": "<string>",
"suspension_id": 123
},
"customer_id": 123,
"customer_notes": "<string>",
"departed_on": "2023-11-07T05:31:56Z",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatched_by_route": 123,
"dispatched_on": "2023-11-07T05:31:56Z",
"dispatcher_notes": "<string>",
"do_confirm": true,
"driver_notes": "<string>",
"dropped_asset": {
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"cluster": 123,
"customer_id": 123,
"description": "<string>",
"dispatched_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_returned": true,
"last_activity_on": "2023-11-07T05:31:56Z",
"last_rental_invoice_on": "2023-11-07T05:31:56Z",
"latitude": "<string>",
"location": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"locality": "<string>",
"longitude": "<string>",
"region": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"postcode": "<string>"
},
"location_id": 123,
"longitude": "<string>",
"number": "<string>",
"quantity": 123,
"returned_on": "2023-11-07T05:31:56Z"
},
"dropped_number": "<string>",
"dump_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"dump_location_id": 123,
"dumped_on": "2023-11-07T05:31:56Z",
"ends_at_customer": true,
"fail_reason": "<string>",
"final_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"final_location_id": 123,
"flags": "<string>",
"id": 123,
"images": [
{
"height": 123,
"id": 123,
"s3_object": "<string>",
"url": "<string>",
"width": 123
}
],
"invoice_notes": "<string>",
"is_acknowledged": true,
"is_completed": true,
"is_declined": true,
"is_deleted": true,
"is_failed": true,
"is_paid": true,
"is_separate_from_route_list": true,
"job_group_id": 123,
"last_updated_on": "2023-11-07T05:31:56Z",
"line_1": "<string>",
"location_id": 123,
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"recur_active": true,
"recur_enabled": true,
"reference_number": "<string>",
"removed_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": true,
"require_material": true,
"require_materials": true,
"require_signature": true,
"require_weights": true,
"return_full": [
{
"bin_request_id": 123,
"dumped_by": 123,
"dumped_by_driver": true,
"id": 123,
"original_dest_id": 123,
"original_dump_id": 123,
"returned_by": 123,
"returned_by_driver": true,
"truck_id": 123,
"yard_id": 123
}
],
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"start_location_id": 123,
"started_on": "2023-11-07T05:31:56Z",
"starts_at_customer": true,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"times_failed": 123,
"times_rolled_over": 123,
"truck_id": 123,
"type": "<string>",
"weighed_on": "2023-11-07T05:31:56Z"
}Jobs
Fail a Job
Fail a job.
POST
/
locations
/
{location_id}
/
jobs
/
{job_id}
/
fail
Fail a Job
curl --request POST \
--url https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"driver_notes": "<string>",
"fail_reason": "<string>",
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": true
}
],
"alternate_drop_type_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type_id": 123,
"customer_id": 123,
"customer_notes": "<string>",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatcher_notes": "<string>",
"do_confirm": true,
"dump_location_id": 123,
"ends_at_customer": true,
"final_location_id": 123,
"flags": "<string>",
"is_acknowledged": true,
"is_separate_from_route_list": true,
"job_group_id": 123,
"line_1": "<string>",
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"reference_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": true,
"require_material": true,
"require_materials": true,
"require_signature": true,
"require_weights": true,
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location_id": 123,
"starts_at_customer": true,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"truck_id": 123,
"type": "<string>"
}
'import requests
url = "https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail"
payload = {
"driver_notes": "<string>",
"fail_reason": "<string>",
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": True
}
],
"alternate_drop_type_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type_id": 123,
"customer_id": 123,
"customer_notes": "<string>",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatcher_notes": "<string>",
"do_confirm": True,
"dump_location_id": 123,
"ends_at_customer": True,
"final_location_id": 123,
"flags": "<string>",
"is_acknowledged": True,
"is_separate_from_route_list": True,
"job_group_id": 123,
"line_1": "<string>",
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"reference_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": True,
"require_material": True,
"require_materials": True,
"require_signature": True,
"require_weights": True,
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location_id": 123,
"starts_at_customer": True,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"truck_id": 123,
"type": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
driver_notes: '<string>',
fail_reason: '<string>',
add_to_routes: '<string>',
add_to_routes_settings: [{id: 123, priority: 123, skip: true}],
alternate_drop_type_id: 123,
asset_id: 123,
asset_quantity: 123,
asset_type_id: 123,
customer_id: 123,
customer_notes: '<string>',
desired_asset_desc: '<string>',
desired_end_time: '2023-11-07T05:31:56Z',
desired_start_time: '2023-11-07T05:31:56Z',
dispatch_priority: '<string>',
dispatcher_notes: '<string>',
do_confirm: true,
dump_location_id: 123,
ends_at_customer: true,
final_location_id: 123,
flags: '<string>',
is_acknowledged: true,
is_separate_from_route_list: true,
job_group_id: 123,
line_1: '<string>',
merged_with_route_id: 123,
original_schedule_date: '2023-11-07T05:31:56Z',
pickup_date: '2023-11-07T05:31:56Z',
pickup_item: 123,
priority: 123,
reference_number: '<string>',
requested_by: 123,
requested_on: '2023-11-07T05:31:56Z',
require_image: true,
require_material: true,
require_materials: true,
require_signature: true,
require_weights: true,
scale_ticket: '<string>',
schedule_date: '2023-11-07T05:31:56Z',
start_location_id: 123,
starts_at_customer: true,
third_party_hauler_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
truck_id: 123,
type: '<string>'
})
};
fetch('https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail', 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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail",
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([
'driver_notes' => '<string>',
'fail_reason' => '<string>',
'add_to_routes' => '<string>',
'add_to_routes_settings' => [
[
'id' => 123,
'priority' => 123,
'skip' => true
]
],
'alternate_drop_type_id' => 123,
'asset_id' => 123,
'asset_quantity' => 123,
'asset_type_id' => 123,
'customer_id' => 123,
'customer_notes' => '<string>',
'desired_asset_desc' => '<string>',
'desired_end_time' => '2023-11-07T05:31:56Z',
'desired_start_time' => '2023-11-07T05:31:56Z',
'dispatch_priority' => '<string>',
'dispatcher_notes' => '<string>',
'do_confirm' => true,
'dump_location_id' => 123,
'ends_at_customer' => true,
'final_location_id' => 123,
'flags' => '<string>',
'is_acknowledged' => true,
'is_separate_from_route_list' => true,
'job_group_id' => 123,
'line_1' => '<string>',
'merged_with_route_id' => 123,
'original_schedule_date' => '2023-11-07T05:31:56Z',
'pickup_date' => '2023-11-07T05:31:56Z',
'pickup_item' => 123,
'priority' => 123,
'reference_number' => '<string>',
'requested_by' => 123,
'requested_on' => '2023-11-07T05:31:56Z',
'require_image' => true,
'require_material' => true,
'require_materials' => true,
'require_signature' => true,
'require_weights' => true,
'scale_ticket' => '<string>',
'schedule_date' => '2023-11-07T05:31:56Z',
'start_location_id' => 123,
'starts_at_customer' => true,
'third_party_hauler_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'truck_id' => 123,
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail"
payload := strings.NewReader("{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crosoftware.com/v0/locations/{location_id}/jobs/{job_id}/fail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"driver_notes\": \"<string>\",\n \"fail_reason\": \"<string>\",\n \"add_to_routes\": \"<string>\",\n \"add_to_routes_settings\": [\n {\n \"id\": 123,\n \"priority\": 123,\n \"skip\": true\n }\n ],\n \"alternate_drop_type_id\": 123,\n \"asset_id\": 123,\n \"asset_quantity\": 123,\n \"asset_type_id\": 123,\n \"customer_id\": 123,\n \"customer_notes\": \"<string>\",\n \"desired_asset_desc\": \"<string>\",\n \"desired_end_time\": \"2023-11-07T05:31:56Z\",\n \"desired_start_time\": \"2023-11-07T05:31:56Z\",\n \"dispatch_priority\": \"<string>\",\n \"dispatcher_notes\": \"<string>\",\n \"do_confirm\": true,\n \"dump_location_id\": 123,\n \"ends_at_customer\": true,\n \"final_location_id\": 123,\n \"flags\": \"<string>\",\n \"is_acknowledged\": true,\n \"is_separate_from_route_list\": true,\n \"job_group_id\": 123,\n \"line_1\": \"<string>\",\n \"merged_with_route_id\": 123,\n \"original_schedule_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_date\": \"2023-11-07T05:31:56Z\",\n \"pickup_item\": 123,\n \"priority\": 123,\n \"reference_number\": \"<string>\",\n \"requested_by\": 123,\n \"requested_on\": \"2023-11-07T05:31:56Z\",\n \"require_image\": true,\n \"require_material\": true,\n \"require_materials\": true,\n \"require_signature\": true,\n \"require_weights\": true,\n \"scale_ticket\": \"<string>\",\n \"schedule_date\": \"2023-11-07T05:31:56Z\",\n \"start_location_id\": 123,\n \"starts_at_customer\": true,\n \"third_party_hauler_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"truck_id\": 123,\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"add_to_routes": "<string>",
"add_to_routes_settings": [
{
"id": 123,
"priority": 123,
"skip": true
}
],
"additional_items": [
{
"deduct_weight": "<string>",
"description": "<string>",
"heavy_weight": "<string>",
"id": 123,
"is_completed": true,
"is_declined": true,
"is_failed": true,
"job_id": 123,
"light_weight": "<string>",
"material_item_id": 123,
"notes": "<string>",
"quantity": "<string>",
"required": true
}
],
"alternate_drop_type_id": 123,
"arrived_at_destination_on": "2023-11-07T05:31:56Z",
"arrived_on": "2023-11-07T05:31:56Z",
"asset": {
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"cluster": 123,
"customer_id": 123,
"description": "<string>",
"dispatched_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_returned": true,
"last_activity_on": "2023-11-07T05:31:56Z",
"last_rental_invoice_on": "2023-11-07T05:31:56Z",
"latitude": "<string>",
"location": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"locality": "<string>",
"longitude": "<string>",
"region": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"postcode": "<string>"
},
"location_id": 123,
"longitude": "<string>",
"number": "<string>",
"quantity": 123,
"returned_on": "2023-11-07T05:31:56Z"
},
"asset_dropped_id": 123,
"asset_id": 123,
"asset_quantity": 123,
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"completed_by": 123,
"completed_on": "2023-11-07T05:31:56Z",
"confirmed_on": "2023-11-07T05:31:56Z",
"created_by": 123,
"created_by_driver": true,
"created_with_portal": true,
"customer": {
"account_number_1": "<string>",
"account_number_2": "<string>",
"addresses": [
{
"country": "<string>",
"id": 123,
"is_active": true,
"is_billing": true,
"is_physical": true,
"is_shipping": true,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
}
],
"contacts": [
{
"email": "jsmith@example.com",
"fax": "<string>",
"id": 123,
"name": "<string>",
"notify_on_acknowledged_request": true,
"notify_on_completed_request": true,
"notify_on_dispatched_request": true,
"notify_on_failed_request": true,
"notify_on_new_request": true,
"number": "<string>"
}
],
"created_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_active": true,
"last_updated_on": "2023-11-07T05:31:56Z",
"location_id": 123,
"locations": [
{
"created_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_active": true,
"last_updated_on": "2023-11-07T05:31:56Z",
"location_id": 123,
"renewal_date": "2023-11-07T05:31:56Z",
"is_commercial": true,
"note": "<string>",
"reference_number": "<string>",
"sales_rep": "<string>",
"sales_rep_id": "<string>",
"suspension_id": 123
}
],
"name": "<string>",
"parent_id": 123,
"renewal_date": "2023-11-07T05:31:56Z",
"is_commercial": true,
"note": "<string>",
"reference_number": "<string>",
"sales_rep": "<string>",
"sales_rep_id": "<string>",
"suspension_id": 123
},
"customer_id": 123,
"customer_notes": "<string>",
"departed_on": "2023-11-07T05:31:56Z",
"desired_asset_desc": "<string>",
"desired_end_time": "2023-11-07T05:31:56Z",
"desired_start_time": "2023-11-07T05:31:56Z",
"dispatch_priority": "<string>",
"dispatched_by_route": 123,
"dispatched_on": "2023-11-07T05:31:56Z",
"dispatcher_notes": "<string>",
"do_confirm": true,
"driver_notes": "<string>",
"dropped_asset": {
"asset_type": {
"deleted": true,
"id": 123,
"is_default": true,
"location_id": 123,
"name": "<string>",
"quantity": 123,
"require_numbers": true,
"weight": "<string>"
},
"asset_type_id": 123,
"cluster": 123,
"customer_id": 123,
"description": "<string>",
"dispatched_on": "2023-11-07T05:31:56Z",
"id": 123,
"is_returned": true,
"last_activity_on": "2023-11-07T05:31:56Z",
"last_rental_invoice_on": "2023-11-07T05:31:56Z",
"latitude": "<string>",
"location": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"locality": "<string>",
"longitude": "<string>",
"region": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"postcode": "<string>"
},
"location_id": 123,
"longitude": "<string>",
"number": "<string>",
"quantity": 123,
"returned_on": "2023-11-07T05:31:56Z"
},
"dropped_number": "<string>",
"dump_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"dump_location_id": 123,
"dumped_on": "2023-11-07T05:31:56Z",
"ends_at_customer": true,
"fail_reason": "<string>",
"final_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"final_location_id": 123,
"flags": "<string>",
"id": 123,
"images": [
{
"height": 123,
"id": 123,
"s3_object": "<string>",
"url": "<string>",
"width": 123
}
],
"invoice_notes": "<string>",
"is_acknowledged": true,
"is_completed": true,
"is_declined": true,
"is_deleted": true,
"is_failed": true,
"is_paid": true,
"is_separate_from_route_list": true,
"job_group_id": 123,
"last_updated_on": "2023-11-07T05:31:56Z",
"line_1": "<string>",
"location_id": 123,
"merged_with_route_id": 123,
"original_schedule_date": "2023-11-07T05:31:56Z",
"pickup_date": "2023-11-07T05:31:56Z",
"pickup_item": 123,
"priority": 123,
"recur_active": true,
"recur_enabled": true,
"reference_number": "<string>",
"removed_number": "<string>",
"requested_by": 123,
"requested_on": "2023-11-07T05:31:56Z",
"require_image": true,
"require_material": true,
"require_materials": true,
"require_signature": true,
"require_weights": true,
"return_full": [
{
"bin_request_id": 123,
"dumped_by": 123,
"dumped_by_driver": true,
"id": 123,
"original_dest_id": 123,
"original_dump_id": 123,
"returned_by": 123,
"returned_by_driver": true,
"truck_id": 123,
"yard_id": 123
}
],
"scale_ticket": "<string>",
"schedule_date": "2023-11-07T05:31:56Z",
"start_location": {
"address": {
"id": 123,
"latitude": "<string>",
"line_1": "<string>",
"line_2": "<string>",
"line_3": "<string>",
"line_4": "<string>",
"locality": "<string>",
"longitude": "<string>",
"postcode": "<string>",
"region": "<string>"
},
"contact": {
"email": "jsmith@example.com",
"id": 123,
"name": "<string>",
"number": "<string>"
},
"description": "<string>",
"id": 123,
"is_holding_yard": true,
"location_id": 123
},
"start_location_id": 123,
"started_on": "2023-11-07T05:31:56Z",
"starts_at_customer": true,
"third_party_hauler_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"times_failed": 123,
"times_rolled_over": 123,
"truck_id": 123,
"type": "<string>",
"weighed_on": "2023-11-07T05:31:56Z"
}Authorizations
Headers
Tenant identifier. Contact CRO Software for more info if you don't already have this id. See list tenant ids for info on listing the tenants you have access to.
Path Parameters
Body
application/json
Create signature request.
Response
200 - application/json
Success
Job model.