Web Services

Web Services / XML Feed

Your business is fast-paced and requires instant access to information via the web in order to flow seamlessly and ensure customer satisfaction. The solution: Averitt Web Services.

Averitt Web Services can provide XML feeds via WSDL directly to your website or any of your internal systems. Feeds available via Averitt Web Services at this time include:

  • Real-time rate quotes specific to your account
  • Real-time shipment status by PRO
  • Transit times throughout the U.S. and Canada
  • Retrieval of shipment-related images and documents
Download Request Parameter Requirements

Technical Schemas for Unsecured Web Services

  • Transit Time Calculator

    • Location: http://webservices.averittexpress.com/TransitTimeService
    • View: WSDL | schema
    • Authentication required? No
    • To call this web service, see the sample Java code below:
      
      TransitTimeServiceLocator locator = new TransitTimeServiceLocator();
      TransitTime transitPort = locator.getTransitTimePort();
      
      // Populate the Request Object and pass
      GetTransitTimeResponseReturn transitTimeResponse = transitPort.getTransitTime(request);
      
      
  • Public LTL Tracking

    • Location: http://webservices.averittexpress.com/LTLPublicTrackingService
    • View: WSDL | schema
    • Authentication required? No
    • To call this web service, see the sample Java code below:
      
      LTLPublicTrackingServiceLocator loc = new LTLPublicTrackingServiceLocator();
      LTLPublicTracking service = loc.getLTLPublicTrackingPort();
      
      // Populate the Request Object and pass
      GetTrackingStatusResponseReturn resp = service.getTrackingStatus(req);
      
      

Technical Schemas for Secured Web Services

The web services listed below this point are secured and require authentication. Security is provided via Secure Sockets Layer (SSL), so businesses and consumers can rest assured that their credentials will remain secure.

With our secured web services, the username and encrypted password are sent in the SOAP header of a request SOAP message. Following is a sample SOAP header. The "xmlns:sen" portion of the header (underlined below) will vary with the service invoked. The body of the request may vary also depending on the request.

If your client invokes SSL services, you may receive the message "unable to find valid certification path to requested target."

Sample SOAP header


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sen="https://webservices.averittexpress.com/SendWebImageService">
    <soapenv:Header xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <ns:authnHeader soapenv:mustUnderstand="0" xmlns:ns="https://webservices.averittexpress.com/authn">
            <Username>xxxxxxxx</Username>
            <Password>xxxxxxxx</Password>
        </ns:authnHeader>
    </soapenv:Header>
</soapenv:Envelope>

  • Encypted Password

    • Location: https://webservices.averittexpress.com/EncryptedPasswordService
    • View: WSDL | schema
    • Authentication required? No.
      
      URL wsdlLocation = new URL("C:/ .../WEB-INF/wsdl/EncryptedPasswordService.wsdl");
      QName qName =new QName("https://webservices.averittexpress.com/EncryptedPasswordService");
      
      EncryptedPasswordService service = new EncryptedPasswordService(wsdlLocation,qName);
      EncryptedPassword port = service.getEncryptedPasswordPort();
      String encryptedPwd = port.getEncryptedPwd("username", "password");
      
  • Private LTL Tracking

    • Location: https://webservices.averittexpress.com/LTLPrivateTrackingService
    • View: WSDL | schema
    • Authentication required? Yes. Please see instructions above for including SOAP header.
    • To call this web service, see the sample Java code below:
      
      LTLPrivateTrackingServiceLocator loc = new LTLPrivateTrackingServiceLocator();
      LTLPrivateTracking service = loc.getLTLPrivateTrackingPort();
      
      //Populate the Request Object and pass
      GetPrivateTrackingStatusResponseReturn resp = service.getPrivateTrackingStatus(req);
      
      
  • LTL Pickup Request Service


  • LTL Rate Quote Web Service

    • Location: https://webservices.averittexpress.com/LTLRateQuoteService
    • View: WSDL | schema
    • Authentication required? Yes. Please see instructions above for including SOAP header.
    • To call this web service, see the sample Java code below:
      
      LTLRateQuoteService_ServiceLocator loc = new LTLRateQuoteService_ServiceLocator();
      LTLRateQuoteService_PortType port = loc.getLTLRateQuoteServicePort();
      
      // Populate the Request Object and pass
      GetLTLRateResponseReturn resp = port.getLTLRate(req);
      
      
  • Send WebImage Web Service

    • Location: https://webservices.averittexpress.com/SendWebImageService
    • View: WSDL | schema
    • Authentication required? Yes. Please see instructions above for including SOAP header.
    • Web service options:
      • getAvailableImages:
        This option requires one parameter - "pro number" - and returns "document type"
      • getDocument:
        This option requires two parameters, "pro number" and "document type" and will return a TIFF byte array that can be converted into a jpg, jpeg, pdf, bmp, or any available image format.
      • getImage:
        This option requires two parameters, "pro number" and "document type" and will return response object, which contains either error message or TIFF byte array that can be converted into a jpg, jpeg, pdf, bmp, or any available image format.
    • To call this web service, see the sample Java code below:

      getAvailableImages:

      
      SendWebImageService serv = new SendWebImageService();
      SendWebImage sendImg = serv.getSendWebImagePort();
      
      // send pro number
      String resp = sendImg.getAvailableImages("xxxxxxxxxx");
      
      

      getDocument:

      
      SendWebImageService serv = new SendWebImageService();
      SendWebImage sendImg = serv.getSendWebImagePort();
      
      // send pro number and document type
      byte[] resp = sendImg.getDocument("xxxxxxxxxx","xxx");
      

      getImage:

      SendWebImageService serv = new SendWebImageService();  
      SendWebImage sendImg = serv.getSendWebImagePort();

      // Send pro number and document type, returns response object with error/image data
      GetImageResponse imageResponse = sendImg.getImage("xxxxxxxxxx","xxx");
      // Look for error response (e.g. "Invalid PRO Number", "UserName or encrypted Password are incorrect")
      String errorMsg = imageResponse.getError();
      if (errorMsg == null || errorMsg.trim().length == 0) {
      System.out.println("Error: " + errorMsg);
      } else {
      byte[] image = imageResponse.getImage();
      System.out.println("Success, image.size: " + image.size);
      }
  • Technical Schemas for .NET

    Sample .NET schema:

    
            HttpWebRequest request = CreateWebRequest();
    
            XmlDocument soapEnvelopeXml = new XmlDocument();
            soapEnvelopeXml.LoadXml(CreateXMLRequestGetDocument(ProNumber.ToString().PadLeft(10, '0'), imageType));
    
            HttpWebResponse response = (HttpWebResponse)request.GetResponse()
    
            private static HttpWebRequest CreateWebRequest()
            {
                HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(@"https://webservices.averittexpress.com/SendWebImageService");
                webRequest.Headers.Add(@"SOAP:Action");
                webRequest.ContentType = "text/xml;charset=\"utf-8\"";
                webRequest.Accept = "text/xml";
                webRequest.Proxy = null;
                webRequest.Method = "POST";
    
                return webRequest;
            }
    
            private string CreateXMLRequestGetAvailableImages(string ProNumber)
            {
                string XMLRequest = string.Empty;
    
                XMLRequest = @"<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:sen=""https://webservices.averittexpress.com/SendWebImageService"">
                    <soapenv:Header xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/""
                                    xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
                                    xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">
                        <ns:authnHeader soapenv:mustUnderstand=""0"" xmlns:ns=""https://webservices.averittexpress.com/authn"">
                            <Username></Username>
                            <Password></Password>
                        </ns:authnHeader>
                    </soapenv:Header>
                    <soapenv:Body>
                        <sen:getAvailableImages>
                            <!--Optional:-->
                            <arg0>" + ProNumber + @"</arg0>
                        </sen:getAvailableImages>
                    </soapenv:Body>
                    <soapenv:Body>
                        <sen:getAvailableImages>
                            <!--Optional:-->
                            <arg0>" + ProNumber + @"</arg0>
                        </sen:getAvailableImages>
                    </soapenv:Body>
                    <soapenv:Body>
                        <sen:getAvailableImages>
                            <!--Optional:-->
                            <arg0>" + ProNumber + @"</arg0>
                        </sen:getAvailableImages>
                    </soapenv:Body>
                </soapenv:Envelope>";
    
                return XMLRequest;
            }
    
            

