Skip to main content

Rate Quote Web Service

Overview

The Logistics Rating SOAP Web Service allows users to calculate freight charges and retrieve detailed rate breakdowns for shipments. It supports various accessorial options and provides precise cost estimations for logistics operations.


Endpoint

Production URL:
https://srvcs.xgsi.com/webservices/logistics/rating.asmx


Namespace and Prefix

The http://xgsi.com/ namespace is used in both the request and response for this service.

  • Prefix Usage: The prefix ns1 is optional in the request.
  • Behavior: If the request includes the ns1 prefix, the response will also include the prefix. Conversely, if the request does not include the prefix, the response will also omit it.
  • This ensures consistent namespace usage between the request and response.

Example with Prefix (ns1)

<ns1:ratingRequest xmlns:ns1="http://xgsi.com/">
<ns1:OriginZip>98296</ns1:OriginZip>
<ns1:DestinationZip>45103</ns1:DestinationZip>
</ns1:ratingRequest>

Example without Prefix

<ratingRequest xmlns="http://xgsi.com/">
<OriginZip>98296</OriginZip>
<DestinationZip>45103</DestinationZip>
</ratingRequest>

Request Structure

Fields

Field NameTypeRequiredDescription
UserIDStringYesUser ID for authentication.
UserPasswordStringYesPassword for authentication.
OriginZipStringYesOrigin ZIP code of the shipment.
DestinationZipStringYesDestination ZIP code of the shipment.
ItemsToRateArrayYesDetails of the items to be rated
AccessorialsObjectNoAdditional services or conditions for the shipment.

Sample Request

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xgsi.com/">
<SOAP-ENV:Body>
<ns1:GetRates>
<ns1:ratingRequest>
<ns1:Accessorials>
<ns1:CODAmount>0</ns1:CODAmount>
<ns1:DriverCollectFee>false</ns1:DriverCollectFee>
<ns1:Hazmat>false</ns1:Hazmat>
<ns1:InsideDelivery>true</ns1:InsideDelivery>
<ns1:Liftgate>false</ns1:Liftgate>
<ns1:NewConstruction>false</ns1:NewConstruction>
<ns1:PredeliveryCall>false</ns1:PredeliveryCall>
<ns1:ResidentialArea>false</ns1:ResidentialArea>
<ns1:SortAndSegregate>false</ns1:SortAndSegregate>
<ns1:TradeshowOrConventionCenter>false</ns1:TradeshowOrConventionCenter>
<ns1:WillCall>false</ns1:WillCall>
</ns1:Accessorials>
<ns1:ItemsToRate>
<ns1:RatingDetailRequest>
<ns1:Pieces>1</ns1:Pieces>
<ns1:ClassCode>65</ns1:ClassCode>
<ns1:Quantity>1</ns1:Quantity>
<ns1:Weight>600</ns1:Weight>
</ns1:RatingDetailRequest>
</ns1:ItemsToRate>
<ns1:UserID>*******</ns1:UserID>
<ns1:UserPassword>******</ns1:UserPassword>
<ns1:OriginZip>98296</ns1:OriginZip>
<ns1:DestinationZip>45103</ns1:DestinationZip>
</ns1:ratingRequest>
</ns1:GetRates>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response Structure

Fields

