URL: http://www.nomedoseusite.com.br/api_orders.php?cID=&postalcode=&cName=&email=&status=&payment=&assinatura_recorrente=&cancel_assinatura_recorrente=&date_from=&date_from=&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 | E-mail address of the customer | |
status | GET | Status for filter orders Check the API to get the Status |
payment | GET | Payment for filter the orders |
assinatura_recorrente | GET | 1 = ACTIVE or 0 = INACTIVE Only number is required |
cancel_assinatura_recorrente | 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 .= '&cID='.$cID; } $postalcode = ''; if ($postalcode != '') { $add_query_order .= '&postalcode='.$postalcode; } $cName = ''; if ($cName != '') { $add_query_order .= '&cName='.$cName; } $email = ''; if ($email != '') { $add_query_order .= '&email='.$email; } $status = ''; if ($status != '') { $add_query_order .= '&status='.$status; } $payment = ''; if ($payment != '') { $add_query_order .= '&payment='.$payment; } $assinatura_recorrente = ''; if ($assinatura_recorrente != '') { $add_query_order .= '&assinatura_recorrente='.$assinatura_recorrente; } $cancel_assinatura_recorrente = ''; if ($cancel_assinatura_recorrente != '') { $add_query_order .= '&cancel_assinatura_recorrente='.$cancel_assinatura_recorrente; } $date_from = ''; if ($date_from != '') { $add_query_order .= '&date_from='.$date_from; } $date_to = ''; if ($date_to != '') { $add_query_order .= '&date_to='.$date_to; } $url = $domain_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), 'Senha1: ' . base64_encode($senha1)) ); $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