Load List API (Application Programming Interface) Documentation

This document is meant as a guide to using the API not a cut-and-paste solution. Please check and verify your work before putting it into production.

API Information

The Load API's base url is (SERVER BASE URL)/extenal/loadlist

API url will be relative to this url.

Example: An API call to /loadlist will be reachable at:

(SERVER BASE URL)/external/loadlist/dot-v1

Technical Details

All API Calls must be made with an HTTP POST request.

All input to and output from the API is made using JSON objects.

All input payloads MUST contain the user's com_code (Company Code) and api_key

Authentication

Example Request: Generate Token

{
   "name":"generateToken",
   "param":{
     "com_code":"S000000",
     "api_key":"api-12345-67890-ABCDE-F1234-56789-0ABCD"
   }
}

Example Response:

{
   "response": {
     "status": 200,
     "message": {
       "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
           eyJpYXQiOjE1MjM1NTE0MjksImlzcyI6ImxvY2FsaG9zdCIsImV4cCI6MTUyMzU1MTQ4OSwidXNlcklkIjoiMyJ9.
           VV1MiZGwYSqS_wUzHJqfS57D2dMX1hWKSkX27_59gr8"
     }
   }
}

API Method: addShipperLoadList()

This API Method will insert a load into the Archived Load List.

The method and parameter examples are given below.

PHP CURL Code Example:

Get Token Method

function getToken($com_code,$api_key,$url)
{
   $curl = curl_init();
   $request = '{ "name":"generateToken",
     "param":{
     "com_code":"' . $com_code . '",
     "api_key":"' . $api_key . '"
     }
   }';
   curl_setopt($curl, CURLOPT_URL, $url);
   curl_setopt($curl, CURLOPT_HTTPHEADER, ['content-type: application/json']);
   curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   $result = curl_exec($curl);
   $err = curl_error($curl);
   curl_close($curl);
   if ($err) {
     return 'Curl Error: ' . $err;
   } else {
     $response = json_decode($result, true);
     if(isset($response['response']['message']['token'])){
       $return = $response['response']['message']['token'];
     } else {
       $return = print_r($response);
     }
     return $return;
   }
}
$token = getToken($com_code,$api_key,$url)

Add An Archived Load Method ( * = Required )