Field NameTypeDescription
RatedItemDetailsArrayDetails of the rated items
CustomerNameStringThe name of the customer associated with the request.
OriginCityStateStringOrigin location in city and state format.
DestinationCityStateStringDestination location in city and state format.
TotalAmountDecimalTotal calculated charges for the shipment.

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xgsi.com/">
<soap:Body>
<ns1:GetRatesResponse xmlns="http://xgsi.com/">
<ns1:GetRatesResult>
<ns1:RatedItemDetails>
<ns1:RatingDetailResult>
<ns1:Pieces>0001</ns1:Pieces>
<ns1:COD>L</ns1:COD>
<ns1:ClassCode>65</ns1:ClassCode>
<ns1:UnitOfMeasure>HW</ns1:UnitOfMeasure>
<ns1:Quantity>00001.00</ns1:Quantity>
<ns1:Weight>00600</ns1:Weight>
<ns1:Description>MISCELLANEOUS FREIGHT</ns1:Description>
<ns1:Rate>154.1100</ns1:Rate>
<ns1:Flat>924.66</ns1:Flat>
</ns1:RatingDetailResult>
<ns1:RatingDetailResult>
<ns1:Pieces>0000</ns1:Pieces>
<ns1:COD>ID</ns1:COD>
<ns1:ClassCode></ns1:ClassCode>
<ns1:UnitOfMeasure>SY</ns1:UnitOfMeasure>
<ns1:Quantity>00000.00</ns1:Quantity>
<ns1:Weight>00000</ns1:Weight>
<ns1:Description>INSIDE PICKUP OR DELIVERY</ns1:Description>
<ns1:Rate>000.0000</ns1:Rate>
<ns1:Flat>95.00</ns1:Flat>
</ns1:RatingDetailResult>
<ns1:RatingDetailResult>
<ns1:Pieces>0000</ns1:Pieces>
<ns1:COD>ZC</ns1:COD>
<ns1:ClassCode></ns1:ClassCode>
<ns1:UnitOfMeasure>HW</ns1:UnitOfMeasure>
<ns1:Quantity>00000.00</ns1:Quantity>
<ns1:Weight>00000</ns1:Weight>
<ns1:Description>50.00% XGSCWT02-20240805</ns1:Description>
<ns1:Rate>000.0000</ns1:Rate>
<ns1:Flat>-462.33</ns1:Flat>
</ns1:RatingDetailResult>
<ns1:RatingDetailResult>
<ns1:Pieces>0000</ns1:Pieces>
<ns1:COD></ns1:COD>
<ns1:ClassCode></ns1:ClassCode>
<ns1:UnitOfMeasure></ns1:UnitOfMeasure>
<ns1:Quantity>00000.00</ns1:Quantity>
<ns1:Weight>00000</ns1:Weight>
<ns1:Description>32.00 Percent Temp FSC</ns1:Description>
<ns1:Rate>000.0000</ns1:Rate>
<ns1:Flat>147.95</ns1:Flat>
</ns1:RatingDetailResult>
<ns1:RatingDetailResult>
<ns1:Pieces>0000</ns1:Pieces>
<ns1:COD></ns1:COD>
<ns1:ClassCode></ns1:ClassCode>
<ns1:UnitOfMeasure></ns1:UnitOfMeasure>
<ns1:Quantity>00000.00</ns1:Quantity>
<ns1:Weight>00000</ns1:Weight>
<ns1:Description>BASED ON 3.602 PER GALLON</ns1:Description>
<ns1:Rate>000.0000</ns1:Rate>
<ns1:Flat>00000000</ns1:Flat>
</ns1:RatingDetailResult>
</ns1:RatedItemDetails>
<ns1:CustomerMessage></ns1:CustomerMessage>
<ns1:CustomerName>WEB QUOTE</ns1:CustomerName>
<ns1:CustomerAddress>1637 SHALLOWFORD RD</ns1:CustomerAddress>
<ns1:CustomerCityState>CHATTANOOGA, TN</ns1:CustomerCityState>
<ns1:OriginCityState>SNOHOMISH, WA</ns1:OriginCityState>
<ns1:OriginMessage></ns1:OriginMessage>
<ns1:DestinationCityState>BATAVIA, OH</ns1:DestinationCityState>
<ns1:DestinationMessage></ns1:DestinationMessage>
<ns1:DistributingServiceCenterId>00000944</ns1:DistributingServiceCenterId>
<ns1:DistributingServiceCenterName>UNION, OH</ns1:DistributingServiceCenterName>
<ns1:FuelSurchargeMessage>BASED ON 3.602 PER GALLON</ns1:FuelSurchargeMessage>
<ns1:TotalAccessorials>00095.00</ns1:TotalAccessorials>
<ns1:TotalFreightCharge>00462.33</ns1:TotalFreightCharge>
<ns1:FuelSurchargePercent>032.00</ns1:FuelSurchargePercent>
<ns1:TotalFuelSurcharge>000147.95</ns1:TotalFuelSurcharge>
<ns1:TotalAmount>0000705.28</ns1:TotalAmount>
</ns1:GetRatesResult>
</ns1:GetRatesResponse>
</soap:Body>
</soap:Envelope>

How to Use the Web Service

HTTP Method and Endpoint

To use the Logistics Rating SOAP Web Service, send a POST request to the following URL:

POST https://srvcs.xgsi.com/webservices/logistics/rating.asmx

Headers

Set the Content-Type header to application/xml or text/xml:

Content-Type: application/xml

This ensures that the request body is correctly interpreted as XML.

Sample cURL Request

curl -X POST https://srvcs.xgsi.com/webservices/logistics/rating.asmx \
-H "Content-Type: application/xml" \
-d @request.xml

Ensure that the body of the request (@request.xml) contains the XML-formatted SOAP request as shown earlier.


Error Handling

Error Response Example

Below is an example of an error response when an invalid combination of accessorials is selected in the request.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<faultstring>
Inside Delivery and Residential Area cannot both be selected together
</faultstring>
</soap:Body>
</soap:Envelope>

Error Details

ElementDescription
faultstringContains the error message explaining the reason for the failure. Example: "Inside Delivery and Residential Area cannot both be selected together."

Common Errors and Resolutions

Error MessageCauseResolution
Inside Delivery and Residential Area cannot both be selected togetherBoth accessorials selected simultaneously.Select either "Inside Delivery" or "Residential Area," but not both.
ORGZIP / DESTZIP is not in correct format.ZIP code format is invalid or unsupported.Ensure the ZIP code matches the format required for the region.
Authentication FailedIncorrect UserID or UserPassword.Verify and correct the credentials in the request.
Missing Required FieldsEssential fields (e.g., OriginZip) missing.Check the request for completeness and include all required fields.

Error Handling Recommendations

  1. Validate inputs before sending the SOAP request to avoid common errors such as incompatible accessorials or missing fields.
  2. Use the faultstring element in the response to identify the issue and display it to the user or log it for debugging.
  3. If the issue persists, contact support with the request payload and the full error response.