Documentation of the shops data exchange protocol - baselinker.com
Function list
Tests
ChangeLog
Remap Builder


ProductsData
The method provides a detailed list of products from the store's warehouse.


Input parameters
Incoming as $_POST fields.
products_idstringList of product identifiers. Identifiers separated by "," (comma). The maximum number of identifiers in one query is 100. There is no paging in this method.
only_imagesint(optional) If the value is 1, the method returns only the product photos.



Outgoing data
Array fields that the method should return.
products listarrayAn array where product identifiers are the key and each element is an array containing the fields listed below:
| - skustringProduct SKU number. May be completed e.g. with the product number in an external system. This will allow you to rebuild the list of product bindings later if they are lost.
| - eanstringEAN - 13 digit barcode
| - namestringProduct name
| - quantityintProduct quantity (stock)
| - pricefloatPrice gross
| - currencychar (3)(optional) ISO code of the product currency, e.g. EUR, USD, PLN
| - taxintTax value (precentage)
| - weightfloatWeight expressed in kilograms
| - heightfloatHeight expressed in centimeters
| - lengthfloatLength expressed in centimeters
| - widthfloatWidth expressed in centimeters
| - descriptionstringLong description
| - description_extra1stringLong description extra
| - description_extra2stringLong description extra
| - description_extra3stringLong description extra
| - description_extra4stringLong description extra
| - man_namestringManufacturer name
| - category_idstringProduct Category ID. If you belong to several categories, select one
| - category_namestringFull category name (tree)
| - locationstringLocation in the warehouse
| - urlstringFull product URL
| - imagesarrayAn array containing urls to images. Each element of the board is a separate photo. First element is main photo and thumbnail for makretplaces and for order
| - featuresarrayAn array of product features in the form of a list. Each element of the array is also an array containing a pair of elements: name and value of the feature, eg ["resolution", "Full HD"]
If the feature has more than one value, it is worth separating them with "|", for example: [" outputs "," audio | D-sub | HDMI "]. This will facilitate the proper completion of the auction parameters after associating the Allegro / eBay parameter, etc. with such a defined feature.
| - delivery_timeintexpressed in number of days
| - variantsarrayAn optional list of product variants, where the key is the product variant ID, and each element has the form of an association table containing:
      | - full_namestringFull name of the variant including the name of the product, eg Raincoat Green XL
      | - namestringVariant name, main element omitted, e.g. green XL
      | - pricefloatPrice gross
      | - quantityintProduct quantity (stock)
      | - taxintTax value (precentage). Inherited from main product when empty.
      | - skustringStock Keeping Unit
      | - eanstringEAN - 13 digit barcode
      | - featuresarrayvariant-specific features (same format as main product )
      | - imagesarrayLinks to variant photos (same format as main product )
      | - weightfloatWeight expressed in kilograms
      | - heightfloatHeight expressed in centimeters
      | - lengthfloatLength expressed in centimeters
      | - widthfloatWidth expressed in centimeters
      | - extra_field_(INT)string(optional) additional field with number defined by customer (any data)
| - extra_field_(INT)string(optional) additional field with number defined by customer (any data)
inne...The function may return additional fields created individually. Because the field names will be available as additional tags in the auction template, it should be different from the names of the standard template tags.



Example:
Input data:
Array
(
    [products_id] => 456,12
)

POST request:
products_id=456%2C12


returned data JSON:
{"456":{"name":"Koszulka Cleopatra","sku":"LE4729","description":"Koszulka typu bokserka z nadrukiem","quantity":"0","man_name":"Quanzhou Yibiao Sexy Lingerie","man_image":"http:\/\/sklep.pl\/img\/m\/124.jpg","category_id":"4","category_name":"Koszulki","tax":"23.000","price":"49.00","images":["http:\/\/sklep.pl\/img\/456a.jpg","http:\/\/sklep.pl\/img\/456b.jpg"],"features":[["Waga","0,07 kg"],["Materia\u0142","Polyester+ Spandex "],["Rozmiar","Rozmiar uniwersalny"]],"variants":{"49":{"full_name":"Koszulka Cleopatra One size","name":"One size","price":"49.00","tax": "23.000","quantity":"0"}}},"12":{"name":"Po\u0144czochy czarne pas koronkowy","sku":"BJ050","description":"Czarne po\u0144czochy wyko\u0144czone czarna szerok\u0105 koronk\u0105 z gumk\u0105 i pasem wykonanym z delikatnej koronki.<\/p>","weight":"0.000000","quantity":"10","man_name":"Beileisi","man_image":"http:\/\/sklep.com\/img\/m\/17.jpg","category_id":"20","category_name":"Po\u0144czochy","tax":"23.000","price":"20.00","images":["http:\/\/sklep.com\/img\/12.jpg"]}}

Dane wyjściowe:
Array
(
    [456] => Array
        (
            [name] => Koszulka Cleopatra
            [sku] => LE4729
            [description] => Koszulka typu bokserka z nadrukiem
            [quantity] => 0
            [man_name] => Quanzhou Yibiao Sexy Lingerie
            [man_image] => http://sklep.pl/img/m/124.jpg
            [category_id] => 4
            [category_name] => Koszulki
            [tax] => 23.000
            [price] => 49.00
            [images] => Array
                (
                    [0] => http://sklep.pl/img/456a.jpg
                    [1] => http://sklep.pl/img/456b.jpg
                )

            [features] => Array
                (
                    [0] => Array
                        (
                            [0] => Waga
                            [1] => 0,07 kg
                        )

                    [1] => Array
                        (
                            [0] => Materiał
                            [1] => Polyester+ Spandex 
                        )

                    [2] => Array
                        (
                            [0] => Rozmiar
                            [1] => Rozmiar uniwersalny
                        )

                )

            [variants] => Array
                (
                    [49] => Array
                        (
                            [full_name] => Koszulka Cleopatra One size
                            [name] => One size
                            [price] => 49.00
                            [tax] => 23.000
                            [quantity] => 0
                        )

                )

        )

    [12] => Array
        (
            [name] => Pończochy czarne pas koronkowy
            [sku] => BJ050
            [description] => Czarne pończochy wykończone czarna szeroką koronką z gumką i pasem wykonanym z delikatnej koronki.


            [weight] => 0.000000
            [quantity] => 10
            [man_name] => Beileisi
            [man_image] => http://sklep.com/img/m/17.jpg
            [category_id] => 20
            [category_name] => Pończochy
            [tax] => 23.000
            [price] => 20.00
            [images] => Array
                (
                    [0] => http://sklep.com/img/12.jpg
                )

        )

)