function addShipperLoadList(
     $token, $url, $com_code,
     $load_number, $load_bol,
     $load_pick_address, $load_pick_town, $load_pick_state, $load_pick_postal, $load_pick_lat, $load_pick_long,
     $load_deliver_address, $load_deliver_town, $load_deliver_state, $load_deliver_postal, $load_deliver_lat, $load_deliver_long,
     $additional_stop,
     $add_pick1_address, $add_pick1_town, $add_pick1_state, $add_pick1_postal, $add_pick1_lat, $add_pick1_long,
     $add_pick2_address, $add_pick2_town, $add_pick2_state, $add_pick2_postal, $add_pick2_lat, $add_pick2_long,
     $add_pick3_address, $add_pick3_town, $add_pick3_state, $add_pick3_postal, $add_pick3_lat, $add_pick3_long,
     $add_pick4_address, $add_pick4_town, $add_pick4_state, $add_pick4_postal, $add_pick4_lat, $add_pick4_long,
     $add_pick5_address, $add_pick5_town, $add_pick5_state, $add_pick5_postal, $add_pick5_lat, $add_pick5_long,
     $add_deliver1_address, $add_deliver1_town, $add_deliver1_state, $add_deliver1_postal, $add_deliver1_lat, $add_deliver1_long,
     $add_deliver2_address, $add_deliver2_town, $add_deliver2_state, $add_deliver2_postal, $add_deliver2_lat, $add_deliver2_long,
     $add_deliver3_address, $add_deliver3_town, $add_deliver3_state, $add_deliver3_postal, $add_deliver3_lat, $add_deliver3_long,
     $add_deliver4_address, $add_deliver4_town, $add_deliver4_state, $add_deliver4_postal, $add_deliver4_lat, $add_deliver4_long,
     $add_deliver5_address, $add_deliver5_town, $add_deliver5_state, $add_deliver5_postal, $add_deliver5_lat, $add_deliver5_long,
     $load_lift_gate, $load_expedite, $load_drop_trailer,
     $load_truck_load, $weight_class, $commodity, $hazmat,
     $weight, $weight_uom, $cube, $cube_uom,
     $equipment, $equip_temp, $temp_uom,
     $total_mileage,$mileage_uom,
     $pick_confirm_date, $pick_confirm_time,
     $deliver_confirm_date, $deliver_confirm_time,
     $carrier_com_name, $carrier_com_city, $carrier_com_state,
     $carrier_contact_name, $carrier_contact_phone,
     $carrier_contact_email,
     $load_rate_value, $load_rate_currency
    
   )
{
   $curl = curl_init();
  
   $request = '{
     "name":"addShipperLoadList",
     "param":{
       "com_code":"'.$com_code.'",
       "load_number":"'.$load_number.'",
       "load_bol":"'.$load_bol.'",
       "load_pick_address":"'.$load_pick_address.'",
       "load_pick_town":"'.$load_pick_town.'",
       "load_pick_state":"'.$load_pick_state.'",
       "load_pick_postal":"'.$load_pick_postal.'",
       "load_pick_lat":"'.$load_pick_lat.'",
       "load_pick_long":"'.$load_pick_long.'",
       "load_deliver_address":"'.$load_deliver_address.'",
       "load_deliver_town":"'.$load_deliver_town.'",
       "load_deliver_state":"'.$load_deliver_state.'",
       "load_deliver_postal":"'.$load_deliver_postal.'",
       "load_deliver_lat":"'.$load_deliver_lat.'",
       "load_deliver_long":"'.$load_deliver_long.'",
       "additional_stop":"'.$additional_stop.'",
       "add_pick1_address":"'.$add_pick1_address.'",
       "add_pick1_town":"'.$add_pick1_town.'",
       "add_pick1_state":"'.$add_pick1_state.'",
       "add_pick1_postal":"'.$add_pick1_postal.'",
       "add_pick1_lat":"'.$add_pick1_lat.'",
       "add_pick1_long":"'.$add_pick1_long.'",
       "add_pick2_address":"'.$add_pick2_address.'",
       "add_pick2_town":"'.$add_pick2_town.'",
       "add_pick2_state":"'.$add_pick2_state.'",
       "add_pick2_postal":"'.$add_pick2_postal.'",
       "add_pick2_lat":"'.$add_pick2_lat.'",
       "add_pick2_long":"'.$add_pick2_long.'",
       "add_pick3_address":"'.$add_pick3_address.'",
       "add_pick3_town":"'.$add_pick3_town.'",
       "add_pick3_state":"'.$add_pick3_state.'",
       "add_pick3_postal":"'.$add_pick3_postal.'",
       "add_pick3_lat":"'.$add_pick3_lat.'",
       "add_pick3_long":"'.$add_pick3_long.'",
       "add_pick4_address":"'.$add_pick4_address.'",
       "add_pick4_town":"'.$add_pick4_town.'",
       "add_pick4_state":"'.$add_pick4_state.'",
       "add_pick4_postal":"'.$add_pick4_postal.'",
       "add_pick4_lat":"'.$add_pick4_lat.'",
       "add_pick4_long":"'.$add_pick4_long.'",
       "add_pick5_address":"'.$add_pick5_address.'",
       "add_pick5_town":"'.$add_pick5_town.'",
       "add_pick5_state":"'.$add_pick5_state.'",
       "add_pick5_postal":"'.$add_pick5_postal.'",
       "add_pick5_lat":"'.$add_pick5_lat.'",
       "add_pick5_long":"'.$add_pick5_long.'",
       "add_deliver1_address":"'.$add_deliver1_address.'",
       "add_deliver1_town":"'.$add_deliver1_town.'",
       "add_deliver1_state":"'.$add_deliver1_state.'",
       "add_deliver1_postal":"'.$add_deliver1_postal.'",
       "add_deliver1_lat":"'.$add_deliver1_lat.'",
       "add_deliver1_long":"'.$add_deliver1_long.'",
       "add_deliver2_address":"'.$add_deliver2_address.'",
       "add_deliver2_town":"'.$add_deliver2_town.'",
       "add_deliver2_state":"'.$add_deliver2_state.'",
       "add_deliver2_postal":"'.$add_deliver2_postal.'",
       "add_deliver2_lat":"'.$add_deliver2_lat.'",
       "add_deliver2_long":"'.$add_deliver2_long.'",
       "add_deliver3_address":"'.$add_deliver3_address.'",
       "add_deliver3_town":"'.$add_deliver3_town.'",
       "add_deliver3_state":"'.$add_deliver3_state.'",
       "add_deliver3_postal":"'.$add_deliver3_postal.'",
       "add_deliver3_lat":"'.$add_deliver3_lat.'",
       "add_deliver3_long":"'.$add_deliver3_long.'",
       "add_deliver4_address":"'.$add_deliver4_address.'",
       "add_deliver4_town":"'.$add_deliver4_town.'",
       "add_deliver4_state":"'.$add_deliver4_state.'",
       "add_deliver4_postal":"'.$add_deliver4_postal.'",
       "add_deliver4_lat":"'.$add_deliver4_lat.'",
       "add_deliver4_long":"'.$add_deliver4_long.'",
       "add_deliver5_address":"'.$add_deliver5_address.'",
       "add_deliver5_town":"'.$add_deliver5_town.'",
       "add_deliver5_state":"'.$add_deliver5_state.'",
       "add_deliver5_postal":"'.$add_deliver5_postal.'",
       "add_deliver5_lat":"'.$add_deliver5_lat.'",
       "add_deliver5_long":"'.$add_deliver5_long.'",
       "load_lift_gate":"'.$load_lift_gate.'",
       "load_expedite":"'.$load_expedite.'",
       "load_drop_trailer":"'.$load_drop_trailer.'",
       "load_truck_load":"'.$load_truck_load.'",
       "weight_class":"'.$weight_class.'",
       "commodity":"'.$commodity.'",
       "hazmat":"'.$hazmat.'",
       "weight":"'.$weight.'",
       "weight_uom":"'.$weight_uom.'",
       "cube":"'.$cube.'",
       "cube_uom":"'.$cube_uom.'",
       "equipment":"'.$equipment.'",
       "equip_temp":"'.$equip_temp.'",
       "temp_uom":"'.$temp_uom.'",
       "total_mileage":"'.$total_mileage.'",
       "mileage_uom":"'.$mileage_uom.'",
       "pick_confirm_date":"'.$pick_confirm_date.'",
       "pick_confirm_time":"'.$pick_confirm_time.'",
       "deliver_confirm_date":"'.$deliver_confirm_date.'",
       "deliver_confirm_time":"'.$deliver_confirm_time.'",
       "carrier_com_name":"'.$carrier_com_name.'",
       "carrier_com_city":"'.$carrier_com_city.'",
       "carrier_com_state":"'.$carrier_com_state.'",
       "carrier_contact_name":"'.$carrier_contact_name.'",
       "carrier_contact_phone":"'.$carrier_contact_phone.'",
       "carrier_contact_email":"'.$carrier_contact_email.'",
       "load_rate_value":"'.$load_rate_value.'",
       "load_rate_currency":"'.$load_rate_currency.'"
      
     }
   }';
  
   curl_setopt_array($curl,
     array(
         CURLOPT_URL => $url,
         CURLOPT_RETURNTRANSFER => true,
         CURLOPT_ENCODING => "",
         CURLOPT_MAXREDIRS => 10,
         CURLOPT_TIMEOUT => 30,
         CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
         CURLOPT_CUSTOMREQUEST => "POST",
         CURLOPT_POSTFIELDS => $request,
         CURLOPT_HTTPHEADER => array(
             "Authorization: Bearer $token",
             "Content-Type: application/json",
         ),
     )
   );
  
   $response = curl_exec($curl);
   $err = curl_error($curl);
   curl_close($curl);
  
   if ($err) {
     return "cURL Error #:" . $err;
   } else {
     return $response;
   }
}

