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


ProductAdd
The method allows add a new product from BaseLinker to the store.


Input parameters
Incoming as $_POST fields.
product_idstringExternal Product ID
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
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
imagesarrayAn array containing urls to images. Each element of the board is a separate photo. First element is main photo.
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 separated with "|", for example: [" outputs "," audio | D-sub | HDMI "].
tagsarray(will start working after May 23, 2024) An array of product tags, key as tag Id, value as tag Value



Outgoing data
Array fields that the method should return.
product_idstringID of the new product saved in store database



Example:
Input data:
Array
(
    [name] => Koszulka Cleopatra
    [sku] => LE4729
    [description] => Koszulka typu bokserka z nadrukiem
    [quantity] => 0
    [man_name] => Quanzhou Yibiao Sexy Lingerie
    [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
                )

        )

)

POST request:
name=Koszulka+Cleopatra&sku=LE4729&description=Koszulka+typu+bokserka+z+nadrukiem&quantity=0&man_name=Quanzhou+Yibiao+Sexy+Lingerie&category_id=4&category_name=Koszulki&tax=23.000&price=49.00&images%5B0%5D=http%3A%2F%2Fsklep.pl%2Fimg%2F456a.jpg&images%5B1%5D=http%3A%2F%2Fsklep.pl%2Fimg%2F456b.jpg&features%5B0%5D%5B0%5D=Waga&features%5B0%5D%5B1%5D=0%2C07+kg&features%5B1%5D%5B0%5D=Materia%C5%82&features%5B1%5D%5B1%5D=Polyester%2B+Spandex&features%5B2%5D%5B0%5D=Rozmiar&features%5B2%5D%5B1%5D=Rozmiar+uniwersalny


returned data JSON:
{"product_id":"456"}

Dane wyjściowe:
Array
(
    [product_id] => 456
)