How to obtain the list of registered Customers via API?


URL: http://www.nomedoseusite.com.br/api_customers.php?cID=&search=&date_from=&date_to=&status=&customers_groups_id=&customers_language=&action=customers

Parameter Format Description
search GET

search by customer name, last name or email address
Only text 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
status GET Status for filter orders
1 = ACTIVE or 0 = INACTIVE
Only number is required
customers_groups_id GET Customers Groups for filter orders
Check the API to get the Customers Groups Id
Only number is required 
customers_language GET english, espanol, japanese or portugues

PHP Sample:

	// sample customers list

	$add_query_order = '';
	$search = '';
	if ($search != '') {
		$add_query_order .= '&search='.$search;
	}
	$date_from = '';
	if ($date_from != '') {
		$add_query_order .= '&date_from='.$date_from;
	}
	$date_to = '';
	if ($date_to != '') {
		$add_query_order .= '&date_to='.$date_to;
	}
	$status = '';
	if ($status != '') {
		$add_query_order .= '&status='.$status;
	}
	$customers_groups_id = '';
	if ($customers_groups_id != '') {
		$add_query_order .= '&customers_groups_id='.$customers_groups_id;
	}
	$customers_language = '';
	if ($customers_language != '') {
		$add_query_order .= '&customers_language='.$customers_language;
	}
	
	$url = $domain_url . '/api_customers.php?action=customers'.$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 customers list eof

Return:

Obs: Limit of 1000 customers per consult

customers_id
customers_lastname
customers_firstname
date_account_created
referral
customers_status

2018-08-30 13:12 MFORMULA {writeRevision}
Average rating: 0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

{debugMessages}