Parameters (example) Required

//init input variables
$url='https:/www.dottrucks.com/external/loadlist/dot-v1/';
$com_code='S000000';
$api_key='api-xxxxx';
// param
$com_code = 'S000000';
$load_number = '21345';
$load_bol = '129394';
$load_pick_address = '1400 Princess Street';
$load_pick_town = 'Kingston';
$load_pick_state = 'ca-ON';
  //SEE Regions Table (below) for valid Region Codes (counrty-STATE)
$load_pick_postal = 'K1H 2X5';
$load_pick_lat = 44.2376555;
$load_pick_long = -76.5029935;
$load_deliver_address = '10 Barrie View Drive';
$load_deliver_town = 'Barrie';
$load_deliver_state = 'ca-ON';
  //SEE Regions Table (below) for valid Region Codes (counrty-STATE)
$load_deliver_postal = 'L4N 6A7';
$load_deliver_lat = 44.3400337;
$load_deliver_long = -79.68757;
$additional_stop = 'N';
$add_pick1_address = '';
$add_pick1_town = '';
$add_pick1_state = '';
$add_pick1_postal = '';
$add_pick1_lat = '';
$add_pick1_long = '';
$add_pick2_address = '';
$add_pick2_town = '';
$add_pick2_state = '';
$add_pick2_postal = '';
$add_pick2_lat = '';
$add_pick2_long = '';
$add_pick3_address = '';
$add_pick3_town = '';
$add_pick3_state = '';
$add_pick3_postal = '';
$add_pick3_lat = '';
$add_pick3_long = '';
$add_pick4_address = '';
$add_pick4_town = '';
$add_pick4_state = '';
$add_pick4_postal = '';
$add_pick4_lat = '';
$add_pick4_long = '';
$add_pick5_address = '';
$add_pick5_town = '';
$add_pick5_state = '';
$add_pick5_postal = '';
$add_pick5_lat = '';
$add_pick5_long = '';
$add_deliver1_address = '';
$add_deliver1_town = '';
$add_deliver1_state = '';
$add_deliver1_postal = '';
$add_deliver1_lat = '';
$add_deliver1_long = '';
$add_deliver2_address = '';
$add_deliver2_town = '';
$add_deliver2_state = '';
$add_deliver2_postal = '';
$add_deliver2_lat = '';
$add_deliver2_long = '';
$add_deliver3_address = '';
$add_deliver3_town = '';
$add_deliver3_state = '';
$add_deliver3_postal = '';
$add_deliver3_lat = '';
$add_deliver3_long = '';
$add_deliver4_address = '';
$add_deliver4_town = '';
$add_deliver4_state = '';
$add_deliver4_postal = '';
$add_deliver4_lat = '';
$add_deliver4_long = '';
$add_deliver5_address = '';
$add_deliver5_town = '';
$add_deliver5_state = '';
$add_deliver5_postal = '';
$add_deliver5_lat = '';
$add_deliver5_long = '';
$load_lift_gate = '';
$load_expedite = '';
$load_drop_trailer = '';
$load_truck_load = 'TL';
$weight_class = '';
  //SEE Weight Class Table (below)
