Oak Harbor Web Services

Request Bill Of Lading documentation and example
Explanation
The requestBillOfLading() web service provides you with the ability to request the creation of Bill Of Lading information and receive an associated reference ID for the Bill Of Lading.
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.  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 get data from our web service.
$soapClient = new SoapClient("http://www.oakh.com/services/soap?wsdl"); $BolRequest = array( 'account' => 'The account email associated with your key', 'key' => 'The key provided to you by Oak Harbor Freight', 'RequesterType' => 'S', 'PaymentType' => 'P', 'BolDate' => '02/01/14', 'RateQuoteNumber' => null, 'ContactName' => 'John Galt', 'ContactEmail' => 'jgalt@example.com', 'ContactPhone' => '5155551212', 'ContactPhoneExt' => null, 'Contacts' => array( 'Shipper' => array( 'ContactName' => 'Shipping', 'ContactEmail' => 'shipping@example.com', 'CustomerNumber' => '0290336', 'Company' => 'Acme Tools', 'Address1' => '123 main street', 'Address2' => null, 'City' => 'Anytown', 'State' => 'AZ', 'Zip' => '85260', 'Zip4' => null, 'Phone' => 5155551212, 'Extension' => null, ), 'Consignee' => array( 'ContactName' => 'Receiving', 'ContactEmail' => 'dock12@example.com', 'CustomerNumber' => null, 'Company' => 'Ace Mining co', 'Address1' => '123 main street', 'Address2' => null, 'City' => 'Portland', 'State' => 'OR', 'Zip' => '97080', 'Zip4' => null, 'Phone' => 5155551212, 'Extension' => null, ), 'BillTo' => array( 'ContactName' => 'Accounts Payable', 'ContactEmail' => 'accounting@example.com', 'CustomerNumber' => null, 'Company' => 'Acme Tools', 'Address1' => '123 main street', 'Address2' => null, 'City' => 'Anytown', 'State' => 'AZ', 'Zip' => '85260', 'Zip4' => null, 'Phone' => 5155551212, 'Extension' => null, ), ), 'BolNumber' => null, 'ProNumber' => null, 'ShipperNumber' => null, 'PoNumber' => null, 'BolDetailLine' => array( array( 'Pieces' => 1, 'HandlingUnits' => 1, 'HandlingUnitType' => 'BD', 'Hazmat' => null, 'GrossWeight' => '150', 'Class' => '50', 'Nmfc' => null, 'Description' => 'Bundle of Joy', ), array( 'Pieces' => 1, 'HandlingUnits' => null, 'HandlingUnitType' => 'PT', 'Hazmat' => null, 'GrossWeight' => '250', 'Class' => '50', 'Nmfc' => null, 'Description' => 'Pallet of fun!', ), ), 'HazmatPhone' => null, 'DeclaredValue' => null, 'DeclaredValuePer' => null, 'FullCapacityTrailer' => null, 'SpecialInstructions' => null, 'CodAmount' => null, 'CodPayBy' => null, 'CodPaymentType' => null, 'CodName' => null, 'CodAddress' => null, 'CodCity' => null, 'CodState' => null, 'CodZip' => null, 'GuaranteedStandardService' => null, 'GuaranteedStandardServiceBy' => null, 'GuaranteedHourService' => null, 'GuaranteedHourServiceBy' => null, 'DeliveryWindowStart' => null, 'DeliveryWindowEnd' => null, 'AdditionalServices' => null, ); $result = $soapClient->requestBillOfLading($BolRequest);
As the code example shows, you will call the requestBillOfLading(BolRequest) method with the input parameter being a structure conforming to the BolRequest definition from the WSDL and containing all of the pertinent information regarding your request. The response data is nested on different levels as follows: BolId ContactName ContactPhone ContactEmail RequesterType PaymentType BolDate Contacts Shipper ContactName ContactEmail CustomerNumber Company Address1 Address2 City State Zip Zip4 Phone Extension Consignee ContactName ContactEmail CustomerNumber Company Address1 Address2 City State Zip Zip4 Phone Extension BillTo ContactName ContactEmail CustomerNumber Company Address1 Address2 City State Zip Zip4 Phone Extension BolNumber ProNumber ShipperNumber PoNumber BolDetailLine Pieces HandlingUnits HandlingUnitType Hazmat GrossWeight Class Nmfc Description BolDetailLine Pieces HandlingUnits HandlingUnitType Hazmat GrossWeight Class Nmfc Description HazmatPhone DeclaredValue DeclaredValuePer FullCapacityTrailer SpecialInstructions CodAmount CodPayBy CodPaymentType CodName CodAddress CodCity CodState CodZip GuaranteedStandardService GuaranteedStandardServiceBy GuaranteedHourService GuaranteedHourServiceBy DeliveryWindowStart DeliveryWindowEnd AdditionalServices AdditionalServices AdditionalServices The Requester type value will be one of the following values: S = Shipper C = Consignee B = BillTo The Payment type value will be one of the following values: P = Prepaid C = Collect The HandlingUnitType value will be one of the following values: PT=Pallets BG=Bags BL=Bales BX=Boxes BD=Bundles CT=Cartons CS=Cases CR=Crates DR=Drums LS=Loose PL=Pails PC=Pieces RE=Reels RL=Rolls SK=Skids TK=Tanks TB=Tote Bins 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 The COD PayBy will be one of the following values: S=Shipper C=Consignee The COD Payment Type will be one of the following values: 0=Company Check OK 1=Cash Or Certified Funds Codes for Additional Services are as follows: AIRDE=Airport Delivery AIRPU=Airport Pickup APPT=Appointment 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 LONG15=Long Freight - Exceeds 15' LONG=Long Freight - Exceeds 27' NOTIFY=Notification Prior to Delivery RES=Residential Delivery RESLG=Residential Liftgate SADE=Saturday Delivery SEG=Sort & Segregate Charges Below is an example of a well-formed Bill Of Lading 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#requestBillOfLading
Content-Length: 3226

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>
	<SOAP-ENV:Body>
		<ns1:requestBillOfLading>
			<BillOfLadingRequest>
				<account>##YOUR ACCOUNT EMAIL##</account>
				<key>## YOUR ACCOUNT KEY ##</key>
				<ContactName>John Galt</ContactName
				><ContactPhone>5155551212</ContactPhone>
				<ContactEmail>jgalt@example.com</ContactEmail>
				<RequesterType>S</RequesterType>
				<PaymentType>P</PaymentType>
				<BolDate>02/01/14</BolDate>
				<Contacts>
					<Shipper>
						<ContactName>Shipping</ContactName>
						<ContactEmail>shipping@example.com</ContactEmail>
						<CustomerNumber>0290336</CustomerNumber>
						<Company>Acme Tools</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Anytown</City>
						<State>AZ</State>
						<Zip>85260</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</Shipper>
					<Consignee>
						<ContactName>Receiving</ContactName>
						<ContactEmail>dock12@example.com</ContactEmail>
						<CustomerNumber></CustomerNumber>
						<Company>Ace Mining Co.</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Portland</City>
						<State>OR</State>
						<Zip>97080</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</Consignee>
					<BillTo>
						<ContactName>Accounts Payable</ContactName>
						<ContactEmail>accounting@example.com</ContactEmail>
						<CustomerNumber></CustomerNumber>
						<Company>Acme Tools</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Anytown</City>
						<State>AZ</State>
						<Zip>85260</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</BillTo>
				</Contacts>
				<BolNumber></BolNumber>
				<ProNumber></ProNumber>
				<ShipperNumber></ShipperNumber>
				<PoNumber></PoNumber>
				<BolDetailLine>
					<Pieces>1</Pieces>
					<HandlingUnits></HandlingUnits
					><HandlingUnitType>BD</HandlingUnitType>
					<Hazmat></Hazmat>
					<GrossWeight>150</GrossWeight>
					<Class>50</Class>
					<Nmfc></Nmfc>
					<Description>Bundle of Joy</Description>
				</BolDetailLine>
				<BolDetailLine>
					<Pieces>1</Pieces>
					<HandlingUnits></HandlingUnits>
					<HandlingUnitType>PT</HandlingUnitType>
					<Hazmat></Hazmat>
					<GrossWeight>250</GrossWeight>
					<Class>50</Class>
					<Nmfc></Nmfc>
					<Description>Pallet of fun!</Description>
				</BolDetailLine>
				<HazmatPhone></HazmatPhone>
				<DeclaredValue></DeclaredValue>
				<DeclaredValuePer></DeclaredValuePer>
				<FullCapacityTrailer></FullCapacityTrailer>
				<SpecialInstructions></SpecialInstructions>
				<CodAmount></CodAmount>
				<CodPayBy></CodPayBy>
				<CodPaymentType></CodPaymentType>
				<CodName></CodName>
				<CodAddress></CodAddress>
				<CodCity></CodCity>
				<CodState></CodState>
				<CodZip></CodZip>
				<GuaranteedStandardService></GuaranteedStandardService>
				<GuaranteedStandardServiceBy></GuaranteedStandardServiceBy>
				<GuaranteedHourService></GuaranteedHourService>
				<GuaranteedHourServiceBy></GuaranteedHourServiceBy>
				<DeliveryWindowStart></DeliveryWindowStart>
				<DeliveryWindowEnd></DeliveryWindowEnd>
			</BillOfLadingRequest>
		</ns1:requestBillOfLading>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response Header
HTTP/1.1 200 OK
Date: Sun, 21 Jul 2013 19:19:08 GMT
Server: Apache
Content-Length: 2889
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>
	<SOAP-ENV:Body>
		<ns1:requestBillOfLadingResponse>
			<requestBillOfLadingResponse>
				<BolId>29</BolId>
				<ContactName>John Galt</ContactName>
				<ContactPhone>5155551212</ContactPhone>
				<ContactEmail>jgalt@example.com</ContactEmail>
				<RequesterType>S</RequesterType>
				<PaymentType>P</PaymentType>
				<BolDate>02/01/14</BolDate>
				<Contacts>
					<Shipper>
						<ContactName>Shipping</ContactName>
						<ContactEmail>shipping@example.com</ContactEmail>
						<CustomerNumber>0290336</CustomerNumber>
						<Company>Acme Tools</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Anytown</City>
						<State>AZ</State>
						<Zip>85260</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</Shipper>
					<Consignee>
						<ContactName>Receiving</ContactName>
						<ContactEmail>dock12@example.com</ContactEmail>
						<CustomerNumber></CustomerNumber>
						<Company>Ace Mining Co.</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Portland</City>
						<State>OR</State>
						<Zip>97080</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</Consignee>
					<BillTo>
						<ContactName>Accounts Payable</ContactName>
						<ContactEmail>accounting@example.com</ContactEmail>
						<CustomerNumber></CustomerNumber>
						<Company>Acme Tools</Company>
						<Address1>123 main street</Address1>
						<Address2></Address2>
						<City>Anytown</City>
						<State>AZ</State>
						<Zip>85260</Zip>
						<Zip4></Zip4>
						<Phone>5155379601</Phone>
						<Extension></Extension>
					</BillTo>
				</Contacts>
				<BolNumber></BolNumber>
				<ProNumber></ProNumber>
				<ShipperNumber></ShipperNumber>
				<PoNumber></PoNumber>
				<BolDetailLine>
					<Pieces>1</Pieces>
					<HandlingUnits></HandlingUnits>
					<HandlingUnitType>BD</HandlingUnitType>
					<Hazmat></Hazmat>
					<GrossWeight>150</GrossWeight>
					<Class>50</Class>
					<Nmfc></Nmfc>
					<Description>Bundle of Joy</Description>
				</BolDetailLine>
				<BolDetailLine>
					<Pieces>1</Pieces>
					<HandlingUnits></HandlingUnits>
					<HandlingUnitType>PT</HandlingUnitType>
					<Hazmat></Hazmat>
					<GrossWeight>250</GrossWeight>
					<Class>50</Class>
					<Nmfc></Nmfc>
					<Description>Pallet of fun!</Description>
				</BolDetailLine>
				<HazmatPhone></HazmatPhone>
				<DeclaredValue></DeclaredValue>
				<DeclaredValuePer></DeclaredValuePer>
				<FullCapacityTrailer></FullCapacityTrailer>
				<SpecialInstructions></SpecialInstructions>
				<CodAmount></CodAmount>
				<CodPayBy></CodPayBy>
				<CodPaymentType></CodPaymentType>
				<CodName></CodName>
				<CodAddress></CodAddress>
				<CodCity></CodCity>
				<CodState></CodState>
				<CodZip></CodZip>
				<GuaranteedStandardService></GuaranteedStandardService>
				<GuaranteedStandardServiceBy></GuaranteedStandardServiceBy>
				<GuaranteedHourService></GuaranteedHourService>
				<GuaranteedHourServiceBy></GuaranteedHourServiceBy>
				<DeliveryWindowStart></DeliveryWindowStart>
				<DeliveryWindowEnd></DeliveryWindowEnd>
				<AdditionalServices></AdditionalServices>
			</requestBillOfLadingResponse>
		</ns1:requestBillOfLadingResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>