Authorization


Registration   Forgot password?

Orders Database Export


If you wish to get orders sample please open the following file:
orders.php


Legend:
<element> optional elements
param required parameters
param optional parameters

API Request:
POST /API/orders.php?api_id=id&api_key=key HTTP/1.1
Host: www.shopxml.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length

start_time=unix_timestamp&end_time=unix_timestamp&...
(All possible request parameters see below)

API Response:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8" ?>
<orders count="integer">
<order ID="order_id" time="unix_timestamp" time_str="string"
price="decimal" price_prd="decimal" price_tax="decimal" price_ship="decimal"
discount="decimal" discount_prd="decimal" discount_tax="decimal" discount_ship="decimal"
status="integer" status_str="string" boxes="integer" testmode="0|1" num_comments="integer">
<products quantity="integer" weight="decimal">
<product ID="product_id" quantity="integer" weight="decimal"
price_one="decimal" price_one_wo_attr="decimal" price="decimal" tax="decimal"
price_full="decimal">
<name>string</name>
<attribute_configuration>
<attribute code="attribute_code" value="option_code[,...] or string" />
...
</attribute_configuration>
<attributes>string</attributes>
<model>string</model>
</product>
...
</products>
<correction time="unix_timestamp" time_str="string" admin="string" amount="decimal">
<description>string</description>
</correction>
<email>string</email>
<comment>string</comment>
<shipping_details>string</shipping_details>
<payment_details>string</payment_details>
<shipping_info>string</shipping_info>
<site_url>url</site_url>
<site_name>string</site_name>
<shipping_address>
<first_name>string</first_name>
<last_name>string</last_name>
<company>string</company>
<address1>string</address1>
<address2>string</address2>
<city>string</city>
<state>string</state>
<zip>string</zip>
<country>string</country>
<tel>string</tel>
<fax>string</fax>
</shipping_address>
<billing_address>
<first_name>string</first_name>
<last_name>string</last_name>
<company>string</company>
<address1>string</address1>
<address2>string</address2>
<city>string</city>
<state>string</state>
<zip>string</zip>
<country>string</country>
<tel>string</tel>
<fax>string</fax>
</billing_address>
</order>
...
</orders>

Request parameters (not all are required unless specified):

start ? is an integer number, position, the starting point for the returning result (starts with 0). For an example: let's say that there are twenty orders that fit your inquiry and you transmitted as start=10 therefore you will received the last 10 orders.
portion ? integer number, the number of the orders to be returned. For an example: if there are twenty orders matching your request and you have transmitted as portion=10, the outcome is 10 first orders. If you input as start=10 and portion=10 the outcome is the last 10 orders. However, utilizing these parameters you should always remember that the system is live (continuously updating), therefore while you are inquiring certain partial information you might received more orders at the time. You should always try to avoid the possibility of logical errors. It is better to utilize portion and min_id (please refer to the description below) parameters which appears to be very convenient since the results are prioritized by increasing order ID, and in this case min_id conveniently replaces start.
end_time ? integer number, unix timestamp. The time frame for the end of time. End time limit for order sampling, if it is not specified the outcome would result in an integration of all existing orders into sampling.
start_time ? integer number, unix time stamp. The beginning time frame for orders that should be included into the sampling, if not specified the outcome will generate all of the existing orders into the sampling. Its value can be NEGATIVE. In that case all orders are sampled down from the end_time. For an example: if the end_time is not indicated and start_time=-86400 in this case you will received all orders placed for the past 86400 seconds (24 hours).
ID ? is an ID of a particular order
min_id ? the minimal order ID number which can be sampled
max_id ? the maximal order ID number which can be sampled
email ? customers' email address ? closest match
name ? customers' name. Search by the starting point of shipping and billing, first_name and last_name (4 fields all together).
zip ? postal code. Search by the starting point of zip code of shipping and billing (2 fields)
status ? Order status ID (could be any if not assigned)
cc4 ? the last 4 credit card digits - exact match
testmode ? 0- actual orders (default), 1- test orders, 2? any order
shipping_details ? search by the shipping mode criteria (exact match)