$commodity = '2x4x8 Lumber';
$hazmat = '';
  //SEE Hazmat Table (below)
$weight = 42000;
$weight_uom = 'lbs';
  //SEE Weights Table (below)
$cube = 100;
$cube_uom = '% of Trailer';
  //SEE Cube Table (below)
$equipment = 'FLAT WITH TARP';
  //SEE Equipment Table (below)
$equip_temp = 0;
$temp_uom = '';
$total_mileage = 321;
$mileage_uom = 'km';
$pick_confirm_date = '2018-12-31';
$pick_confirm_time = '09:30';
$deliver_confirm_date = '2019-01-04';
$deliver_confirm_time = '13:30';
$carrier_com_name = 'TEST ACCT Snoopy Trucking Inc';
$carrier_com_city = 'Winnipeg';
$carrier_com_state = 'ca-AB';
$carrier_contact_name = 'Dispatch';
$carrier_contact_phone = '(204) 344-7890';
$carrier_contact_email = 'danny@dottrucks.com';
$load_rate_value = 0.00;
$load_rate_currency = '';

Execution

$response = addShipperLoadList(getToken($com_code,$api_key,$url),
         $url, $com_code,$load_number,$load_bol,
         $load_pick_address,$load_pick_town,$load_pick_state
         $load_pick_postal,$load_pick_lat,$load_pick_long
         $load_deliver_address,$load_deliver_town,$load_deliver_state
         $load_deliver_postal,$load_deliver_lat,$load_deliver_long
         $additional_stop,
         $add_pick1_address,$add_pick1_town,$add_pick1_state,
         $add_pick1_postal,$add_pick1_lat,$add_pick1_long,
         $add_pick2_address,$add_pick2_town,$add_pick2_state,
         $add_pick2_postal,$add_pick2_lat,$add_pick2_long,
         $add_pick3_address,$add_pick3_town,$add_pick3_state,
         $add_pick3_postal,$add_pick3_lat,$add_pick3_long,
         $add_pick4_address,$add_pick4_town,$add_pick4_state,
         $add_pick4_postal,$add_pick4_lat,$add_pick4_long,
         $add_pick5_address,$add_pick5_town,$add_pick5_state,
         $add_pick5_postal,$add_pick5_lat,$add_pick5_long,
         $add_deliver1_address,$add_deliver1_town,$add_deliver1_state,
         $add_deliver1_postal,$add_deliver1_lat,$add_deliver1_long,
         $add_deliver2_address,$add_deliver2_town,$add_deliver2_state,
         $add_deliver2_postal,$add_deliver2_lat,$add_deliver2_long,
         $add_deliver3_address,$add_deliver3_town,$add_deliver3_state,
         $add_deliver3_postal,$add_deliver3_lat,$add_deliver3_long,
         $add_deliver4_address,$add_deliver4_town,$add_deliver4_state,
         $add_deliver4_postal,$add_deliver4_lat,$add_deliver4_long,
         $add_deliver5_address,$add_deliver5_town,$add_deliver5_state,
         $add_deliver5_postal,$add_deliver5_lat,$add_deliver5_long,
         $load_lift_gate,$load_expedite,$load_drop_trailer,
         $load_truck_load,$weight_class,$commodity,$hazmat,
         $weight,$weight_uom,$cube,$cube_uom,
         $equipment,$equip_temp,$temp_uom
         $total_mileage,$mileage_uom,
         $pick_confirm_date,$pick_confirm_time,$deliver_confirm_date,$deliver_confirm_time,
         $carrier_com_name,$carrier_com_city,$carrier_com_state,
         $carrier_contact_name,$carrier_contact_phone,
         $carrier_contact_email,
         $load_rate_value,$load_rate_currency
);
Regions Table

Region Code
ca-AB
ca-BC
ca-MB
ca-NB
ca-NL
ca-NT
ca-NS
ca-NU
ca-ON
ca-PE
ca-QC
ca-SK
ca-YT
us-AL
us-AK
us-AZ
us-AR
us-CA
us-CO
us-CT
us-DE
us-DC
us-FL
us-GA
us-HI
us-ID
us-IL
us-IN
us-IA
us-KS
us-KY
us-LA
us-ME
us-MD
us-MA
us-MI
us-MN
us-MS
us-MO
us-MT
us-NE
us-NV
us-NH
us-NJ
us-NM
us-NY
us-NC
us-ND
us-OH
us-OK
us-OR
us-PA
us-RI
us-SC
us-SD
us-TN
us-TX
us-UT
us-VT
us-VA
us-WA
us-WV
us-WI
us-WY
Equipment Table

Equip Name
VAN
HEATED VAN
VENTILATED VAN
REEFER
VAN or REEFER
FLAT
FLAT WITH TARP
FLAT 4ft TARP
FLAT 6ft TARP
FLAT 8ft TARP
STEP DECK
DOUBLE DROP
RGN
STRETCH
CURTAIN VAN
OVERSIZE
HEAVY HAUL
HOPPER
DUMP
DRY BULK
PNUEMATIC
LIVESTOCK
AUTO CARRIER
TANK - NON-FOOD
TANK - FOOD
LOGGING
OTHER SEE COMMENTS
REEFER - Dual-Temp
REEFER - Multi-Temp
FLAT - Super B
INTERMODAL 20'
INTERMODAL 40'
INTERMODAL 53'
VAN WITH LIFTGATE
Weights Table

Weight Code
lbs
kg
mt
tn
other
Cube Table

Cube Name
Pallets/Skids
Stackable Skids
Feet
Meters
Gallons
Cartons
% of Trailer
Drums
Barrels
Other See Comments
Feet (Floor Loaded)
Spools
Board Feet
Weight Class Table

Class Name
Class 55
Class 400
Class 300
Class 250
Class 200
Class 175
Class 150
Class 125
Class 110
Class 100
Class 92.5
Class 85
Class 77.5
Class 70
Class 65
Class 60
Class 500
Hazmat Table

Hazmat Name
1 Explosives
1.1 Explosives
1.2 Explosives
1.3 Explosives
1.4 Explosives
1.5 Blasting Agents
1.6 Explosives
2.1 Flammable Gases
2.2 Non-Flammable Non-Toxic Gases
2.2 Oxygen
2.3 Toxic Gases
3 Flammable Liquid
3 Gasoline
3 Combustible Liquid
3 Fuel Oil
4.1 Flammable Solids
4.2 Combustible Materials
4.3 Dangerous When Wet
5.1 Oxidizing Substances
5.2 Organic Peroxides
6.1 Toxic Substances
6.1 Inhalation Hazard
6.2 Infectious Substances
7 Radioactive Materials
8 Corrosive Substances
9 Miscellaneous Hazmat
Dangerous