delete_bundle_items
update_bundle
Questa chiamata consente di rimuovere uno o più prodotti al bundle.
- Se lo shipping_item indicato è lo stesso già in uso, allora tutte le modifiche eseguite all'indirizzo di invio restano valide.
- Se lo shipping_item cambia, il nuovo indirizzo di riferimento viene sostituito irrevocabilmente a quello esistente e tutte le modifiche all'indirizzo andranno perse.
- Se viene rimosso il prodotto a cui è assegnato lo shipping_item allora è obbligatorio selezionarne uno nuovo. Tutte le modifiche all'indirizzo andranno perse
Call parameters:
Parameter |
Required |
Note |
uid |
yes |
Id client |
pid |
yes |
Id Portal |
lid |
yes |
id Language |
key |
yes |
Autentication Code |
api_version |
yes |
API Version. |
request |
yes |
Name of function requested |
items |
yes |
List of id_basket to be included in the bundle. |
shipping_item |
yes |
id_basket product that will be used as the main shipping address. This value must be selected only inside the items list. |
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 |
This call can have the following error messages:
- -1 Sintax Error
- -2 Access Denied
- -3 The number of items requested are greater than those available in the bundle selected 1,2,3,4,5 vs 1,2,3
- -4 Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
- -6 Field [bundle|items|shipping_item] si mandatory
- -12 id_basket [id_basket] not found
- -14 Unable to proceed. User does not have permission to perform this action
- -29 The Bundle specified does not exist
- -30 Unable to find basket product into the bundle. Please check if they were removed from another interface/call or contact webmaster@wwt.it
- -31 The item specified does not exist into the bundle.
- -32 Shipping Item can not be contained in the items to be deleted
- -33 Shipping Item does not belong to the bundle
Json request structure:
{ "uid": 12345, "pid": 2, "lid": 1, "key": "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version": "1.0.0", "request": "delete_bundle_items", "bundle": "A", "items": "1;2", "shipping_item" => "5" } |
Example php call:
$data = array( "uid" => 12345, "pid" => 2, "lid" => 1, "key" => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "api_version" => "1.0.0", "request" => "delete_bundle_items", "bundle" => "A", "items" => "1;2", "shipping_item" => 5 ); $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); echo $ce; curl_close($ch); |
Example of a positive response:
{ "success":true, "rc":0, "message":"" } |
Example of negative response:
{ "success":false, "rc":-32, "message":"Shipping Item does not belong to the bundle" } |
Created with the Personal Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation