Items marked with a * are required
To place an order, data is submitted in this format to sextoyclub.com:
<?xml version="1.0" encoding="iso-8859-1"?> <orders> <username>*username</username> <password>*password</password> <order> <REFNUM>*dropshippers reference number</REFNUM> <SHIPVIA>*shipping method</SHIPVIA> ---------> [OBSOLETE] <SHIPSETTINGS> <ITEM> <VENDOR>MC</VENDOR> <VSHIPID>MC-1-5.USPriorityMail</VSHIPID> [OBSOLETE] <VSHIPNATIVE>M02</VSHIPNATIVE> </ITEM> <ITEM> <VENDOR>ELD</VENDOR> <VSHIPID>ELD-1-4.UPSGround</VSHIPID> [OBSOLETE] <VSHIPNATIVE>UGR</VSHIPNATIVE> </ITEM> </SHIPSETTINGS> <ORDER_DATE>*5/16/08</ORDER_DATE> <PRODUCTS>* <item>* <pnum>*ABC123</pnum> <qty>*1</pnum> </item*> <item> <pnum>123ABC</pnum> <qty>3</qty> </item> </PRODUCTS>* <LASTNAME>*Van Riper</LASTNAME> - Customer's shipping info. <FIRSTNAME>*Erik</FIRSTNAME> - Customer's shipping info. <COMPANY></COMPANY> - Customer's shipping info. <ADDRESS1>*4720 Center Ave</ADDRESS1> - Customer's shipping info. <ADDRESS2>#515</ADDRESS2> - Customer's shipping info. <CITY>*Wonder City</CITY> - Customer's shipping info. <STATE>*NY</STATE> - Customer's shipping info. <ZIPCODE>*11109</ZIPCODE> - Customer's shipping info. <COUNTRY>*US</COUNTRY> - Customers 2 letter shipping country. <PHONE1>*(123) 555-1212</PHONE1> - Customer's Shipping phone # 1. <PHONE2>(555) 555-1212</PHONE2> - Customer's Shipping phone # 2. <EMAIL1>customer@location.com</EMAIL1> - Customer's billing email. <EMAIL2>*customer@location.com</EMAIL2> - Customer's shipping email. <FULFILL1>Special instructions provided by customer for order.</FULFILL1> </order> </orders>
SHIPVIA and VSHIPID are in the process of being phased out and should not be used in new implementations.
The following values can be used for VSHIPNATIVE:
| Shipping Method | Value |
|---|---|
| US Priority Mail | M02 |
| UPS Ground | UGR |
| UPS Orange | U3DR |
| UPS Blue | U2DR |
| UPS Red | U1DR |
| International UPS | UWEPR |
| FedEx Ground | FG |
| FedEx 2nd Day | F2DR |
In response, sextoyclub.com will send:
<?xml version="1.0" encoding="iso-8859-1"?> <response> <order> <refnum>dropshippers reference number</refnum> <status>1000</status> <message>Order Accepted for processing</message> </order> </response>
The <status> and <message> fields will contain a standardized code and a English language textual representation of the status code.
<STATUS>9999</STATUS> <MESSAGE>An invalid username / password has been submitted. Please contact sextoyclub.com support.</MESSAGE> <STATUS>9075</STATUS> <MESSAGE>Product does not exist in our database.</MESSAGE> <STATUS>9020</STATUS> <MESSAGE>First Name is a required value, please resolve to continue.</MESSAGE> <STATUS>9021</STATUS> <MESSAGE>Last Name is a required value, please resolve to continue.</MESSAGE> <STATUS>9022</STATUS> <MESSAGE>Address1 is a required value, please resolve to continue.</MESSAGE> <STATUS>9023</STATUS> <MESSAGE>City is a required value, please resolve to continue.</MESSAGE> <STATUS>9024</STATUS> <MESSAGE>State is a required value, please resolve to continue.</MESSAGE> <STATUS>9025</STATUS> <MESSAGE>Zip Code is a required value, please resolve to continue.</MESSAGE> <STATUS>9026</STATUS> <MESSAGE>Country is a required value, please resolve to continue.</MESSAGE> <STATUS>9027</STATUS> <MESSAGE>E-Mail is a required value, please resolve to continue.</MESSAGE> <STATUS>9028</STATUS> <MESSAGE>E-Mail is NOT in the correct format, please resolve to continue.</MESSAGE> <STATUS>9029</STATUS> <MESSAGE>State must be only 2 characters, please resolve to continue.</MESSAGE> <STATUS>9012</STATUS> <MESSAGE>Invoice number duplicate within the import data.</MESSAGE> <STATUS>9011</STATUS> <MESSAGE>Invoice number duplicate within current pending orders database.</MESSAGE> <STATUS>9010</STATUS> <MESSAGE>Invoice number has already been used & processed.</MESSAGE> <STATUS>9009</STATUS> <MESSAGE>Invoice number has more than 8-digits.</MESSAGE> <STATUS>9008</STATUS> <MESSAGE>Invoice country field is more than the allowed 2 characters.</MESSAGE> <STATUS>9007</STATUS> <MESSAGE>Order does not have a correct shipping method of: UPS Red; UPS Blue; UPS Orange; International UPS; UPS Ground; or US Mail.</MESSAGE> <STATUS>9005</STATUS> <MESSAGE>Duplicate product within same order.</MESSAGE> <STATUS>9004</STATUS> <MESSAGE>Catalogs are not allowed to be drop shipped.</MESSAGE> <STATUS>9003</STATUS> <MESSAGE>Product is currently out of stock.</MESSAGE> <STATUS>9002</STATUS> <MESSAGE>Product has been discontinued by the manufacturer</MESSAGE> <STATUS>9001</STATUS> <MESSAGE>Upload not successful, there was a problem with the import file.</MESSAGE> <STATUS>1000</STATUS> <MESSAGE>Order accepted for processing.</MESSAGE>
The <status> and <message> fields at any time can contain a standardized code and a English language textual representation of the status code for the following errors, no matter what is transmitted to sextoyclub.com:
<STATUS>9997</STATUS> <MESSAGE>Username is missing, please correct and try again.</MESSAGE> <STATUS>9998</STATUS> <MESSAGE>Password is missing, please correct and try again.</MESSAGE> <STATUS>9999</STATUS> <MESSAGE>Invalid Username/Password has been submitted. Please contact sextoyclub.com support.</MESSAGE>
To query the status of an order, the drop ship application should submit the following structure:
<?xml version="1.0" encoding="iso-8859-1"?> <orderstatus> <username>*username</username> <password>*password</password> <order>* <REFNUM>*dropshippers reference number</REFNUM> </order> </orderstatus>
In response, sextoyclub.com will send:
<?xml version="1.0" encoding="iso-8859-1"?> <orderstatus> <order> <REFNUM>*dropshippers reference number</REFNUM> <vendor>Extreme Restraints</vendor> - Name of the vendor item was shipped from. Sextoyclub = sextoyclub's own warehouse <vendorcode>XR</vendorcode> - The code of the vendor this item was shipped from. STC = sextoyclub's own warehouse. <shipzip>01234</shipzip> - destination of order <country>US</country> - destination country of order <status>1000</status> - numeric representation of status of order <tracking>1Z01234567890</tracking> - the tracking number of the order (if any) <dateshipped>2008-08-12</dateshipped> - The date the order was shipped in YYYY-MM-DD format <shipmethod>UPS 3 Day</shipmethod> - the method the order shipped. <message>Item has shipped</message> - English language textual representation of the status code </order> </orderstatus>
The <status> and <message> fields will contain a standardized code and a English language textual representation of the status code.
<STATUS>3000</STATUS> <MESSAGE>Not a trackable item.</MESSAGE> <STATUS>1000</STATUS> <MESSAGE>Order has shipped.</MESSAGE> <STATUS>1001</STATUS> <MESSAGE>Order in progress.</MESSAGE> <STATUS>1002</STATUS> <MESSAGE>Order pending, not yet sent to warehouse.</MESSAGE>
To cancel an order, the drop ship application should submit the following structure:
<?xml version="1.0" encoding="iso-8859-1"?> <ordercancel> <username>*username</username> <password>*password</password> <order>* <REFNUM>*dropshippers reference number</REFNUM> <vendorcode>*The vendor code of the order</vendorcode> </order> </ordercancel>
In response, sextoyclub.com will send:
<?xml version="1.0" encoding="iso-8859-1"?> <orderstatus> <order> <REFNUM>*dropshippers reference number</REFNUM> <status>1000</status> - numeric representation of status of order <message>Order was canceled</message> - English language textual representation of the status code </order> </ordercancel>
Please note, there are 2 phases to an order at sextoyclub.com. If an order is still pending (not sent to the warehouse), the order is guaranteed to be canceled when this request is sent in. If the order has been sent to the warehouse already, we will make every reasonable effort to cancel the order, but it is not guaranteed.
You should contact dropship support immediately so you can remain in contact about the status of this order.
To query stock availability and get shipping costs, the drop ship application should submit the following structure:
<?xml version="1.0" encoding="iso-8859-1"?> <orderquery> <username>*username</username> <password>*password</password> <order>* <REFNUM>*dropshippers reference number</REFNUM> <shiptozip>*01234</shiptozip> <country>*US</country> <products>* <item>* <pnum>*ABC123</pnum> <qty>1</qty>* </item>* <item> <pnum>123ABC</pnum> <qty>2</qty> </item> </products> </order> </orderquery>
In response, sextoyclub.com will send:
<?xml version="1.0" encoding="iso-8859-1"?> <orderquery> <order> <REFNUM>*dropshippers reference number</REFNUM> <products> <item> <pnum>ABC123</pnum> <qty>1</qty> <stock>1</stock> - 1 is all requested is in stock. 0 means not enough stock <shipping> - shipping for this item, or group of items <shippingoption> <carrier>USPS Priority</carrier> <price>$0.73</price> </shippingoption> <shippingoption> <carrier>UPS 3-Day</carrier> <price>$9.73</price> </shippingoption> </shipping> <vendor>Extreme Restraints</vendor> - Vendor item is shipping from <vendorcode>XR</vendorcode> - Vendor code </item> <item> <shipping> - shipping for this item, or group of items <shippingoption> <carrier>USPS Priority</carrier> <price>$0.73</price> </shippingoption> <shippingoption> <carrier>UPS 3-Day</carrier> <price>$9.73</price> </shippingoption> </shipping> <pnum>123ABC</pnum> <qty>2</qty> <stock>1</stock> <shipping>$0.50</shipping> <vendor>Sextoyclub</vendor> <vendorcode>STC</vendorcode> </item> </products> </orderquery>
If multiple items are coming from the same vendor, the part numbers will be separated by commas and shipping will be aggregated.
Sextoyclub will attempt to aggregate products to as few vendors as possible in order to save time and money on shipping.
Example code
The following code snippet in perl will submit the contents of the file “xml.out”, then output the returned value from the server:
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
my $userAgent = LWP::UserAgent->new(agent => 'perl post');
open IN, "xml.out" or die "Can't open file: $!";
my $data = do {local $/; <IN>;};
close IN;
my $message = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
$data\n";
$message =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
$message = "themessage=" . $message;
#print $message;
my $response = $userAgent->request(POST 'http://www.sextoycenter.com/pages/start/API/DSorders.html' , Content_Type => 'text/xml', Content => $message);
print $response->as_string;