Response parameters:

In the answer field the information about search items (manufacturers) appears in XML format as following:

<orders> - external container
count - order quantity in the current answer
<order> - order (repetitive for each order)
ID - Order ID
time - time of the order being placed reflected in UNIX_TIMESTAMP format
time_str - order time in fair string
price - full order price (including product cost, taxes and shipping) at customers' expense (including discounts)
price_prd - price of the product only
price_tax - taxes
price_ship - shipping cost
discount - full discount amount received by the customer
discount_prd - partial product discount
discount_tax - partial tax discount
discount_ship - partial shipping discount
status - order status ? numerical
status_str - order status ? precise definition
boxes - number of boxes shipped with actual order (it has to be a very significant order, where the number of shipped boxes over 1)
testmode - 1 in the case this is a test order
num_comments - number of admin comments to the current order
<products> - list of products
quantity - number of products in the order
weight - total weight of the products in the shopping cart
<product> - product (for each position in the order)
ID - product ID (products with an attributes if were added into the shopping cart multiple times, in such case will be repeated)
ATTENTION!!!! If there is an order placed by the customer that has such ending parameter as ID=100000000 then this product is non-existent,
it is a virtual product that reflects the corrections in the current order made by the seller (for an example, corrections made to the order over the phone).
In such cases the amount in the field price reflects corrected amount of the order (could be positive, negative or zero), the name field contains the description of the corrections made (comments).
Common order elements such as price (please refer to the description above) are accounted for this particular product and reflect an actual cost of the order including all corrections incurred. Please see correction the element that describes corrections made. <name> - name of the product
quantity - quantity of products in the current order
weight - total weight of the current order (considering quantity)
price_one_wo_attr* - the price of one item (product) in the current order excluding the price of an attribute (if the product includes any attributes)
price_one - the price on one item in the current order
price - the price of the current position (accounting for an actual quantity)
tax* - total amount of sales taxes attributable to the current order
price_full - total amount of the current order (including taxes)
<attribute_configuration>* - the list of product attributes chosen the by the customer (in case there are any attributes assigned to the certain product)
<attribute> - product attribute is existent for each product chosen by the customer such as optional and multiple without chosen options and incomplete fields such as text are not mentioned.
code - attribute code
value - attribute value, code of a chosen option for such fields as required and optional, the codes for all chosen options are listed with commas for such attributes as multiple its value entered by the customer for such an attribute as text.
<attributes> - string with an enumeration of the selected options for an attributes (if there is such)
<model> - product model (type)
<correction>* - order corrections description, only in case of any being made
time - an actual time of the corrections made is reflected as UNIX_TIMESTAMP
time_str - an actual time of the last corrections made reflected in the clear mode string
admin* - admin user name, the one who made last corrections (might be absent if the corrections were made through API)
amount - corrected order price (might be negative)
<description> - correction description
<email> - customers' email address
<comment> - customers' comments to the current order
<shippint_details> - shipping method (reflected in the clear mode string)
<payment_details> - information on the placed payment (reflected in the clear mode string)
<shipping_info> - shipping information for the current order (noted by the admin)
<site_url> - partner website URL address where the actual order was placed
<site_name> - name of the partner website where the actual order was placed
<shipping_address> - shipping address
<first_name> - first name of the customer
<last_name> - last name
<company> - company name
<address1> - address line 1
<address2> - address line 2
<city> - city
<state> - state/province (no abbreviations)
<zip> - zip/postal code
<country> - country (no abbreviations)
<tel> - telephone number
<fax> - fax number
<billing_address> - customer's billing address (buyer)
<first_name> - first name of the customer
<last_name> - last name
<company> - company name
<address1> - address line 1
<address2> - address line 2
<city> - city
<state> - state/province (no abbreviations)
<zip> - zip/postal code
<country> - country (no abbreviations)
<tel> - telephone number
<fax> - fax number
Contact Us Legal and Policies Sitemap
© XMLShop.com 2004 – 2018