How to obtain the list of states from countries via API?
URL: http://www.Namedoseusite.com.br/api_customers.php?country_id=Country_id&
Parameter | format | description |
country_id | get |
Number of the Country ID |
Php Sample:
// sample customs state list$ add_Query_order = ' ' ;;
$ country_id = ' ' ;;
if ($ country_id! = ' ') {
$ add_Query_order. = ' & amp; country_id = ' $ country_id;
}$ URL = $ tabain_url. ' /api_customers.php? Action = customs_state '
$ 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),
' password1: ' . base64_encode ($ password1)))
);$ result = curl_exec ($ CH);
Curl_Close ($ CH);print_r ($ result);
// sample Customers State list eof
return:
id
Text