get_brand_items   [v 1.1.0]


This request shows all products in a specific brand category.



Call parameters:


Parameter

Required

Note

uid

yes

Id client

pid

yes

Id Portal

lid

yes

id Langauge

key

yes

Autentication code

api_version  

yes

Version API.

request

yes

Name of function request

id_brand

yes

Id of brand obtained by request get_brands

display_brand_name

no

Brand name to which the product belongs

display_reference

no

Product reference

display_name

no

Product name

display_stock

no

Qty available in stock

display_weight

no

Weight of product

display_retail_price

no

Retail price

display_discount

no

Discount

display_price

no

Sales price

display_id_supplier

no

id supplier - field with number that shows the suppliers ID

display_speed_shipping

no

Display the speed of handling of warehouse

display_ean

no

Ean code

display_currency

no

Display the currency

display_icon_path

no

Shows the icon path FQDN

display_image_path

no

Shows the image path of the product FQDN

display_image_last_update

no

Show last image update

display_attributes

no

shows product attributes if available

Note:

unless explicitly requested during call (display_attributes = true), this field is not displayed


The fields not Required are filters to reduce traffic with information not requested of not needed.

All these fields are active in default, in the absence of these fields the information will be presented as default in the field of data stream.



Reply parameters:


Parameter

Always present

Note

success

yes

true or false, shows if the request was completed with success or not

rc

yes

return code.

message

yes

Error message

num_rows

no

Shows the number of records found when there are no errors

rows

no

Shows the details of the products available when there are no errors

    id_product

yes (if present in rows)

id product according to the wholesaler classification

    reference

yes (if present in rows)

Product reference according to the official brand

    brand_name

yes (if present in rows)

Name of catalog brand

    name

yes (if present in rows)

Product name

    stock

yes (if present in rows)

Qty in stock

    weight

yes (if present in rows)

Weight

    retail_price

yes (if present in rows)

Retail price

    discount

yes (if present in rows)

Discount

    price

yes (if present in rows)

Price

    id_supplier

yes (if present in rows)

id suppliers wholesaler

    speed_shipping

yes (if present in rows)

Discover the speed of preparation wholesaler

  • 0 - Slow
  • 1 - Standard
  • 2 - Express

    ean

yes (if present in rows)

EAN code

    currency

yes (if present in rows)

Currency used

    images

yes (if present in rows)

List of product images

    -    icon_path

yes (if present in rows)

Shows the icon path FQDN

    -    image_path

yes (if present in rows)

Shows the image path of the product FQDN

    -   image_last_update

yes (if present in rows)

Show last image update

    attributes

yes (if present in rows)

Where available, shows the descriptive list of the product attributes

    attributes_array

yes (if present in rows)

Detailed list of attribute

    -    group_id

yes (if present in rows)

ID of attribute group

    -    group_name

yes (if present in rows)

Attribute group label. This field is evaluated according to the chosen language (lid)

    -    value_id

yes (if present in rows)

ID of attribute value

    -    value_name

yes (if present in rows)

Attribute value label. This field is evaluated according to the chosen language (lid)



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_brand_items",

    "id_brand": 240,

    "display_brand_name":        true,

    "display_reference":         true,

    "display_name":              true,

    "display_stock":             true,

    "display_weight":            true,

    "display_retail_price":      true,

    "display_discount":          true,

    "display_price":             true,

    "display_id_supplier":       true,

    "display_speed_shipping":    true,

    "display_ean":               true,

    "display_currency":          true,

    "display_icon_path":         true,

    "display_image_path":        true,

    "display_image_last_update": true,

    "display_attributes":        true  //in order to show attributes, this field is mandatory and it's value must be true

    }

}



Example of php request:



$data = array(


               "uid"          => 12345,

               "pid"          => 2,

               "lid"          => 1,

               "key"          => "VtKpudWnzRBioQeBKQXPBdSpamppUTw8",

               "api_version"  => "1.0.0",

               "request"      => "get_brand_items",

               "id_brand"     => 240,

               "display_brand_name"        => true,

               "display_reference"         => true,

               "display_name"              => true,

               "display_stock"             => true,

               "display_weight"            => true,

               "display_retail_price"      => true,

               "display_discount"          => true,

               "display_price"             => true,

               "display_id_supplier"       => true,

               "display_speed_shipping"    => true,

               "display_ean"               => true,

               "display_currency"          => true,

               "display_icon_path"         => true,

               "display_image_path"        => true,

               "display_image_last_update" => true,

                "display_attributes"        => true

               

);



