Oak Harbor Web Services

Request Rate Quote documentation and example
The requestRateQuote() web service provides you with the ability to request a rate quote and specify pickup location, and freight details like weight or pieces, class types, and a delivery point.
You can use the WSDL located at HTTP://www.oakh.com/services/soap?wsdl as the basis for programming or configuring your own SOAP client.

Below is a PHP example of a SOAP client configuration that can access this web service.
The code example shows the requisite values for requesting a rate quote that will:
	- pick up in Portland, OR 97203
	- deliver in Little Rock, AR 72202
	- have two ShipmentDetails of:
		class 50 with a weight of 350 pounds
		class 175 with a weight of 1025 pounds
		with a total piece count of 25
	- have Enhanced Services of:
		Notification Prior to Delivery
		Saturday Delivery

Requestor Types are as follows:
	B=3rd Party Bill-To

Payment Types are as follows:

Allowed codes for the type of Class are as follows:
	50, 55 ,60 ,65 ,70 ,77.5 ,85 ,92.5 ,100 ,110 ,125 ,150 ,175 ,200 ,250 ,300 ,400 ,500

Codes for Enhanced Services are as follows:
	AIRDE=Airport Delivery
	AIRPU=Airport Pickup
	COD=COD 	(amount is also required)
	EXCVAL=Excess Value (amount is also required)
	GH=Guaranteed Hour Specific 	(if GH is specified, GS can not be specified)
	GS=Guaranteed Standard 			(if GS is specified, GH can not be specified)
	HAZMAT=Hazardous Materials Fee
	INSIDE=Inside Delivery
	INSPU=Inside Pickup
	LIFTDC=Liftgate Delivery Collect (if LIFTDC is specified, LIFTDP can not be specified)
	LIFTDP=Liftgate Delivery Prepaid (if LIFTDP is specified, LIFTDC can not be specified)
	LIFTPP=Liftgate Pickup Prepaid
	LADE=Limited Access
	LONG8=Long Freight - Exceeds 8'
	LONG12=Long Freight - Exceeds 12'
	LONG16=Long Freight - Exceeds 16'
	LONG20=Long Freight - Exceeds 20'
	NOTIFY=Notification Prior to Delivery
	RES=Residential Delivery
	RESLG=Residential Liftgate
	SADE=Saturday Delivery
	SEG=Sort & Segregate Charges
	PROT=Protect from Freeze

For SingleShipment:
	- This is a boolean value.  0=not a single shipment, 1=single shipment

For the Origin and Destination:
	- If you are not an OAKH customer or are an OAKH customer but not using the account/key parameters:
		You must specify the City, State and Zip.
	- If you are an OAKH customer and are using the account/key parameters:
		You can use the 'Code' parameter rather than City/State,Zip.
		(Using the Code parameter automatically applies rate discounts ,if any, for that customer location)
	- If you use a location Code, you can not specify City/State/Zip.  Similarly, if you use City/State/Zip, you can not specify a Code.

For ItemDetails:
	- You can specify up to five classes
	- Both Class and Weight must be present for each Item Detail line
	- You can optionally specify a total number of pieces (in this context total pieces means total pallets)

For Enhanced Services:
	- COD and Excess Value service types require an amount also be specified
	- If Guaranteed Hour Specific is specified, Guaranteed Standard can not alos be specified
	- If Guaranteed Standard is specified, Guaranteed Hour Specific can not also be specified

