get_shipping_country
This call show all country available for shipping
Call parameters:
Parameter |
Required |
Default |
Note |
uid |
si |
Id client |
|
pid |
si |
Id Portal |
|
lid |
si |
id Language |
|
key |
si |
Authentication code |
|
api_version |
si |
API Version |
|
request |
si |
Name of function requested |
Reply parameters:
Parameter |
Always present |
Note |
success |
si |
true o false, indicate if operation has been completed or not |
rc |
si |
return code. |
message |
si |
Error message |
num_rows |
si ( se rc >= 0) |
Number of lines obtained from request |
rows |
yes ( se rc >= 0 and there are Country to show) |
Row data section |
cod |
yes ( se rc >= 0 and there are Country to show) |
Courier code |
name |
yes ( se rc >= 0 and there are Country to show) |
Courier name |
In this section message can be finded error messages
- -2 Access Denied
- -4 Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
- -14 Unable to proceed. User does not have permission to perform this action
In the case of error -2, -4 and -14, rows field will not appear.
Json request structure:
{ "uid" : "12345", "pid" : "2", "lid" : "1", "key” : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" : "1.0.0", "request" : "get_shipping_country", } |
Example of php request:
$data = array( "uid" => 12345, "pid" => 2, "lid" => 1, "key" => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" => "1.0.0", "request" => "get_shipping_country", ); $data = array('data' => json_encode($data)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://dev.dropshippingb2b.com/api/"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $ce = curl_exec($ch); // in $ce la risposta alla chiamata echo $ce; curl_close($ch); |
Example of a positive response without record
{ "success": true, "rc": 0, "message": "", "num_rows":0 } |
Example of a positive response with some records
{ "success": true, "rc": "0", "message": "", "num_rows": 239, "rows": [{ "cod": "2", "name": "Italy" }, { "cod": "5", "name": "Austria" }, { "cod": "6", "name": "Belgium" }] } |
Example of a negative response:
{ "success": false, "rc": -4, "message”: "Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it" } |
Created with the Personal Edition of HelpNDoc: Full-featured Help generator