0 utilizadores on-line |
0 Convidados e 0 Registados

Como obter a lista de Pedidos cadastrados via API ?


URL: http://www.nomedoseusite.com.br/api_seller_orders.php?cID=&postalcode=&cName=&email=&status=&payment=&assinatura_recorrente=&cancel_assinatura_recorrente=&date_from=&date_from=&action=orders_list

 

Header Parameter Format
Token base64_encode()
Secret base64_encode()
E-mail base64_encode()

 

Parameter Format Description
cID GET

Customer Id
Only number is required
Check the API to get the Customer Id

postalcode GET Post code of the shipping address or customer address
Only number is required
Example: 04267000
cName GET Customer name
email 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 = '';
	if ($_GET['status'] != '') {
		$add_query_order .= '&status='.$_GET['status'];
	}else{
		$add_query_order .= '';
	}
	
	$url = $domain_url . '/api_seller_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", 
		'Token: ' . base64_encode($token),
		'Secret: ' . base64_encode($secret),
		'E-mail: ' . base64_encode($email))
	);                                                                                                                    
																														 
	$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

2018-08-30 22:04 MFORMULA FAQ {writeRevision}
Avaliação média: 0 (0 Avaliações)

Não pode comentar este artigo

Chuck Norris has counted to infinity. Twice.

{debugMessages}