How to get the list of orders registered via API?
URL: http://www.namedoseusite.com.br/api_orders.php?cid=& ;postalcode=& ;cname=& ;Email=& ;status=& ;payment=& = & amp; date_from = & amp; date_from = & amp; action = orders_list
Parameter | format | description |
cid | get |
Customer ID |
Postalcode | get | Post code of the shipping Address or Customer Address Only Number is Required Example: 04267000 |
cname | get | Customer Name |
get | Email Address of the Customer | |
Status | get | Status for Filter Orders Check the Api to Get the Status |
Payment | get | Payment for Filter The Orders |
Signature_reactering | get | 1 = active or 0 = inactive Only number is Required |
CANCEL_SINATURE_RECORING | get | 1 = active or 0 = inactive Only number is Required |
date_from | get | Date from for Filter Orders Example: dd/mm/yyyy |
date_to | get | Date to for Filter Orders Example: DD/mm/yyyy |
Php Sample:
// sample list orders$ add_Query_order = ' ' ;;
$ cid = ' ' ;;
if ($ cid! = ' ') {
$ add_Query_order. = ' & amp; cid = ' $ cid;
}
$ postalcode = ' ' ;;
if ($ postalcode! = ' ') {
$ add_Query_order. = ' & amp; postalcode = ' $ postalcode;
}
$ cname = ' ' ;;
if ($ cname! = ' ') {
$ add_Query_order. = ' & amp; cname = ' $ cname;
}
$ email = ' ' ;;
if ($ email! = ' ') {
$ add_Query_order. = ' & amp; email = ' $ email;
}
$ status = ' ' ;;
if ($ status! = ' ') {
$ add_Query_order. = ' & amp; status = ' $ status;
}
$ Payment = ' ' ;;
if ($ payment! = ' ') {
$ add_Query_order. = ' & amp; Payment = '
}
$ SIGNATURE_RECRER = ' ' ;;
IF ($ Subscribing_Current! = ' ') {
$ add_Query_order. = ' & amp; subscriber's subscription = '
}
$ cancel_sinatura_recurrent = ' ' ;;
if ($ cancel_sinatura_reactering! = ' ') {
$ add_Query_order. = ' & amp; cancel_sinature_reacterive = '
}
$ date_from = ' ' ;;
if ($ date_from! = ' ') {
$ add_Query_order. = ' & amp; date_from = ' $ date_from;
}
$ date_to = ' ' ;;
if ($ date_to! = ' ') {
$ add_Query_order. = ' & amp; date_to = ' $ date_to;
}$ URL = $ tabain_url. ' /api_orders.php? Action = Orders_List ' $ add_Query_order;
$ CH = curl_init ($ URL);
Curl_Setopt ($ CH, Curlopt_Returntransfer, True);
curl_setopt ($ CH, curlopt_ssl_verifypeer, false);
Curl_Setopt ($ CH, Curlopt_httpheader, Array (
' CONTENT-TYPE: Application/JSON ',
"Cache-Control: No-Cache",
' Usuario1: ' . base64_encode ($ Usuario1),
' password1: ' . base64_encode ($ password1)))
);$ result = curl_exec ($ CH);
Curl_Close ($ CH);print_r ($ result);
// sample List Orders EOF
return:
Orders_id
Customers_Name
Customers_email_address
Order_Total
Date_Purchased
Orders_status_Name
Payment_method