Shipment Tracking

Get Shipment Tracking
HTTP Method: GET
URL: /ShipmentTracing
Request Parameters
Name Type Cardinality Required Description
TraceNumbers string One or More Required Either a PRO number or any other number used to identify the shipment
TraceType string Zero or One Optional Type of Trace Number supplied.
Default Value: PRO.
Accepted values: PRO, BOL, Job, Manifest, PO, Sales, Account, CustomerOrder, CustomerPO, Lot, Order, and Reference.
Response Parameters
Name Type Cardinality Description
Shipments array Zero or One List of returned shipment and their info
Properties
Shipment object One or More Shipment Object
Properties
ShipmentNumber string One Pro Number for the shipment
ShortStatus string One Short status about the shipment
LongStatus string One Long status about the shipment
Pieces integer One The number of pieces in the shipment
Weight double One The weight of the shipment
EstimatedDelivery string The date when the shipment is estimated to be delivered
PickupDate object One Object with the date and the time the shipment was picked up at
Properties
Date string The date the shipment was picked up
Time string The time the shipment was picked up
AppointmentDate object Zero or One Object with the date and the time the shipment is scheduled to be delivered. Only applied to appointment freight.
Properties
Date string The appointment date
Time string The appointment time
DeliveryDate object Zero or One Object with the date and the time the shipment was delivered
Properties
Date string The date the shipment was delivered
Time string The time the shipment was delivered
BillTo object Zero or One The Bill To party for the shipment
Properties
Name string Name of the Bill To
Address object Address of the Bill To
Properties
Street string
City string
State string
ZipCode string
CountryCode string
Consignee object One The consignee for the shipment
Properties
Name string
Address object
Properties
Street string
City string
State string
ZipCode string
CountryCode string
Shipper object One The shipper for the shipment
Properties
Name string
Address object
Properties
Street string
City string
State string
ZipCode string
CountryCode string
StatusHistory array One List of status events of the shipment
Properties
Status object
Properties
Date string
Time string
Description string
StatusCode string
ReferenceNumbers array One List of reference numbers
Properties
ReferenceNumber object
Properties
Type string
Description string
Number string
Code integer One Return the status code of the call
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One Message with more info for what the code means
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/ShipmentTracing?TraceNumbers=I875682972&TraceType=PRO');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'ApiKey' => 'Your API Key'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
using CallAPI.DataContracts.ShipmentTracing.Response;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class ShipmentTracingSample
{
string apiKey = "Your API Key";

//GET
public GetShipmentTracingResponse GetShipmentTracing()
{
var response = new GetShipmentTracingResponse();

var traceNumbers = "I111111111";
var traceType = "PRO";

var url = string.Format("{baseurl}/ShipmentTracing?TraceNumbers={0}&TraceType={1}", traceNumbers, traceType);


using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("apiKey", apiKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var apiResponse = client.GetAsync(url).Result;
response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}
}
}
package Samples;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.ShipmentTracing.Response.GetShipmentTracingResponse;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;


public class ShipmentTracingSample {
String apiKey = "Your API Key";
ObjectMapper mapper = new ObjectMapper();

public GetShipmentTracingResponse GetShipmentTracing() throws Exception {
GetShipmentTracingResponse response = new GetShipmentTracingResponse();

String url = "{baseurl}/ShipmentTracing";

String traceNumbers ="I111111111";
String traceType = "PRO";

url += "?TraceNumbers=" + traceNumbers + "&TraceType=" + traceType;

HttpClient httpClient = HttpClientBuilder.create().build();
HttpGet httprequest = new HttpGet(url);
httprequest.setHeader("apiKey", apiKey);

HttpResponse httpResponse = httpClient.execute(httprequest);

BufferedReader in = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()));

String inputLine;
StringBuffer result = new StringBuffer();

while ((inputLine = in.readLine()) != null) {
result.append(inputLine);
}
in.close();

response = mapper.readValue(result.toString(), GetShipmentTracingResponse.class);

return response;
}
}