ProductsData
The method provides a detailed list of products from the store's warehouse.
Input parameters
Incoming as $_POST fields.
POST request:
returned data JSON:
Dane wyjściowe:
products_id | string | List 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_images | int | (optional) If the value is 1, the method returns only the product photos. |
Outgoing data
Array fields that the method should return.
products list | array | An array where product identifiers are the key and each element is an array containing the fields listed below: |
| - sku | string | Product 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. |
| - ean | string | EAN - 13 digit barcode |
| - name | string | Product name |
| - quantity | int | Product quantity (stock) |
| - price | float | Price gross |
| - currency | char (3) | (optional) ISO code of the product currency, e.g. EUR, USD, PLN |
| - tax | int | Tax value (precentage) |
| - weight | float | Weight expressed in kilograms |
| - height | float | Height expressed in centimeters |
| - length | float | Length expressed in centimeters |
| - width | float | Width expressed in centimeters |
| - description | string | Long description |
| - description_extra1 | string | Long description extra |
| - description_extra2 | string | Long description extra |
| - description_extra3 | string | Long description extra |
| - description_extra4 | string | Long description extra |
| - man_name | string | Manufacturer name |
| - category_id | string | Product Category ID. If you belong to several categories, select one |
| - category_name | string | Full category name (tree) |
| - location | string | Location in the warehouse |
| - url | string | Full product URL |
| - images | array | An 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 |
| - features | array | An 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_time | int | expressed in number of days |
| - variants | array | An 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_name | string | Full name of the variant including the name of the product, eg Raincoat Green XL |
| - name | string | Variant name, main element omitted, e.g. green XL |
| - price | float | Price gross |
| - quantity | int | Product quantity (stock) |
| - tax | int | Tax value (precentage). Inherited from main product when empty. |
| - sku | string | Stock Keeping Unit |
| - ean | string | EAN - 13 digit barcode |
| - features | array | variant-specific features (same format as main product ) |
| - images | array | Links to variant photos (same format as main product ) |
| - weight | float | Weight expressed in kilograms |
| - height | float | Height expressed in centimeters |
| - length | float | Length expressed in centimeters |
| - width | float | Width 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
)
(
[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
)
)
)
(
[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
)
)
)