$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 request of results


echo $ce;


curl_close($ch);






Example of a positive response with products in catalog


{

    "success"true,

    "rc"0,

    "message""",

    "num_rows"12,

    "rows": [

        {

            "id_product""370529",

            "brand""DIESEL ON",

            "reference""DZT2001",

            "brand_name""DIESEL ON",

            "name""DIESEL ON Mod. DZT2001",

            "stock""3",

            "weight""200",

            "retail_price"349,

            "discount""55.00",

            "price"157.05,

            "id_supplier"68,

            "speed_shipping""2",

            "ean""4053858930803",

            "currency""€",

            "images": [

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT2001.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT2001.jpg",

                    "last_update""2019-06-07 14:14:04"

                },

                {

                    "icon_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "image_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "last_update""2020-12-07 12:22:35"

                }

            ],

            "attributes""WR: 3 ATM - Case: 48 mm - Gender: Gent - Case Material: Stainless Steel - Strap Material: Leather Strap - Movement: Quartz - Functions: Multifunction - Glass: Mineral - Product Type: Smartwatch - Packaging: Official Box",

            "attributes_array": [

                {

                    "group_id"1,

                    "group_name""WR",

                    "value_id""67",

                    "value_name""3 ATM"

                },

                {

                    "group_id"10,

                    "group_name""Case",

                    "value_id""76",

                    "value_name""48 mm"

                },

                {

                    "group_id"18,

                    "group_name""Gender",

                    "value_id""19",

                    "value_name""Gent"

                },

                {

                    "group_id"23,

                    "group_name""Case Material",

                    "value_id""24",

                    "value_name""Stainless Steel"

                },

                {

                    "group_id"36,

                    "group_name""Strap Material",

                    "value_id""43",

                    "value_name""Leather Strap"

                },

                {

                    "group_id"48,

                    "group_name""Movement",

                    "value_id""93",

                    "value_name""Quartz"

                },

                {

                    "group_id"55,

                    "group_name""Functions",

                    "value_id""60",

                    "value_name""Multifunction"

                },

                {

                    "group_id"61,

                    "group_name""Glass",

                    "value_id""63",

                    "value_name""Mineral"

                },

                {

                    "group_id"236,

                    "group_name""Product Type",

                    "value_id""241",

                    "value_name""Smartwatch"

                },

                {

                    "group_id"319,

                    "group_name""Packaging",

                    "value_id""320",

                    "value_name""Official Box"

                }

            ]

        },

        {

            "id_product""370530",

            "brand""DIESEL ON",

            "reference""DZT1011",

            "brand_name""DIESEL ON",

            "name""DIESEL ON Mod. DZT1011",

            "stock""4",

            "weight""200",

            "retail_price"299,

            "discount""55.00",

            "price"134.55,

            "id_supplier"68,

            "speed_shipping""2",

            "ean""4053858924123",

            "currency""€",

            "images": [

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT1011.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT1011.jpg",

                    "last_update""2018-10-10 07:20:02"

                },

                {

                    "icon_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "image_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "last_update""2020-12-07 12:22:35"

                }

            ],

            "attributes""Product Type: Hybrid",

            "attributes_array": [

                {

                    "group_id"236,

                    "group_name""Product Type",

                    "value_id""747",

                    "value_name""Hybrid"

                }

            ]

        },

        {

            "id_product""370532",

            "brand""DIESEL ON",

            "reference""DZT2006",

            "brand_name""DIESEL ON",

            "name""DIESEL ON Mod. FULL GUARD",

            "stock""123",

            "weight""300",

            "retail_price"349,

            "discount""55.00",

            "price"157.05,

            "id_supplier"68,

            "speed_shipping""2",

            "ean""4053858990074",

            "currency""€",

            "images": [

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT2006.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT2006.jpg",

                    "last_update""2020-03-18 16:58:01"

                },

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT2006_1590229906.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT2006_1590229906.jpg",

                    "last_update""2020-05-23 12:53:40"

                },

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT2006_1590230025.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT2006_1590230025.jpg",

                    "last_update""2020-05-23 12:53:40"

                },

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT2006_1590231207.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT2006_1590231207.jpg",

                    "last_update""2020-05-23 12:53:36"

                },

                {

                    "icon_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "image_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "last_update""2020-12-07 12:22:35"

                }

            ],

            "attributes""WR: ONLY SPLASH PROOF - Case: 48 mm - Gender: Gent - Case Material: SS IP Gun - Strap Material: Silicone - Movement: Quartz Digit - Functions: Multifunction - Glass: Mineral - Product Type: Smartwatch - Packaging: Official Box",

            "attributes_array": [

                {

                    "group_id"1,

                    "group_name""WR",

                    "value_id""340",

                    "value_name""ONLY SPLASH PROOF"

                },

                {

                    "group_id"10,

                    "group_name""Case",

                    "value_id""76",

                    "value_name""48 mm"

                },

                {

                    "group_id"18,

                    "group_name""Gender",

                    "value_id""19",

                    "value_name""Gent"

                },

                {

                    "group_id"23,

                    "group_name""Case Material",

                    "value_id""83",

                    "value_name""SS IP Gun"

                },

                {

                    "group_id"36,

                    "group_name""Strap Material",

                    "value_id""79",

                    "value_name""Silicone"

                },

                {

                    "group_id"48,

                    "group_name""Movement",

                    "value_id""50",

                    "value_name""Quartz Digit"

                },

                {

                    "group_id"55,

                    "group_name""Functions",

                    "value_id""60",

                    "value_name""Multifunction"

                },

                {

                    "group_id"61,

                    "group_name""Glass",

                    "value_id""63",

                    "value_name""Mineral"

                },

                {

                    "group_id"236,

                    "group_name""Product Type",

                    "value_id""241",

                    "value_name""Smartwatch"

                },

                {

                    "group_id"319,

                    "group_name""Packaging",

                    "value_id""320",

                    "value_name""Official Box"

                }

            ]

        }

        {

            "id_product""444298",

            "brand""DIESEL ON",

            "reference""DZT1009",

            "brand_name""DIESEL ON",

            "name""DIESEL ON Mod. DZT1009",

            "stock""2",

            "weight""200",

            "retail_price"249,

            "discount""55.00",

            "price"112.05,

            "id_supplier"68,

            "speed_shipping""2",

            "ean""4053858924109",

            "currency""€",

            "images": [

                {

                    "icon_path""https://static.wwt.it/store/1/DIESEL%20ON/icona_DZT1009.jpg",

                    "image_path""https://static.wwt.it/store/1/DIESEL%20ON/DZT1009.jpg",

                    "last_update""2020-11-03 17:37:05"

                },

                {

                    "icon_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "image_path""https://static.wwt.it/store/loghi/DIESEL%20ON.jpg",

                    "last_update""2020-12-07 12:22:35"

                }

            ],

            "attributes""WR: 5 ATM - Case: 48 mm - Gender: Gent - Case Material: Stainless Steel - Strap Material: Leather Strap - Movement: Quartz - Functions: Multifunction - Glass: Mineral - Product Type: Smartwatch - Packaging: Official Box",

            "attributes_array": [

                {

                    "group_id"1,

                    "group_name""WR",

                    "value_id""2",

                    "value_name""5 ATM"

                },

                {

                    "group_id"10,

                    "group_name""Case",

                    "value_id""76",

                    "value_name""48 mm"

                },

                {

                    "group_id"18,

                    "group_name""Gender",

                    "value_id""19",

                    "value_name""Gent"

                },

                {

                    "group_id"23,

                    "group_name""Case Material",

                    "value_id""24",

                    "value_name""Stainless Steel"

                },

                {

                    "group_id"36,

                    "group_name""Strap Material",

                    "value_id""43",

                    "value_name""Leather Strap"

                },

                {

                    "group_id"48,

                    "group_name""Movement",

                    "value_id""93",

                    "value_name""Quartz"

                },

                {

                    "group_id"55,

                    "group_name""Functions",

                    "value_id""60",

                    "value_name""Multifunction"

                },

                {

                    "group_id"61,

                    "group_name""Glass",

                    "value_id""63",

                    "value_name""Mineral"

                },

                {

                    "group_id"236,

                    "group_name""Product Type",

                    "value_id""241",

                    "value_name""Smartwatch"

                },

                {

                    "group_id"319,

                    "group_name""Packaging",

                    "value_id""320",

                    "value_name""Official Box"

                }

            ]

        }

    ]

}




Example of a positive response with empty catalog


{

    "success": true,

    "rc": 0,

    "message": "",

    "num_rows":0,"

    "rows": null

}



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