get_shipping_company
This call show all shipping company available.
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, indicated if the operation has been completed correctly 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 couriers) |
Bow data section |
cod |
yes ( se rc >= 0 and there are couriers) |
Courier code |
name |
yes ( se rc >= 0 and there are couriers) |
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_company" } |
Example php call:
$data = array( "uid" => 12345, "pid" => 2, "lid" => 1, "key" => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" => "1.0.0", "request" => "get_shipping_company" ); $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 the response call echo $ce; curl_close($ch); |
Positive response example without record
{ "success": true, "rc": 0, "message": "", "num_rows":0 } |
Positive response example with more records
{ "success": true, "rc": 0, "message": "", "num_rows": 3, "rows": [{ "cod": "FEDEX", "name": "FEDEX", }, { "cod": "UPS", "name": "UPS", }, { "cod": "TNT", "name": "TNT", }] } |
Possible negative Json 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: Create help files for the Qt Help Framework