Transit Data (Carrier Connect)

Transit Data (Carrier Connect)

Status
Request Type
POST

TFM licenses Carrier Connect for our customers who use our TMS System, TargetTMS. Your access to Carrier Connect is restricted to those carriers you have in your program, as well as those you use outside of your program so long as they are configured in the TMS (contact your account manager or sales rep to have these added).

Using this API, you can determine information about a lane for a carrier, or set of carriers, as it is provided by SMC3 through Carrier Connect.

On this page:

Related:

Endpoint

 https://tms.targetfmi.com/index.php?p=api&r=xml&c=carrierConnect&d=transitData

Request Parameters

ParameterRequired

Available Options/Data Type

Description
/locationYesContainerContainer for lanes
/location/shipperYesContainerContainer for shipper
/location/shipper/countryYesUSA | CANShipper Country
/location/shipper/zipYesVarchar(6)Shipper Zip
/location/consigneeYesContainerContainer for Consignee
/location/consignee/countryYesUSA | CANConsignee Country
/location/consignee/zipYesVarchar(6)ConsigneeZip
/scacs/YesContact your Sales Rep or Account Manager for this list.A numerically indexed (non-associative) array of Standard Carrier Alpha Codes

Examples

Using an Array
<?php
// Transit Data Request
 $request = array(
    'location' => array(
        'shipper' => array(
            'country' => 'USA',
            'zip' => 15236,
        ),
        'consignee' => array(
            'country' => 'USA',
            'zip' => 15236,
        ),
    ),
    'scacs' => array(
        'HMES',
        'ODFL',
    ),
);
?>
Using stdClass()
 <?php
	$request = new stdClass();
    $request->location = new stdClass();
    $request->location->shipper = new stdClass();
    $request->location->shipper->country = 'USA';
    $request->location->shipper->zip = 15236;
    $request->location->consignee = new stdClass();
    $request->location->consignee->country = 'USA';
    $request->location->consignee->zip = 15236;
    $request->scacs = array(
        'HMES',
        'ODFL',
    );
?>

Response Parameters

Parameter Name

Description

/body/scacResponsesContainer
/body/scacResponses/daysEstimated Transit Time between points
/body/scacResponses/destinationServiceType

Whether the Destination is Direct D

or Indirect I.

/body/scacResponses/errorCodeCarrier Connect Error Code
/body/scacResponses/methodWill always be LTL (Less Than Truckload)
/body/scacResponses/originSerivceType

Whether the Origin is Direct D

or Indirect I.

/body/scacResponses/nameCarrier Name
/body/scacResponses/scacCarrier Scac

Heads Up

A lane is only considered Direct for a carrier when both /body/scacResponses/originSerivceType and /body/scacResponses/destinationSerivceType are set to D. If either elements are I or Indirect, the lane is considered Indirect.

Example

Example Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <body>
    <scacResponses>
      <days>1</days>
      <destinationServiceType>D</destinationServiceType>
      <errorCode>0</errorCode>
      <method>LTL</method>
      <originServiceType>D</originServiceType>
      <name>HOLLAND</name>
      <scac>HMES</scac>
    </scacResponses>
    <scacResponses>
      <days>1</days>
      <destinationServiceType>D</destinationServiceType>
      <errorCode>0</errorCode>
      <method>LTL</method>
      <originServiceType>D</originServiceType>
      <name>OLD DOMINION FREIGHT LINE</name>
      <scac>ODFL</scac>
    </scacResponses>
  </body>
  <message/>
  <notice/>
</response>

Full Example

Save Bill of Lading Requset Example
 <?php
	
	$resource = "https://tms.targetfmi.com/index.php";

	$user = "08481a69-9bd7-443e-91cd-478b6ae53490";
    $pass = "";

	$sepparator = "?";
	
	$rest = new restClient($resource, $user, $pass, $sepparator);
	
	$request = array(
        'location' => array(
            'shipper' => array(
                'country' => 'USA',
                'zip' => 15236,
            ),
            'consignee' => array(
                'country' => 'USA',
                'zip' => 15236,
            ),
        ),
        'scacs' => array(
            'HMES',
            'ODFL',
        ),
    );

	$res = $rest->post("p=api&r=xml&c=carrierConnect&m=transitData", $request);
?>