NVMS, Inc Data Exchange Specifications Version 1.5.1010 Client: Client Here Client ID: Client Num This document should explain the setup of the B2B data exchange using the transfer of data using an HTTP request with XML data technology. Please follow the following examples to set up your xml file and to plan your WebService setup. I've included a vbs file that you can use to validate your test xml document by just dragging your file onto the program file. I've also included a sample DTD that you can use to test validate your XML files. Usage: There are many different ways to send xml data using an HTTP request. I've used classic ASP in my example, but you can use.net or any technology that can send an XML file using an HTTP request. Following are the URL's for Production and Test modes. Sending Order Information: Production: URI = "http://exchange.nvms.com/send.asp" Test: URI = "http://exchange.nvms.com/sendtest.asp" Please see the attached file: "SendExample.asp" for an example of how you can send files using classic ASP. Retrieving Order Information: Production: URI = "http://exchange.nvms.com/get.asp" Test: URI = "http://exchange.nvms.com/gettest.asp" By submitting your reference # (We call it "FileNumber") in an XML file you can retrieve completed order information that is URL Encoded and attached documents (images) that are encoded using Base64. Order Status: Production: URI = "http://exchange.nvms.com/status.asp" Test: URI = "http://exchange.nvms.com/statustest.asp" By submitting your reference # (We call it "FileNumber") in an XML file you can retrieve order status information. If you have any questions or problems or would like to register to send us batch orders using our WebService, please contact me at: scott@nvms.com. Version 1.5 - Updated: 10/10/2005 Page 1 of 5 2005 NVMS, Inc. All Rights Reserved.
Sending Order Data Field Definitions/Explanation Field/Attribute Field Type (Size) Required Notes Format Ex: XML Tag username int Yes Same as client ID "10" security password varchar(50) Yes Given to you at time of setup "password" security ClientID int Yes *See Client Section for correct ID "73" details, service UserID int Yes *See Client Specific Users for user ID "23" details FileNumber varchar(50) Yes Your unique file number. "any text or num" details PropOwner varchar(50) Yes Business name or Property name. "new business" details PropAddress varchar(50) Yes Business or property address. "123 Main St" details PropCity varchar(50) Yes Business or property city. "FreeTown" details PropState varchar(50) Yes Business or property state. "VA" details PropZip varchar(50) Yes Business or property zip. "21220" details PropDesc varchar(100) No Optional business description. "Building" details Used Only For Orders Pertaining to Mobil Homes details mobyear varchar(10) No Optional mobile home year built. "1980" details mobmodel varchar(50) No Optional mobile home model. "RED ONE" details mobserial varchar(50) No Optional mobile home serial number. "283983AB" details moblength varchar(5) No Optional mobile home length "40 ft" details mobwidth varchar(5) No Optional mobile home width. "70 ft" details AccContact varchar(50) No Business contact name. "Bill Coctosin" details AccMobile varchar(50) No Business contact mobile phone number. "7035551212" details AccFax varchar(50) No Business contact fax number. "7035551234" details AccHome varchar(50) No Business contact home phone number. "7034582321" details AccWork varchar(50) No Business contact work phone number. "7035551243" details AccEmail varchar(50) No Business contact email. dude@coolsite.com details ClientDBA varchar(50) No You can use this field as the dba name or the agent name/sales person name. "BankCard Systems" or "John Doe" details Notes varchar(1000) No Optional order notes. "Notes Here" details ServiceID int Yes *See Client Specific Services for service ID "6" service pid int Yes Same as parent order id attribute "2" service Client Specific Services - Client Here ServiceID Service Description You will receive these details once your company is signed up. Client Specific Users - Client Here UserID Name Email You will receive these details once your company is signed up. XML Example <?xml version="1.0"?> <!DOCTYPE root SYSTEM "OrderExchange.dtd"> <security username="44" password="test"></security> <order id="1"> <details ClientID="44" UserID="554" FileNumber="12138326" PropOwner="Ted Nugent" PropAddress="134 Wilcoxen St" PropCity="Manassas" PropState="VA" PropZip="20111" ClientDBA="John Doe" Notes="These are some test notes here."/> <service pid="1" clientid="44" serviceid="6"/> Version 1.5 - Updated: 10/10/2005 Page 2 of 5 2005 NVMS, Inc. All Rights Reserved.
</order> <order id="2"> </order> <order id="3"> </order> <details ClientID="44" UserID="554" FileNumber="8378326" PropOwner="Miles Davis" PropAddress="134 Wilcoxen St" PropCity="Fairfax" PropState="VA" PropZip="22103" ClientDBA="Phil McCrakin" Notes="These are some test notes here."/> <service pid="2" clientid="44" serviceid="6"/> <details ClientID="44" UserID="554" FileNumber="2173226" PropOwner="Bill Coctosin" PropAddress="134 Wilcoxen St" PropCity="McLean" PropState="VA" PropZip="22102" ClientDBA="dba: Bankcard Services" Notes="This is a new order with some notes here."/> <service pid="3" clientid="44" serviceid="6"/> XML Data Field Explanation: 1.) All XML files sent to NVMS, Inc. should include the DOCTYPE tag referencing the OrderExchange.dtd or you file will fail validation. 2.) The order id attribute should be a unique value for each order sent in the batch. 3.) You can attach multiple services using the <service> tag. The "pid" attribute must match the parent order id for all services under the parent order. All attributes must be included in the service tag. DTD Example <!ELEMENT root (security,order+)> <!ELEMENT security (#PCDATA)> <!ATTLIST security username CDATA #REQUIRED> <!ATTLIST security password CDATA #REQUIRED> <!ELEMENT order (details,service+)> <!ATTLIST order id CDATA #REQUIRED> <!ELEMENT details (#PCDATA)> <!ATTLIST details ClientID CDATA #REQUIRED> <!ATTLIST details UserID CDATA #REQUIRED> <!ATTLIST details FileNumber CDATA #REQUIRED> <!ATTLIST details PropOwner CDATA #REQUIRED> <!ATTLIST details PropAddress CDATA #REQUIRED> <!ATTLIST details PropCity CDATA #REQUIRED> <!ATTLIST details PropState CDATA #REQUIRED> <!ATTLIST details PropZip CDATA #REQUIRED> <!ATTLIST details PropDesc CDATA #IMPLIED> <!ATTLIST details mobyear CDATA #IMPLIED> <!ATTLIST details mobmodel CDATA #IMPLIED> <!ATTLIST details mobserial CDATA #IMPLIED> <!ATTLIST details moblength CDATA #IMPLIED> <!ATTLIST details mobwidth CDATA #IMPLIED> <!ATTLIST details AccContact CDATA #IMPLIED> <!ATTLIST details AccMobile CDATA #IMPLIED> <!ATTLIST details AccFax CDATA #IMPLIED> <!ATTLIST details AccHome CDATA #IMPLIED> <!ATTLIST details AccWork CDATA #IMPLIED> <!ATTLIST details AccEmail CDATA #IMPLIED> <!ATTLIST details ClientDBA CDATA #IMPLIED> <!ATTLIST details Notes CDATA #IMPLIED> <!ELEMENT service (#PCDATA)> <!ATTLIST service pid CDATA #REQUIRED> <!ATTLIST service clientid CDATA #REQUIRED> <!ATTLIST service serviceid CDATA #REQUIRED> Version 1.5 - Updated: 10/10/2005 Page 3 of 5 2005 NVMS, Inc. All Rights Reserved.
Client Transfer Example '************************ HTTP Request Example for DataExchange Response **************** Dim xmlhttp, url, xmlfile Dim xmldoc, oxmlsend Set oxmlsend = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") Set oxmlget = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") url = "http://exchange.nvms.com/sendtest.asp" xmlfile = "http://yourserver/webfolder/testnvms.xml" Response.ContentType = "text/html" 'Get File oxmlget.open "GET", xmlfile, false oxmlget.send() xmldoc = oxmlget.responsetext 'Send File oxmlsend.open "POST", url, false oxmlsend.send(xmldoc) If err.number <> 0 Then Response.Write err.description Else Response.Write oxmlsend.responsetext End If Retrieving Order Data XML Example <?xml version="1.0" encoding="utf-8"?> <security username="user" password="password"></security> <order ClientID="124" FileNumber="FILE1"></order> <order ClientID="124" FileNumber="FILE2"></order> <order ClientID="124" FileNumber="FILE3"></order> Submit your XML file to us in this format and receive order documents that can be saved in your own document management system. You can batch as many order tags as you like in this XML request, but remember each file will be +/- 1.5 MB - This depends on the number of reports and images included in each report. Return XML Schema: <report reportid="2" FileNumber="12345" servicename="merchant Site Inspection" charge="45" invoicedate="4/5/2005" report="urlencoded Report"> <attachments reportid="2" imageid="1" extension="jpg" image="base64 Encoded Binary"/> <attachments reportid="2" imageid="2" extension="jpg" image="base64 Encoded Binary"/> </report> The XML schema returned is like the example above. The report data is sent to you in a URL Encoded format so you'll have to decode this to before reading it. The report is just an HTML table. The attachments are encoded using Base64 so you'll have to decode these as well using some sort of Base64 decode function. Let me know if you need help with either Please look in the exchange.zip file for the file "testnvmsget.xml" for an example of the XML data returned. You also need to watch for errors in the response file. If there are errors, an "<error>" tag will be returned with corresponding text. <error text="no attachments found for this report..." /> Version 1.5 - Updated: 10/10/2005 Page 4 of 5 2005 NVMS, Inc. All Rights Reserved.
Order Status XML Example (request) <?xml version="1.0" encoding="utf-8"?> <security username="test" password="password"/> <status ClientID="44"> <order file="2318653223"/> <order file="curves"/> <order file="8149468922"/> <order file="518564050123702"/> </status> Submit your XML file to us in this format and receive order status for each file number passed. You can use this info from your system to send us this request to tell which order are complete. If complete you may then run the "Retrieve" function to pull down the data of the full report. Return XML Schema: <?xml version="1.0" encoding="utf-8"?> <order filenum="2318653223" status="delivered" EntryDate="4/12/2004 12:47:00 PM" PropOwner="GINGER CREEK GIFT BASKET" InvoiceDate="4/21/2004 6:25:00 PM" StatusBool="True" userid="263" /> <order filenum="8149468922" status="delivered" EntryDate="4/12/2004 12:48:00 PM" PropOwner="SERVELLO GALLERY OF ART" InvoiceDate="4/19/2004 5:09:00 PM" StatusBool="True" userid="263" /> <order filenum="518564050123702" status="delivered" EntryDate="3/10/2004 5:55:00 PM" PropOwner="FIT IN THIRTY" InvoiceDate="3/16/2004 6:19:00 PM" StatusBool="True" userid="263" /> Version 1.5 - Updated: 10/10/2005 Page 5 of 5 2005 NVMS, Inc. All Rights Reserved.