Come ottenere l’elenco dei clienti registrati tramite API?
URL: http://www.namedoseusite.com.br/api_customers.php?cid=& search = & amp; date_from = & amp; date_to = & amp; status = & am; = clienti
parametro | formato | Descrizione |
Search | get |
Ricerca per nome del cliente, cognome o indirizzo e -mail |
date_from | get | Data da per gli ordini di filtro Esempio: dd/mm/aaaa |
date_to | get | Data a per ordini di filtro Esempio: dd/mm/yyyy |
stato | get | Stato per gli ordini di filtro 1 = attivo o 0 = inattivo è richiesto un solo numero |
clienti_groups_id | get | Gruppi di clienti per ordini di filtro Controlla l’API per ottenere i gruppi di clienti ID è richiesto un solo numero |
Clienti_Language | get | inglese, spagnolo, giapponese o portoghese |
campione PHP:
$ add_query_order = ' ' ;;
$ Search = ' ' ;;
if ($ search! = ' ') {
$ add_query_order. = ' & amp; search = ' $ Search;
}
$ 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;
}
$ status = ' ' ;;
if ($ status! = ' ') {
$ add_query_order. = ' & amp; status = ' $ status;
}
$ customs_groups_id = ' ' ;;
if ($ customs_groups_id! = ' ') {
$ add_query_order. = ' & amp; customs_groups_id = '
}
$ Customs_Language = ' ' ;;
if ($ customs_language! = ' ') {
$ add_query_order. = ' & amp; customs_language = '
}
$ Url = $ tabain_url. ' /pi_customers.php? Action = Customs ' ;. $ 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 (
' tipo di contenuto: Applicazione/JSON ',
“Cache-Control: No-Cache”,
' usuario1: ' . base64_encode ($ usuario1),
' password1: ' . base64_encode ($ password1)))
);
$ result = curl_exec ($ ch);
CURL_CLOSE ($ CH);
print_r ($ risultato);
// Esempio di elenchi di clienti EOF re>
return:
NOTA: limite di 1000 clienti per consulenza
clienti_id
clienti_lastname
clienti_firstname
date_account_created
referral
clienti_status