Login


All the requests must contain the following authentication data:


Parameter

Required

Note

uid int(10)

yes

Id client

pid  int(10)

yes

Id Portal

lid int(10)

yes

id Language


When you receive login access data a default lid value is provided.

However, this value is not binding and can be changed allowing the  product description download (name field) in the various languages provided by the Dropshipping platform.


Below the map lid <=> Language


LID

LANGUAGE

1

Italian

2

English

3

German

4

French

5

Spanish

6

Portuguese

7

Czech

8

Dutch

9

English UK

10

Greek

11

Australian

12

Brazilian

13

Slovak store b2bhodinky.cz

14

Slovak store b2bsk.sk

15

Swedish

16

Polish

17

Romanian



key  string(32)

yes

Authentication code

api_version  string(10)

yes

Version API


And it will always be followed by the field request


Json is the structure of:


{

  "uid"         : "12345",

  "pid"         : "2",

  "lid"         : "1",

  "key”         : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

  "api_version" : "1.0.0",

  "request"     : "get_brands"

}



Example of php request:



$data = array(

              "uid"            => "12345",

              "pid"                => "2",

              "lid"              => "1",

              "key"              => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

              "api_version"        => "1.0.0"

                 "request"          => "get_brands"

);


$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);


$esito = curl_exec($ch); // in $esito is the result of the call.


echo $esito;


curl_close($ch);




Example of html request:


<html>

    <body>

        <form method=”POST” action=”https://dev.dropshipping.com/api/”>

            <input type=”text” name=“data” value=’{"uid":"12345", "pid":"2", "lid":"2", "key" : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8", "request": "get_brands"}’>

            <input type=”submit” value=”Submit” name=”Submit”>

        </form>

    </body>

</html>


Example of curl request:



[user@server ~]# curl -k  --data 'data={"uid":"12345", "pid":"2", "lid":"2", "key" : "VtKpudWnzRBioQeBKQXPBdSpamppUTw8","api_version":"1.0.0","request":"get_brands"}' https://dev.dropshippingb2b.com/api/



Example of VisualBasic .NET request:


Imports System.Net


Using client As New WebClient


    Dim result As String

   

    client.Encoding = System.Text.Encoding.UTF8

    client.Headers.Add("Content-Type", "application/x-www-form-urlencoded")

    result = client.UploadString("https://dev.dropshippingb2b.com/api/", "data={""uid"":""12345"",""pid"":""1"",""lid"":""1"",""key"":""VtKpudWnzRBioQeBKQXPBdSpamppUTw8"",""api_version"":""1.0.0"",""request"":""get_brands""}")


End Using



All responses will have the three field as below, followed by the actual requested data.


Parameter

Note

success (boolean)

Indicates if the request has been successful

rc  int(10)

Indicated the return code

rc >= 0 Successful

rc <= Error

Go to the end of this guide for a complete list of errors.

message  string(255)

Description of the error. This field is only filled in case of an error.


With a succesful request, this is the Json structure response:


{

  "success" : true,

  "rc"      : 0,

  "message" : ""

}


With a negative reply: this is the Json structure response:


{

  "success": false,

  "rc": -2,

  "message”: "Access Denied"

}



This message can have the following error description:


  • -2 Access Denied
  • -4 Fatal Error: There was an internal Error. Please retry or contact webmaster@wwt.it















Created with the Personal Edition of HelpNDoc: What is a Help Authoring tool?