How to obtain the list of regions registered via API?

URL: http://www.namedoseusite.com.br/api_seller_products_ots.php?action=zones





Header Parameter format
token base64_encode ()
Secret base64_encode ()
email base64_encode ()

Php Sample:

 // sample zones

if ($ _Get [' Action '] == ' Zones ') {

$ URL = $ tabain_url. ' /api_seller_products_others.php? Action = zones ' ;;

$ data = array ("country_id" = & gt; $ _get [' country_id '] // country id (only number is refied) * Field Required
);

$ data_string = json_encode ($ date);

$ CH = curl_init ($ URL);
Curl_Setopt ($ CH, curlopt_customrequest, "post");
Curl_Setopt ($ CH, Curlopt_postFields, $ Data_String);
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),
' CONTENT-LENGTH: ' . Strlen ($ data_string)))
);

$ result = curl_exec ($ CH);
Curl_Close ($ CH);

print_r ($ result);

}

// sample zones EOF

return:

id
Text

Leave a Reply 0