1. Home
  2. /
  3. MFORMULA ELEKTRONISCHER KATALOG
  4. /
  5. API Dropshipping
  6. /
  7. Anfragen
  8. /
  9. URL: http://www.namedoseusiten.com.br/api_ds_orders.php?action=calculate_shipping&amntry= l. ...

URL: http://www.namedoseusiten.com.br/api_ds_orders.php?action=calculate_shipping&amntry= l.

Header Parameter Format
Token Base64_encode ()
Secret Base64_encode ()
E -Mail Base64_encode ()

Parameter Format Beschreibung Land Get Landnummer
Nur Zahl ist erforderlich < /td> post_code Get Zustellpostleitzahl ist erforderlich products_id json Verwenden Sie die API, um die Bestelldaten aufzulisten, um das product_id
Format zu erhalten: int (11) < /td> products_quantity json Mengenzahl
Nur Zahl ist erforderlich < /td>

PHP -Probe:

  // Beispiel Calculate_Shipping
 
 $ Url = $ tabain_url. ' /api_ds_orders.php? Action = calculate_shipping & amp; Country = ' $ _ Get [' Country ']. ' & amp; post_code = '###### 39; post_code '];
 
 $ Data_products [0] = array ("products_id" = & gt; $ _get [' products_id '], // Beispiel: 130 (nur die Nummer ist erforderlich) * Feld erforderlich
 "Products_quantity" = & gt; $ _Get [' Products_quantity '] // Beispiel: 1 (nur Nummer ist erforderlich) * Feld erforderlich
 );
 
 $ Data_products [1] = array ("products_id" = & gt; $ _get [' products_id1 '], // Beispiel: 130 (nur die Nummer ist erforderlich) * Feld erforderlich
 "Products_quantity" = & gt; $ _Get [' Products_quantity1 '] // Beispiel: 1 (nur Nummer ist erforderlich) * Feld erforderlich
 );

 $ Data = array ("products" = & gt; $ data_products // * Feld erforderlich
 );
 
 $ 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_sl_verifypeer, false);
 Curl_setopt ($ ch, curlopt_httpHeader, Array (Array (
 ' Inhaltstyp: Anwendung/JSON ',,
 "Cache-Control: No-Cache",
 ' Token: ' . Basis64_CODE ($ token),
 ' Geheimnis: ' . Basis64_CODE ($ Secret),
 ' E-Mail: ' . Basis64_CODE ($ E -Mail),
 ' Inhaltslänge: ' . Strlen ($ data_string))))
 );
 
 $ result = curl_exec ($ ch);
 Curl_close ($ ch);

 print_r ($ result);
 
 // Beispiel calculate_shipping eof  

return:

id
text < /p>

URL: http://www.namedoseusiten.com.br/api_ds_orders.php?action=calculate_shipping&amntry= l.


Header Parameter Format
Token Base64_encode ()
Secret Base64_encode ()
E -Mail Base64_encode ()

Parameter Format Beschreibung

Land Get Landnummer
Nur Zahl ist erforderlich < /td>

post_code Get Zustellpostleitzahl ist erforderlich

products_id json Verwenden Sie die API, um die Bestelldaten aufzulisten, um das product_id
Format zu erhalten: int (11) < /td>

products_quantity json Mengenzahl
Nur Zahl ist erforderlich < /td>

PHP -Probe:

  // Beispiel Calculate_Shipping

$ Url = $ tabain_url. ' /api_ds_orders.php? Action = calculate_shipping & amp; Country = ' $ _ Get [' Country ']. ' & amp; post_code = '###### 39; post_code '];

$ Data_products [0] = array ("products_id" = & gt; $ _get [' products_id '], // Beispiel: 130 (nur die Nummer ist erforderlich) * Feld erforderlich
"Products_quantity" = & gt; $ _Get [' Products_quantity '] // Beispiel: 1 (nur Nummer ist erforderlich) * Feld erforderlich
);

$ Data_products [1] = array ("products_id" = & gt; $ _get [' products_id1 '], // Beispiel: 130 (nur die Nummer ist erforderlich) * Feld erforderlich
"Products_quantity" = & gt; $ _Get [' Products_quantity1 '] // Beispiel: 1 (nur Nummer ist erforderlich) * Feld erforderlich
);

$ Data = array ("products" = & gt; $ data_products // * Feld erforderlich
);

$ 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_sl_verifypeer, false);
Curl_setopt ($ ch, curlopt_httpHeader, Array (Array (
' Inhaltstyp: Anwendung/JSON ',,
"Cache-Control: No-Cache",
' Token: ' . Basis64_CODE ($ token),
' Geheimnis: ' . Basis64_CODE ($ Secret),
' E-Mail: ' . Basis64_CODE ($ E -Mail),
' Inhaltslänge: ' . Strlen ($ data_string))))
);

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

print_r ($ result);

// Beispiel calculate_shipping eof

return:

id
text < /p>

Schreibe einen Kommentar 0