1. Home
  2. /
  3. mformula電子カタログ
  4. /
  5. API
  6. /
  7. 顧客
  8. /
  9. APIを介して国から州のリストを取得する方法は?

APIを介して国から州のリストを取得する方法は?

url:http://www.namedoseusite.com.br/api_customers.php?country_id = country_id&

パラメーター フォーマット 説明
country_id get

国の番号ID
APIを確認して国のリストを取得する
番号のみが必要です
形式:int(11)
*フィールドが必要< /p>

phpサンプル:

//サンプル税関状態リスト

$ add_query_order =&#39;&#39 ;;
$ country_id =&#39;&#39 ;;
if($ country_id!=&#39;&#39;){
$ add_query_order。=&#39;&amp; country_id =&#39; $ country_id;
}

$ url = $ tabain_url。 &#39; /api_customers.php?action = customs_state&#39;

$ ch = curl_init($ url);
curl_setopt($ ch、curlopt_returntransfer、true);
curl_setopt($ ch、curlopt_ssl_verifypeer、false);
curl_setopt($ ch、curlopt_httpheader、array(
&#39; content-type:application/json&#39;、
「キャッシュコントロール:キャッシュなし」、
&#39; usuario1:&#39; 。 base64_encode($ usuario1)、
&#39; Password1:&#39; 。 base64_encode($ password1)))
);

$ result = curl_exec($ ch);
curl_close($ ch);

print_r($ result);

//サンプル顧客の状態リストeof

返品:

id
テキスト< /p>

コメントを残す 0