Unsecured PHP call for Transit Times


<?php

class AVTTransitTimeRequest {
    public $OriginCity;       // string
    public $OriginState;      // string
    public $OriginZip;        // string
    public $DestinationCity;  // string
    public $DestinationState; // string
    public $DestinationZip;   // string
}

class AVTTransitTimeResponse {
    public $OrigCity;          // string
    public $OrigState;         // string
    public $OrigZip;           // string
    public $origServiceCenter; // string
    public $DestCity;          // string
    public $DestState;         // string
    public $DestZip;           // string
    public $destServiceCenter; // string
    public $EstimatedDays;     // string
    public $Comment;           // string
    public $Error;             // string
}

class getTransitTime {
    public $arg0; // arg0
}

class arg0 {
    public $OriginCity;       // string
    public $OriginState;      // string
    public $OriginZip;        // string
    public $DestinationCity;  // string
    public $DestinationState; // string
    public $DestinationZip;   // string
}

class getTransitTimeResponse {
    public $response; // return
}

class response {
    public $OrigCity;          // string
    public $OrigState;         // string
    public $OrigZip;           // string
    public $origServiceCenter; // string
    public $DestCity;          // string
    public $DestState;         // string
    public $DestZip;           // string
    public $destServiceCenter; // string
    public $EstimatedDays;     // string
    public $Comment;           // string
    public $Error;             // string
}

/**
*   TransitTimeService class
*
*
*
* @author {author}
* @copyright {copyright}
* @package {package}
*/

class TransitTimeService extends SoapClient {

    private static $classmap = array(
        'AVTTransitTimeRequest' => 'AVTTransitTimeRequest',
        'AVTTransitTimeResponse' => 'AVTTransitTimeResponse',
        'getTransitTime' => 'getTransitTime',
        'arg0' => 'arg0',
        'getTransitTimeResponse' => 'getTransitTimeResponse',
        'response' => 'response'
    );

    public function TransitTimeService($wsdl = "TransitTimeService.wsdl", $options =   array()) {
        foreach(self::$classmap as $key => $value) {
            if(!isset($options['classmap'][$key])) {
                $options['classmap'][$key] = $value;
            }
        }
        parent::__construct($wsdl, $options);
    }

    /**
    *
    *
    * @param getTransitTime $parameters
    * @return   getTransitTimeResponse
    */
    public function getTransitTime(getTransitTime $parameters) {
        return $this->__soapCall('getTransitTime', array($parameters), array(
            'uri' => 'http://webservices.averittexpress.com/TransitTimeService',
            'soapaction' => ''
            )
        );
    }
}

Need help?

Contact our Customer Technology Support team at 877-281-7131 or by email.