This is provided as an example only and only intended to guide you on how you may want to go about creating your own client to request a pickup using web service.
$soapClient = new SoapClient("http://www.oakh.com/services/soap?wsdl"); $requestRateQuoteData = array( 'account' => 'The account email associated with your key', 'key' => 'The key provided to you by Oak Harbor Freight', 'CompanyName'=>'Ace Widgets', 'ContactName'=>'John Doe', 'ContactPhone'=>5155551212, 'ContactEmail'=>'someone@domain.com', 'RequestorType'=>'S', 'PaymentType'=>'P', 'ShipmentDate'=>'07/04/2013', 'SingleShipment'=>'1', 'Origin'=>array( 'Code'=>null, 'Zip'=>97203, 'City'=>'portland', 'State'=>'OR', ), 'Destination'=>array( 'Code'=>null, 'Zip'=>72202, 'City'=>'Little Rock', 'State'=>'AR', ), 'ItemDetails'=>array( array( 'class'=>50, 'weight'=>350,), array( 'class'=>175, 'weight'=>1025,), ), 'Pieces'=>1, 'EnhancedServices'=>array( array('service'=>'NOTIFY'), array('service'=>'SADE'), ), ); $result = $soapClient->requestRateQuote($requestRateQuoteData);
Following the example, you will call the requestRateQuote(RateQuoteRequest) method with the input parameter being a structure conforming to the RateQuoteRequest definition from the WSDL and containing all of the pertinent information regarding your request. If an invalid rate quote parameters are requested or if any other error exists, a standard Soap Fault will be returned indicating the nature of the error. If successful, the response data will be a RateQuoteRequestResult structure as indicated in the WSDL, or a Soap Fault if unsuccessful: RateQuoteNumber QuoteDate QuoteValidUntil Origin (type of GeneralLocationResult) City State Zip DirectOrIndirect ServicedBy (type of Servicer) Carrier Phone Destination (type of GeneralLocationResult) City State Zip DirectOrIndirect ServicedBy (type of Servicer) Carrier Phone ShipDate Terms BillTo (type of BillTo) CompanyName Address1 Address2 City State Zip SingleShipment ShipmentDetails (type of ShipmentDetail, can be multiple) class weight rate amount Pieces Charges (type of ChargesResult) GrossWeight FreightCharge FuelSurcharge Accessorials (type of Accessorial, can be multiple) code description amount Net Tariff Likely errors described in the SOAP FAULT may be among the following: Invalid key specified for account Invalid Requestor Type Bill-To is an invalid Requestor Type when not authenticated Invalid Payment Type Payment Type of Collect is required for 'Consignee' Requestor Payment Type of Prepaid is required for '3rd Party Bill-To Only' Requestor Shipment Date is not a valid date Shipment Date can not be in the past Single Shipment value must be boolean #TYPE#(Origin/Destination) must be specified Missing #TYPE#(Origin/Destination) Parts. Either Code or Location must be specified. #TYPE#(Origin/Destination) parts must be either Code or Location, but not both Not authorized to the #TYPE#(Origin/Destination) Code Invalid #TYPE#(Origin/Destination) State/Province Origin State/Province is excluded from rate requests Invalid #TYPE#(Origin/Destination) location. Could not find the City/State/Zip combination. Company and all Contact Information is required when account validation is not used. Item Details are Required Class and Weight are required for each Item Detail line Invalid Item Class Invalid Item Weight. Weight must be greater than zero Invalid Pieces Service is required for each Enhanced Service Line Invalid Enhanced Service Amount Required for COD Amount Required for Excess Value Amount only valid for COD or Excess Value Guaranteed Standard OR Guaranteed Hour Specific can be specified, but not both Liftgate delivery Prepaid OR Liftgate delivery Collect can be specified, but not both Below is an example of a well-formed request with a successful result.

Request Header
POST /services/soap HTTP/1.1
Host: www.oakh.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.8-ZS5.5.0
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.oakh.com/services/soap#requestRateQuote"
Content-Length: 1416

Request Data
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.oakh.com/services/soap?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
				<account>##YOUR ACCOUNT EMAIL##</account>
				<key>##YOUR ACCOUNT KEY##</key>
				<CompanyName>Ace Widgets</CompanyName>
				<ContactName>John Does</ContactName>
					<Code xsi:nil="true"/>
					<Code xsi:nil="true"/>
					<City>little rock</City>
					<amount xsi:nil="true"/>
					<amount xsi:nil="true"/>

Response Header
"HTTP/1.1 200 OK
Date: Sat, 08 Jun 2013 17:27:50 GMT
Server: Apache
Content-Length: 1671
Connection: close
Content-Type: text/xml

Response Data
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.oakh.com/services/soap?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
					<DirectOrIndirect>Direct Point</DirectOrIndirect>
					<ServicedBy xsi:nil="true"/>
					<City>LITTLE ROCK</City>
					<DirectOrIndirect>Partner Direct</DirectOrIndirect>
						<Carrier>Southeastern Freight Lines</Carrier>
						<description>NOTIFY CHARGES</description>
						<description>SATURDAY DELIVERY</description>