get_order_items
This request lists all orders that meet the search terms.
The request is devided into two parts
- search: In which are inserted the search parameters
Note:The parameters will be devided with AND, then define for example id_order for the best search result. - display: In which you define what fields you want to see in the results. By default all fields are visible.
Call parameters:
Parameter |
Required |
Default |
Note |
uid |
yes |
Id client |
|
pid |
yes |
Id Portal |
|
lid |
yes |
id Language |
|
key |
yes |
Code of authentication |
|
api_version |
yes |
Version API. |
|
request |
yes |
Name of request |
|
search |
yes |
Root of tree search |
|
id_order |
no |
null |
Search an order by ID |
from |
no |
null |
Search products indicated FROM data |
to |
no |
null |
Search products indicated UNTILL data |
row_max |
no |
50 |
Indicated the maximum rows for the search results |
page |
no |
1 |
Indicated what page will be visible if there are more products that will not fit on the page indicated by row_max |
display |
yes |
Root of tree filter in output |
|
id_order_store |
no |
true |
id order store. This id is the same visible in the order history of the store |
id_catalog |
no |
true |
id catalogus |
catalog_name |
no |
true |
Name catalogus |
id_supplier |
no |
true |
id supplier |
speed_shipping |
no |
true |
Speed of preparation supplier
|
id_product |
no |
true |
id product |
reference |
no |
true |
Reference of product |
product_name |
no |
true |
Name of product |
ean |
no |
true |
ean code |
qty_reserved |
no |
true |
Qty reserved from the store |
qty_sent |
no |
true |
Qty sent |
retail_price |
no |
true |
Retail price |
discount |
no |
true |
Discount |
price |
no |
true |
Sales price |
extra_discount |
no |
true |
Extra discount |
net_price |
no |
true |
Netto final price |
user_id_order |
no |
true |
id order final customer |
user_id_user |
no |
true |
id final customer |
user_company_name |
no |
true |
Title final customer (Mr, Ms, etc) |
user_first_name |
no |
true |
First name |
user_last_name |
no |
true |
Last Name |
user_address |
no |
true |
Address |
user_city |
no |
true |
City |
user_country |
no |
true |
Province |
user_zipcode |
no |
true |
ZIP code |
user_state |
no |
true |
Country |
user_phone |
no |
true |
Telephone |
user_mobile |
no |
true |
Mobile |
user_mail |
no |
true |
|
user_retail_price |
no |
true |
Retail price user store |
user_discount |
no |
true |
Discount client |
user_price |
no |
true |
Sales price |
user_cod |
no |
0 |
Payment by COD (cod: Cache on Delivery ). Two values are possible:
Default : 0 |
user_note |
no |
true |
Note of client |
internal_note |
no |
true |
Internal note of partner |
order_status |
no |
true |
Order status |
order_tracking_company |
no |
true |
Client number of customer courier |
order_tracking_number |
no |
true |
tracking number shipment |
created_at |
no |
true |
Date of order created |
last_update |
no |
true |
Date of last update |
Reply parameters:
Parameter |
Always present |
Note |
success |
yes |
true o false, indicated if the operation has been completed correctly or not. |
rc |
yes |
return code. |
message |
yes |
Error message |
num_rows |
yes ( if rc != -4 ) |
Number of rows from the request |
rows |
yes ( if rc != -4 ) |
Root of tree from the selected data |
id_order_strore |
no |
id order store |
id_catalog |
no |
id catalog |
catalog_name |
no |
Name catalog |
id_supplier |
no |
id supplier |
speed_shipping |
no |
Speed of preparation of supplier
|
id_product |
no |
id product |
reference |
no |
Reference number |
product_name |
no |
Name product |
ean |
no |
ean code |
qty_reserved |
no |
Qty reserved |
qty_sent |
no |
Qty sent by shipment |
qty_sent |
no |
Qty sent by shipment |
retail_price |
no |
Retail price |
discount |
no |
Discount |
price |
no |
Sales price |
extra_discount |
no |
Extra discount |
net_price |
no |
Netto final price |
user_id_order |
no |
id order partner |
user_id_user |
no |
id user partner |
user_company_name |
no |
Title of person (Mr, Ms, etc) |
user_first_name |
no |
Fist name |
user_last_name |
no |
Last name |
user_address |
no |
Address |
user_city |
no |
City |
user_country |
no |
Province |
user_zipcode |
no |
ZIP code |
user_state |
no |
Country |
user_phone |
no |
Telephone |
user_mobile |
no |
Mobile |
user_mail |
no |
|
user_retail_price |
no |
prezzo di vendita store |
user_discount |
no |
Discount client |
user_price |
no |
User pcei |
user_cod |
no |
Payment by COD (cod: Cache on Delivery ). Two values are possible:
Default : 0 |
user_note |
no |
Note of client |
internal_note |
no |
Internal note |
order_status |
no |
Status order 0 - New 1 - Ready 2 - Logistic Locked 3 - Complete. Order Shipped 4 - Complete. Order Shipped Zero Items |
order_tracking_company |
no |
Client code courier |
order_tracking_number |
no |
tracking number shipment |
created_at |
no |
Data created of order |
last_update |
no |
Last update |
This call can have the following error messages:
- -2 Access Denied
- -4 Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
- -14 Unable to proceed. User does not have permission to perform this action
In the situation of error -2 or -4, the following fields will not be present: 'Items' and the details of these items.
Json request structure:
{ "uid" : "12345", "pid" : "2", "lid" : "1", "key” : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" : "1.0.0", "request": "get_order_items", "search": { "from": "2013-09-19 00:00:00", "to": "2013-09-21 23:59:59", "status": "*", "row_max": 3, "page": 2 }, "display": { "id_order_store": true, "id_catalog": true, "id_supplier": true, "speed_shipping": true, "catalog_name": true, "catalog_name": true, "catalog_name": true, "id_product": true, "reference": true, "product_name": true, "ean": true, "qty_reserved": true, "qty_sent": true, "retail_price": true, "discount": true, "price": true, "extra_discount": true, "net_price": true, "user_id_order": true, "user_id_user": true, "user_company_name": true, "user_first_name": true, "user_last_name": true, "user_address": true, "user_city": true, "user_country": true, "user_zipcode": true, "user_state": true, "user_phone": true, "user_mobile": true, "user_mail": true, "user_retail_price": true, "user_discount": true, "user_price": true, "user_cod": true, "user_note": true, "internal_note": true, "order_status": true, "order_tracking_company": true, "order_tracking_number": true, "created_at": true, "last_update": true } } |
Example php call:
$data = array( "uid" => 12345, "pid" => 2, "lid" => 1, "key" => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" => "1.0.0", "request" => "get_order_items", "search" => array( "from" => "2013-09-19 00:00:00", "to" => "2013-09-21 23:59:59", "status" => "*", "row_max" => 3, "page" => 1, ), "display" => array( "id_order_store" => true, "id_catalog" => true, "catalog_name" => true, "id_supplier" => true, "speed_shipping" => true, "id_product" => true, "reference" => true, "product_name" => true, "ean" => true, "qty_reserved" => true, "qty_sent" => true, "retail_price" => true, "discount" => true, "price" => true, "user_id_order" => true, "user_id_user" => true, "user_company_name" => true, "user_first_name" => true, "user_last_name" => true, "user_address" => true, "user_city" => true, "user_country" => true, "user_zipcode" => true, "user_state" => true, "user_phone" => true, "user_mobile" => true, "user_mail" => true, "user_retail_price" => true, "user_discount" => true, "user_price" => true, "user_cod" => true, "user_note" => true, "internal_note" => true, "order_status" => true, "order_tracking_company" => true, "order_tracking_number" => true, "created_at" => true, "last_update" => true )
); $data = array('data' => json_encode($data)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://dev.dropshippingb2b.com/api/"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $ce = curl_exec($ch); // in $ce la risposta alla chiamata echo $ce; curl_close($ch); |
Example of a positive response with no records
{ "success": true, "rc": 0, "message": "", "num_rows":0 } |
Example of positive results wiht more records
{ "success": true, "rc": 0, "message": "", "num_rows": 3, "insert_id": 0, "rows": [{ "id_order": "4", "id_order_store": "15", "id_catalog": "277", "catalog_name": "TIMEX", "id_supplier": 18, "speed_shipping": 1, "id_product": "110032", "reference": "T5K647", "product_name": "Timex Timex Marathon T5K647", "ean": "", "qty_reserved": "1", "qty_sent": "0", "retail_price": "39.00", "discount": "65.00", "price": "13.65", "user_id_order": "22", "user_id_user": "33", "user_company_name": "Ms", "user_first_name": "Matilda", "user_last_name": "Dale", "user_address": "10 Horner Street", "user_city": "Akron", "user_country": "OH", "user_zipcode": "44307", "user_state": "United States", "user_phone": "330-977-0601", "user_mobile": "330-977-0602", "user_mail": "MatildaDale@rhyta.com", "user_retail_price": "1000.00", "user_discount": "50.30", "user_price": "497.00", "user_cod": "1", "user_note": "dGVzdG8gY2xpZW50ZQ==", "internal_note": "dGVzdG8gZXNlcmNlbnRl", "order_status": "0", "order_tracking_company": "", "order_tracking_number": "", "created_at": "2013-09-20 12:21:06", "last_update": "2013-09-20 12:21:06" }, { "id_order": "5", "id_order_store": "15", "id_catalog": "277", "catalog_name": "TIMEX", "id_supplier": 18, "speed_shipping": 1, "id_product": "110032", "reference": "T5K647", "product_name": "Timex Timex Marathon T5K647", "ean": "", "qty_reserved": "1", "qty_sent": "0", "retail_price": "39.00", "discount": "65.00", "price": "13.65", "user_id_order": "22", "user_id_user": "33", "user_company_name": "Ms", "user_first_name": "Matilda", "user_last_name": "Dale", "user_address": "10 Horner Street", "user_city": "Akron", "user_country": "OH", "user_zipcode": "44307", "user_state": "United States", "user_phone": "330-977-0601", "user_mobile": "330-977-0602", "user_mail": "MatildaDale@rhyta.com", "user_retail_price": "1000.00", "user_discount": "50.30", "user_price": "497.00", "user_cod": "1", "user_note": "dGVzdG8gY2xpZW50ZQ==", "internal_note": "dGVzdG8gZXNlcmNlbnRl", "order_status": "0", "order_tracking_company": "", "order_tracking_number": "", "created_at": "2013-09-20 12:21:06", "last_update": "2013-09-20 12:21:06" }, { "id_order": "6", "id_order_supplier": "15", "id_catalog": "562", "catalog_name": "TISSOT", "id_supplier": 18, "speed_shipping": 1, "id_product": "107825", "reference": "T0064241605300", "product_name": "TISSOT - LE LOCLE U AUTO RIS.CAR. C.NER", "ean": "7611608226476", "qty_reserved": "1", "qty_sent": "0", "retail_price": "1035.00", "discount": "40.00", "price": "621.00", "user_id_order": "22", "user_id_user": "33", "user_company_name": "Mr.", "user_first_name": "Arabella", "user_last_name": "Palermo", "user_address": "Bayreuther Strasse 14", "user_city": "Offenbach", "user_country": "am", "user_zipcode": "63073", "user_state": "Germany", "user_phone": "069 82 66 04", "user_mobile": "069 82 66 07", "user_mail": "ArabellaPalermo@dayrep.de", "user_retail_price": "1000.00", "user_discount": "50.30", "user_price": "497.00", "user_cod": "1", "user_note": "dGVzdG8gY2xpZW50ZQ==", "internal_note": "dGVzdG8gZXNlcmNlbnRl", "order_status": "0", "order_tracking_company": "", "order_tracking_number": "", "created_at": "2013-09-20 12:21:06", "last_update": "2013-09-20 12:21:06" }] } |
Example resuls negative Json:
{ "success": false, "rc": -4, "message”: "Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it" } |
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease