Our new XML order interface allows our affiliates to exercise the ultimate level of customization on their websites. You can now fully control the entire look and feel of your customer's shopping experience while still being able to utilize our order fulfillment system. Below is the format of the XML data that the system uses to generate an order.
Click on individual XML tag for explanation:
<?xml version="1.0" encoding="UTF-8"?>
<request affiliateID="2006074172" password="YOUR_PASSWORD" response_email="support@rxtest.com" website_name="Rx-Test-Site.com" website_link="http://www.rxtest.com" support_link="http://www.rxtest.com/support.html" tracking_link="http://www.rxtest.com/order_tracking.html">
<order coupon="CDT81" saturday="0" CampaignID="camptest">
<customer existing="0" first_name="Testy" last_name="Testerson" email="testy@test.com" password="test123" phone="3105551111">
<ship_address street="123 Test Ship Street" street2="Suite 111" city="Test City" region="CA" postalCode="91111" country="USA"/>
<bill_address street="123 Test Bill Street" street2="" city="Test City" region="CA" postalCode="91111" country="USA"/>
<options>
<option name="birthday">09/02/1975</option>
<option name="sex">male</option>
<option name="height">66</option>
<option name="weight">190</option>
<option name="bmi">20</option>
</options>
</customer>
<items>
<item number="189"/>
</items>
<questions>
<question name="high_blood">0</question>
<question name="medication_taken">Advil</question>
<question name="medication_plan_on">Lithium and Tylenol</question>
<question name="allergies">cats</question>
<question name="surgeries">toncils out</question>
<question name="medical_treated">None</question>
<question name="reason_order">I am not feeling well.</question>
<question name="medical_history">I have always been healthy.</question>
<question name="agree">1</question>
<question name="symptoms">itchy nose, scratchy throat</question>
<question name="taken_before">1</question>
<question name="sexual_d">0</question>
<question name="not_pregnant">1</question>
<question name="over_counter">1</question>
<question name="doctor_name">Dr. Samson Sample</question>
<question name="doctor_phone">310-976-1234</question>
</questions>
<payment type="cc">
<options>
<option name="cardType">Visa</option>
<option name="cardNumber">1111111111111111</option>
<option name="cardExp">01/05</option>
<option name="cvv2">1111</option>
</options>
</payment>
</order>
</request>
XML orders should be posted to the following link for processing in our system:
https://www.ccbasket.com/xml_order_processing.php
You can either post an XML file (i.e. <INPUT TYPE="file" NAME="myfile">) or simply post the XML content (i.e. <INPUT TYPE="text" NAME="myXml" VALUE="##XML_content##">).
Please note the field names. Also if you post a file then <FORM> tag that contains a file input must have enctype attribute set to multipart/form-data. You must name the posting form fields accordingly. This page will return XML indicating the order number, whether the order was accepted or rejected, the total cost, the shipping charge, whether a notification email was successfully sent to the customer and whether or not the order was a refill for the customer.
Click on individual XML tag for explanation:
<?xml version="1.0" encoding="utf-8"?>
<order>
<total_cost>156.00</total_cost>
<ship_cost>18.00</ship_cost>
<accepted>1</accepted>
<order_number>rx123456</order_number>
<refill>0</refill>
</order>
Order Status
To obtain order status updates, post an XML file or content to the following page:
https://www.ccbasket.com/xml_status_return.php
Post XML data to this page using the same form field names that are used for xml_order_processing.php above. The sample XML below demonstrates the format that this page utilizes.
Click on individual XML tag for explanation:
<?xml version="1.0" encoding="utf-8"?>
<request affiliateid="2006074172" password="your_password">
<orders>
<order number="rx123456" cust_email="testy@test.com"/>
<order number="rx111111" cust_email="testy@test.com"/>
</orders>
</request>
Order status information is returned in the following XML format for the submitted order number.
Click on individual XML tag for explanation:
<?xml version="1.0"encoding="UTF-8"?>
<response>
<orders>
<order number="RX123456">
<total_cost>156.00</total_cost>
<ship_cost>18.00</ship_cost>
<shop_date>01/01/2004</shop_date>
<tracking_number>987654321</tracking_number>
<status_code>2</status_code>
<status_desc>Order completed</status_desc>
</order>
<order number="RX111111">
<total_cost></total_cost>
<ship_cost></ship_cost>
<shop_date></shop_date>
<tracking_number></tracking_number>
<status_code>-1</status_code>
<status_desc>The system is unable to find order number RX111111 because it does not exist, it has not yet been processed or the email supplied does not correspond to the order number. Please be sure to check that the xml document and information included was properly formatted.</status_desc>
</order>
</orders>
</response>
Error Reporting
Any problems experienced by the system during the order process or status update are returned to the posting page in the following format:
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Too-soon: You have previously placed an order that has not yet run out. You must wait until 07/04/2004 to re-order.</error>
</errors>
Handling Orders From Returning customers
If you submit orders from customers those already exist in the database you must set existing attribute of customer tag to 1.
Sample:
<?xml version="1.0" encoding="UTF-8"?>
<request affiliateID="2006074172" password="YOUR_PASSWORD" response_email="support@rxtest.com" website_name="Rx-Test-Site.com" website_link="http://www.rxtest.com" support_link="http://www.rxtest.com/support.html" tracking_link="http://www.rxtest.com/order_tracking.html">
<order coupon="CDT81" saturday="0" CampaignID="camptest">
<customer existing="1" first_name="Testy" last_name="Testerson" email="testy@test.com" password="test123" phone="3105551111">
<ship_address street="123 Test Ship Street" street2="Suite 111" city="Test City" region="CA" postalCode="91111" country="USA"/>
<bill_address street="123 Test Bill Street" street2="" city="Test City" region="CA" postalCode="91111" country="USA"/>
<options>
<option name="birthday">09/02/1975</option>
<option name="sex">male</option>
<option name="height">66</option>
<option name="weight">190</option>
<option name="bmi">20</option>
</options>
</customer>
.....
existing attribute of customer tag is optional. If it is not specified then its value considered to be 0.
Error reporting is performed in the same manner as described above
Checking if customer exists
To check if the user exists in the database submit a request to:
https://www.ccbasket.com/xml_user_check.php
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>
<request affiliateID="2006074172" password="YOUR_PASSWORD">
<customer email="testy@test.com"/>
</request>
The request tag has two mandatory attributes - affiliateID and password. Here you have to specify your Affiliate ID and your affiliate password. These attributes are used for verification purpose only.
The customer tag contains single mandatory attribute email that is used to specify the e-mail you need to check.
Response:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<existing>1<existing/>
<response/>
If customer is exist response will contain <existing>1</existing> line and if customer does not exist in the database response will be <existing>0</existing>
Error reporting is performed in the same manner as described above.
Getting user information
To get information about exiting user submit a request to
https://www.ccbasket.com/xml_login.php
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>
<request affiliateID="2006074172" password="YOUR_PASSWORD">
<customer email="testy@test.com" password="test123"/>
</request>
The request tag has two mandatory attributes - affiliateID and password. Here you have to specify your Affiliate ID and your affiliate password. These attributes are used for verification purpose only.
The customer tag contains two mandatory attributes email and password those are used to specify e-mail and a password of a user whose information needs to be retrieved from the database.
Response:
Response contains customer information in the same format as it were submitted during previous orders, except that the password is not specified, since you already got it from the customer.
<?xml version="1.0" encoding="UTF-8"?>
<response>
<customer first_name="Testy" last_name="Testerson" email="testy@test.com" phone="3105551111">
<ship_address street="123 Test Ship Street" street2="Suite 111" city="Test City" region="CA" postalCode="91111" country="USA"/>
<bill_address street="123 Test Bill Street" street2="" city="Test City" region="CA" postalCode="91111" country="USA"/>
<options>
<option name="birthday">09/02/1975</option>
<option name="sex">male</option>
<option name="height">66</option>
<option name="weight">190</option>
<option name="bmi">20</option>
</options>
</customer>
</response>
Error reporting is performed in the same manner as described above
Sending a password reminder
Situations when existing customer forgets her/his password are not rare. Password reminder service have become an essential paro of a good website. Our new XML interface allows to send password reminder letters to customers.
To send a password reminder letter submit a request to
https://www.ccbasket.com/xml_pass_reminder.php
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>
<request affiliateID="2006074172" password="YOUR_PASSWORD" from_email="support@rxtest.com" site_name="Rx-Test-Site.com" site_url="http://www.rxtest.com">
<customer email="testy@test.com"/>
</request>
The request tag has five mandatory attributes:
- affiliateID - Affiliate ID for verification purposes.
- password - Affiliate passwords for verification purposes.
- from_email - Customer service e-mail.
- site_name - Site name that will be referred in e-mail text.
- site_url - Site URL that will be used in e-mail text.
The customer tag contains single mandatory attribute email. It specifies e-mail address of existing customer who have requested a password reminder letter
Response:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<reminder_sent>1</reminder_sent>
</response>
If customer exists and a password reminder e-mail was sent successfully response will contain <reminder_sent>1</reminder_sent> line. Otherwise error will be reported.
Error reporting is performed in the same manner as described above