Difference between revisions of "USA Web Service"

From Netsville Support
Jump to navigation Jump to search
Line 73: Line 73:
 
   <ShippingResponse>
 
   <ShippingResponse>
 
   <ShippingCost>
 
   <ShippingCost>
     <Method type="Standard">0.00</Method>
+
     <Method type="Standard">11.99</Method>
     <Method type="Rush (Continental US Only)">0.00</Method>
+
     <Method type="Rush (Continental US Only)">20.98</Method>
     <Method type="2-Day (Continental US Only)">0.00</Method>
+
     <Method type="2-Day (Continental US Only)">24.98</Method>
     <Method type="Canada">0.00</Method>
+
     <Method type="Canada">24.94</Method>
 
   </ShippingCost>
 
   </ShippingCost>
 
   </ShippingResponse>
 
   </ShippingResponse>

Revision as of 15:21, 20 January 2012

Development Server

Requests are RESTful URL calls combined with XML sent as raw Standard Input (non-urlencoded POST Requests). To reach the Web Service, use this URL:

http://signals.thewhiteroom.com/cgi-bin/ws

The URL must be combined with a command such as login, shipping, tax, or checkout. So a full request will look like one of these:

User Login

Allow access to membership database so mobile app can authenticate existing accounts. Calls will be made directly to MySQL database to authenticate user login. Response will be name, address, phone, etc of customer table.

Here is an example of how to make this call:

  • RESTful Request
http://signals.thewhiteroom.com/cgi-bin/ws/login
  • Expected XML

<MemberRequest>
  <Email>johnsmith@example.com</Email>
  <Password>secret</Password>
</MemberRequest>

  • XML Response

<?xml version="1.0" encoding="utf-8" ?>
 <MemberResponse>
  <MemberID>5</MemberID>
   <Addresses>
    <Address type="billing">
     <Email>johnsmith@example.com</Email>
     <FirstName>John</FirstName>
     <LastName>Smith</LastName>
     <Street1>72 Cascade Dr</Street1>
     <Street2>Ste 2</Street2>
     <City>Rochester</City>
     <State>NY</State>
     <Zip>14614</Zip>
     <DayPhone>585-232-5670</DayPhone>
     <EveningPhone></EveningPhone>
    </Address>
   </Addresses>
</MemberResponse>

Shipping Info

Allow access to Hazel's shipping cost calculator (a custom Hazel template). Web service will allow for remotely calling Hazel with given products and address information with filtered response of shipping options and costs. This is specific to the customer. Currently, only the products themselves are used in the calculation (not the address).

  • RESTful Request
http://signals.thewhiteroom.com/cgi-bin/ws/shipping
  • Expected XML

<ShippingRequest>
   <Zip>80007</Zip>
   <ProductIDs>
     <ProductID qty="1">HK6614</ProductID>
     <ProductID qty="3">HJ2722</ProductID>
   </ProductIDs>
</ShippingRequest>

  • XML Response

<?xml version="1.0" encoding="utf-8" ?>
 <ShippingResponse>
  <ShippingCost>
   <Method type="Standard">11.99</Method>
   <Method type="Rush (Continental US Only)">20.98</Method>
   <Method type="2-Day (Continental US Only)">24.98</Method>
   <Method type="Canada">24.94</Method>
  </ShippingCost>
 </ShippingResponse>

Tax Calculator

Checkout

Order Status

Testing