add_internal_message_order


This request will add an internal message to the order if needed in base_64.



Call parameters:


Parameter

Required

Note

uid

yes

Id client

pid

yes

Id Portal

lid

yes

id Language

key

yes

Code of authetication

api_version  

yes

Version API.

request

yes

Name of request

id_order

yes

Id order

internal_note

yes

Internal note to add in base_64



Reply parameters:


Parameter

Always present

Note

success

yes

true o false, indicates if the operation has been fully completed or not

rc

yes

return code.

message

yes

Error message


This request can have the following error messages:

  • -2  Access Denied
  • -4  Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it
  • -16 id_order {0} not found



Json request structure:


{

  "uid"           : "12345",

  "pid"           : "2",

  "lid"           : "1",

  "key”           : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

  "api_version"   : "1.0.0",

  "request"       : "get_brands",

  "id_order"      : 5,

  "internal_note" : 1

}



Example of php request:



$data = array(


               "uid"             => 12345,

               "pid"             => 2,

               "lid"             => 1,

               "key"             => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

               "api_version"     => "1.0.0",

               "request"         => "add_internal_message_order",

               "id_order"        => 5,

               'internal_note'   => base64_encode("vengo a prenderti stasera")

)

;


$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": -16,

    "message": "id_order 500 not found"

}





















Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease