delete_basket_item
This request deletes an item placed in the special API basket including the details of the final customer and put the product back in the warehouse.
Call parameters:
Parameter |
Required |
Note |
uid |
yes |
Id client |
pid |
yes |
Id Portal |
lid |
yes |
id Language |
key |
yes |
Code of authentication |
api_version |
yes |
Version API. |
request |
yes |
Name of request |
id_basket |
yes |
Id of the basket |
Reply parameters:
Parameter |
Always present |
Note |
success |
yes |
true o false, indicate if operation has been completed or not |
rc |
yes |
return code. |
message |
yes |
Error message |
This call can have the following error messages:
- -2 Access Denied
- -4 Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
- -12 id_basket {0} not found. No change has been made.
- -14 Unable to proceed. User does not have permission to perform this action
Json request structure:
{ "uid" : "12345", "pid" : "2", "lid" : "1", "key” : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" : "1.0.0", "request" : "delete_basket_item" "id_basket" : "3" } |
Example of php request:
$data = array( "uid" => 12345, "pid" => 2, "lid" => 1, "key" => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" => "1.0.0", "request" => "delete_basket_item", "id_basket" => 3 ); $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
{ "success":true, "rc":0, "message":"" } |
Example of a negative response
{ "success": false, "rc": -12, "message": "id_basket 3 not found. No change has been made" } |
Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files