get_bundle_list


Lists all bundles in your cart, indicating the bundle code and all items associated with it



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



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

num_items

yes

Number of Bundle available

items

no

Root Bundle List

    bundle

no

Bundle Name

    items

no

items belonging to the bundle


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



Json request structure:


{

    "uid": 12345,

    "pid": 2,

    "lid": 1,

    "key": "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

    "api_version": "1.0.0",

    "request": "get_bundle_list"

}



Example php call:



$data = array(

    "uid"           => 12345,

    "pid"           => 2,

    "lid"           => 1,

    "key"           => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

    "api_version"   => "1.0.0",

    "request"       => "get_bundle_list"

);



$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 with two elements


{

   "success":true,

   "rc":0,

   "message":"",

   "num_items":2,

   "items":[

      {

         "bundle":"A",

         "items":"4,5,6"

      },

      {

         "bundle":"B",

         "items":"7,8"

      }

   ]

}



Example of a positive response with zero elements


{

   "success":true,

   "rc":0,

   "message":"",

   "num_items":0

}



Example of 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: Qt Help documentation made easy