<% strRequest = "<Create>" & _ "<UserID>Your User ID</UserID>" & _ "<Password>Your Password</Password>" & _ "<TestMode>Y</TestMode>" & _ "<ShipmentDate>2013-02-14</ShipmentDate>" & _ "<BillingTerms>Prepaid</BillingTerms>" & _ "<BLNumber></BLNumber>" & _ "<ShipperNumber></ShipperNumber>" & _ "<StoreNumber></StoreNumber>" & _ "<TrailerNumber></TrailerNumber>" & _ "<PONumber></PONumber>" & _ "<DepartmentNumber></DepartmentNumber>" & _ "<QuoteNumber>0</QuoteNumber>" & _ "<Email></Email>" & _ "<PrintRates>N</PrintRates>" & _ "<Customs>N</Customs>" & _ "<GuaranteedDelivery></GuaranteedDelivery>" & _ "<EmergencyPhone>0</EmergencyPhone>" & _ "<SpecialInstructions></SpecialInstructions>" & _ "<VICS>N</VICS>" & _ "<Shipper>" & _ "<AccountNumber>0123456</AccountNumber>" ' Optional Shipper Location Data, if you do not ' specify these properties then the location data ' will be use from the Account Number. strRequest = strRequest & _ "<ContactName>TESTING NAME</ContactName>" & _ "<Address1>TESTING STREET</Address1>" & _ "<Address2></Address2>" & _ "<City>LOS ANGELES</City>" & _ "<State>CA</State>>" & _ "<Zipcode>90001</Zipcode>" & _ "<Zipcode4></Zipcode4>" & _ "</Shipper>" & _ "<Consignee>" & _ "<AccountNumber></AccountNumber>" & _ "<ContactName>TESTING NAME</ContactName>" & _ "<Address1>TESTING STREET</Address1>" & _ "<Address2></Address2>" & _ "<City>DALLAS</City>" & _ "<State>TX</State>>" & _ "<Zipcode>75201</Zipcode>" & _ "<Zipcode4></Zipcode4>" & _ "</Consignee>" & _ "<COD>" & _ "<CompanyCheck></CompanyCheck>" & _ "<BillingTerms></BillingTerms>" & _ "<Amount>0</Amount>" & _ "</COD>" & _ "<Details>" & _ "<DetailItem>" & _ "<Class>50</Class>" & _ "<Package>SK</Package>" & _ "<Pieces>1</Pieces>" & _ "<Weight>100</Weight>" & _ "<FoodItem>N</FoodItem>" & _ "<Hazardous>N</Hazardous>" & _ "<UNHazmatID></UNHazmatID>" & _ "<UNPackageGroup></UNPackageGroup>" & _ "<UNBulk></UNBulk>" & _ "<Description>TEST ITEM</Description>" & _ "</DetailItem>" & _ "</Details>" & _ "<Accessorials>" & _ "<AccessorialItem>" & _ "<Code>ResidentialDelivery</Code>" & _ "</AccessorialItem>" & _ "</Accessorials>" & _ "</Create>" Dim Code, Element, Fault, Message, ProNumber, PDF Set http = Server.CreateObject("MSXML2.XMLHTTP") Set xml = Server.CreateObject("MSXML2.DOMDocument") On Error Resume Next http.Open "POST", "http://www.saiasecure.com/webservice/BOL/xml.aspx", false, "", "" http.SetRequestHeader "Content-Type", "text/xml" http.Send strRequest If Err <> 0 Then ' Add error handling code in case your unable to connect to the Saia Website. Else xml.LoadXml http.ResponseText ' Note: These examples use SelectSingleNode() which accepts a string containing a XPath ' expression. This is a common way to retrieve a node from a small XML Document. Code = xml.SelectSingleNode("/Response/Code").Text If Code <> "" Then ' Add error handling code in case Saia responds with an Error Code Element = xml.SelectSingleNode("/Response/Element").Text Fault = xml.SelectSingleNode("/Response/Fault").Text Message = xml.SelectSingleNode("/Response/Message").Text Else ProNumber = xml.SelectSingleNode("/Response/ProNumber").Text PDF = xml.SelectSingleNode("/Response/PDF").Text End If End If Set xml = Nothing Set http = Nothing %> <HTML> <BODY> Pro Number = <% =ProNumber %><br> PDF = <% =PDF %><br> <br> Code = <% =Code %><br> Element = <% =Element %><br> Fault = <% =Fault %><br> Message = <% =Message %><br> </BODY> </HTML>
Disclaimer:
Saia Inc. authorizes the use of these Web Services solely to facilitate the exchange of information between Saia and the customer. Unauthorized use of Saia, Inc. Web Services and information is strictly prohibited. All services may be used for lawful purposes only. No warranty, express or implied, is given relating to the accuracy of content and Saia, Inc. does not accept any liability for error or omission.
Saia Inc. reserves the right to refuse or cancel these services at it’s sole discretion. If any terms or conditions are failed to be followed, results constitute grounds for immediate account deactivation.