Como obter a lista o número de um cliente via API ?

URL: http://www.nomedoseusite.com.br/api_customers.php?cID=CUSTOMERNUMBER&action=customers_id

Parameter Format Description
cID GET

Number of the Customer ID
Only number is required
Format: int(11)
* FIELD REQUIRED

PHP Sample

 // sample customers id list

 $add_query_order = '';
 $cID = '';
 if ($cID != '') {
 $add_query_order .= '&cID='.$cID;
 }
 
 $url = $domain_url . '/api_customers.php?action=customers_id'.$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 id list eof

Return:

entry_person_kind
customers_gender
customers_firstname
entry_rg
entry_cpf
customers_dob
customers_email_address
entry_company
entry_cnpj
entry_ie
entry_postcode
entry_street_address
entry_number
entry_completion
entry_suburb
entry_city
entry_state
customers_telephone
customers_telephone_commercial
customers_telephone_mobile
customers_fax
skype
msn
customers_newsletter
customers_groups_id
language

Deixe um comentário 0