# Products Managing products in the e-shop and also its related modules. ## List of products - [GET /api/products](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofproducts.md): Returns the list of products - only basic info and GUID, using this you can determine the details with another API call. Endpoint supports Paging. This endpoint has several sections, which are sent only when requested in the parameter (see Section on demand. If you state the parameter within the URL, then information about main product image will also be part of the response. For more information about the chapter Product images. Please note it is better to use List of all products endpoint for getting all products from eshop. Use or request parameter to get the list of specific products. Product codes/GUIDs are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular products is returned. Please note that these parameters and cannot be combined. ## Product insertion - [POST /api/products](https://api.docs.shoptet.com/shoptet-api/openapi/products/createproduct.md): This endpoint allows you to insert products into Shoptet. You can use it for an import from an external system. Request is sent in JSON format in its body. For detailed description of items, which can be provided, see the right-most pane, section "Request" » "Attributes". When creating product without variants, add one variant to array and it will be created as product without variants, but with values specified in the . When creating product with multiple variants, you must specify which are different in each variant (variant A with color black and size XXL and variant B with color yellow and size XXL is correct, but two variants with color black and size XXL is not correct). Also, must be unique in a variant (variant A with color black and color white is not correct). ## Product copy - [POST /api/products/{guid}/copy](https://api.docs.shoptet.com/shoptet-api/openapi/products/productcopy.md): This endpoint allows you to copy a product identified by a GUID. The new product will have the same attributes as the original product. Many settings can be copied from the original product,but some settings require an active module. See the details below. By default, all parameters are copied and set to true unless specified otherwise. If you only want to copy certain parameters, select those you want to copy and set the others to false. If you wish to copy all parameters, you don't need to include them in the request list at all. Important note: If you previously had any active modules (such as Heureka, Seznam, GlobalSaleVat) that are no longer active, the resulting data may differ slightly because data requiring an active module will not be copied in this case. ## List of all products - [GET /api/products/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofallproducts.md): Using this endpoint, you can get list of all products with detailed info of each product (like in Product Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One product in response has the same format as product detail response (in attribute) This endpoint has several sections, which are exported only when requested in the parameter (see Section on demand). Include parameter | Meaning --- | --- images | Export will also contain the list of all product images. For more information about the chapter Product images. variantParameters | Export will also contain a field of variant parameters and a variant description, as they are visible to customers. allCategories | Export will also contain information on all the categories that the product was assigned into flags | Details on product designation descriptiveParameters | Export will also contain descriptive parameters of the product measureUnit | Export will also contain measure unit info of every variant. surchargeParameters | Export will also contain surcharge parameters of the product. setItems | Export will also contain items, products, in set. filteringParameters | Export will also contain filtering parameters of the product. recyclingFee | Export will also contain recycling fee. consumptionTax | Export will also contain consumption tax. Requires the "Consumption tax" module to be enabled on the current e-shop. warranty | Export will also contain product warranty. sortVariants | Product variants will be sorted as in administration. gifts | List of gifts (variants) related to product alternativeProducts | The response will also contain alternative products. relatedProducts | The response will also contain related products. relatedVideos | The response will also contain related videos. relatedFiles | The response will also contain related files. perStockAmounts | The response will also contain amounts/claims per individual stocks. Requires the "stock" module to be enabled on the current e-shop. perPricelistPrices | The response will also contain prices per individual price lists. Use or request parameter to get the list of specific products. Product codes/GUIDs are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular products is returned. Please note that these parameters and cannot be combined. Result file is compressed using GZIP. ## List of all products and pricelist prices - [GET /api/products/snapshot/pricelists](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofallproductsandpricelistprices.md): Using this endpoint, you can get list of all products with basic data such as product guid, id, code and its prices across all pricelists. Response will be in jsonlines format with each product taking one line of output file. Result file is compressed using GZIP. ## Product detail - [GET /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/getproductdetail.md): Returns detailed information about one product. The product includes the variant field. In case the product comes in variants, the field contains all the available variants. If the product does not have any variants, it contains only one variant with product information. This endpoint has several sections, which are sent only when requested in the parameter (see Section on demand). Include parameter | Meaning --- | --- images | The response will also contain the list of all product images. For more information about the chapter Product images. variantParameters | The response will also contain a field of variant parameters and a variant description, as they are visible to customers. allCategories | The response will also contain information on all the categories that the product was assigned into flags | Details on product designation descriptiveParameters | The response will also contain descriptive parameters of the product measureUnit | The response will also contain measure unit info of every variant. surchargeParameters | The response will also contain surcharge parameters of the product. setItems | The response will also contain items, products, in set. filteringParameters | The response will also contain filtering parameters of the product. recyclingFee | The response will also contain recycling fee. consumptionTax | The response will also contain consumption tax. Requires the "Consumption tax" module to be enabled on the current e-shop. warranty | The response will also contain product warranty. sortVariants | Product variants will be sorted as in administration. gifts | Product gifts, will be sorted as in administration alternativeProducts | The response will also contain alternative products. relatedProducts | The response will also contain related products. relatedVideos | The response will also contain related videos. relatedFiles | The response will also contain related files. perStockAmounts | The response will also contain amounts/claims per individual stocks. Requires the "stock" module to be enabled on the current e-shop. perPricelistPrices | The response will also contain prices per individual price lists. ## Product update - [PATCH /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/updateproduct.md): Allows you to change a product, which is identified by the guid. This endpoint allows you to update products in Shoptet. Request is sent in JSON format in its body. For detailed description of items, which can be updated and their format, check the right-most pane, section "Request" » "Attributes" Product variant can be updated by specifying its . When is not specified or not existing, new variant will be created. If you want to change of variant, use to specify variant to be changed and for specifying new code. Field should contain ALL parameters that the edited variant should contain. That means, if you have for example "color:black" in variant and you specify only new parameter "size", parameter color will be deleted. ## Product deletion - [DELETE /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/deleteproduct.md): Deletes product as per entered . If successful, returns the code 200. If the product does not exist within the e-shop, a 404 code is returned. If the product cannot be deleted, because it is part of set or used as a gift to some product, a 409 code is returned. ## Product BATCH update - [PATCH /api/products/batch](https://api.docs.shoptet.com/shoptet-api/openapi/products/productbatchupdate.md): This endpoint allows you to update multiple products at once. Batch update is processed asynchronously in same way as for example products snapshot, but it does not have with products to download in response. Instead, you can check attribute which contains successfully updated products and errors. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. File with data for update must be in JSONL (jsonlines) format. Each line must contain one product in JSON format. Maximum size of file is 100MB. Structure of JSON row is same as structure of JSON for single product update above. You can add one extra optional attribute "language" which defines language of updating product, so you are able to update multiple language attributes (i.e. "name", "description" etc.) of one product in one batch file. If language is not defined, default language of shop is used. Asynchronous job process jsonl file row by row and try to validate and save data. If there is any error, row is skipped and error is logged, but it does not stop processing of other rows. In Log, every product is identified by its position in file (starting from 1). ## Product detail by code - [GET /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/getproductdetailbycode.md): Retrieve details about one product. Optional sections can be requested using parameter The response format is the same as for Product detail endpoint. ## Product update by code - [PATCH /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/updateproductbycode.md): This endpoint allows you to update products identified by a product code in Shoptet. Request is sent in JSON format in its body. For detailed description of items, which can be updated and their format, check the right-most pane, section "Request" » "Attributes". Product variant can be updated by specifying its . When is not specified or not existing, new variant will be created. If you want to change of variant, use to specify variant to be changed and for specifying new code. Field should contain ALL parameters that the edited variant should contain. That means, if you have for example "color:black" in variant and you specify only new parameter "velikost", parameter color will be deleted. Please note that any product's variant can be edited by this endpoint, not only the one in url ## Product variant deletion - [DELETE /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/deleteproductvariant.md): Deletes product variant as per entered . If this is the last product variant, the entire product is deleted. If successful, returns the code 200. If the product variant does not exist within the e-shop, a 404 code is returned. If the product variant cannot be deleted, because it is part of set or used as a gift to some product, a 409 code is returned. ## Product related file link - [POST /api/products/{guid}/related-files](https://api.docs.shoptet.com/shoptet-api/openapi/products/createrelatedfilelink.md): Linking related file from temporary storage to product. ## Last product changes - [GET /api/products/changes](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlastproductchanges.md): Returns the list of products, which were changed (added/edited or deleted). Endpoint is intended to determine the changes after you have loaded the complete list of products and you need to know if any of these have been changed. Guaranteed history is 30 days, older data are deleted progressively. Each product in the log is mentioned only with its last change. For example, if the product was modified and then deleted, the log will show only information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. Description of object attributes with information about changes: |Field | Causes product change | Notes. | |--------------------------------------|---------------------|---------------------------------------| |guid |Yes | | |type |Yes | | |visibility |Yes | | |creationTime |Yes | | |changeTime |Yes | | |shortDescription |Yes | | |description |Yes | | |metaDescription |Yes | | |name |Yes | | |internalNote |Yes | | |defaultCategory |Yes |Only category - product relation change| |defaultCategory.guid |No | | |defaultCategory.name |No | | |supplier |Yes |Only supplier - product relation change| |supplier.guid |No | | |supplier.name |No | | |brand |Yes |Only brand - product relation change | |brand.code |No | | |brand.name |No | | |categories |Yes |Only product - category relation | |categories.guid |No | | |categories.parentGuid |No | | |categories.name |No | | |url |Yes |Only for relative url. Domain change no| |flags |Yes | | |flags.code |No | | |flags.title |No | | |flags.dateFrom |Yes | | |flags.dateTo |Yes | | |variants |Yes | | |variants.code |Yes | | |variants.ean |Yes | | |variants.stock |no | | |variants.unit |yes | | |variants.weight |yes | | |variants.visible |yes | | |variants.minStockSupply |yes | | |variants.negativeStockAllowed |yes | | |variants.amountDecimalPlaces |yes | | |variants.price |yes | | |variants.includingVat |yes | | |variants.vatRate |yes | | |variants.currencyCode |yes | | |variants.actionPrice |yes | | |variants.commonPrice |yes | | |variants.manufacturerCode |yes | | |variants.pluCode |yes | | |variants.isbn |yes | | |variants.serialNo |yes | | |variants.mpn |yes | | |variants.availability |yes | | |variants.availabilityWhenSoldOut |yes | | |variants.image |yes | | |variants.parameters |yes | | |variants.name |yes | | |variants.measureUnit |yes | | |variants.measureUnit.measureAmount |yes | | |variants.measureUnit.measureUnitId |yes | | |variants.measureUnit.packagingAmount |yes | | |variants.measureUnit.packagingUnitId |yes | | |variants.measureUnit.measureUnitName |yes | | |variants.measureUnit.packagingUnitName|yes | | |variants.measureUnit.measurePrice |yes | | |variants.recyclingFee |yes | | |images |yes | | |images.name |yes | | |images.priority |yes | | |images.description |yes | | |images.changeTime |yes | | |images.seoName |yes | | |images.cdnName |yes | | |descriptiveParameters |yes | | |descriptiveParameters.name |yes | | |descriptiveParameters.value |yes | | |descriptiveParameters.description |yes | | |descriptiveParameters.priority |yes | | |surchargeParameters |no | | |surchargeParameters.code |no | | |surchargeParameters.name |no | | |surchargeParameters.displayName |no | | |surchargeParameters.description |no | | |surchargeParameters.priority |no | | |surchargeParameters.required |no | | |surchargeParameters.currency |no | | |surchargeParameters.includingVat |no | | |surchargeParameters.values |no | | |surchargeParameters.values.valueIndex |no | | |surchargeParameters.values.description|no | | |surchargeParameters.values.price |no | | |surchargeParameters.values.priority |no | | |surchargeParameters.values.visible |no | | |setItems |yes | | |setItems.guid |no | | |setItems.code |no | | |setItems.amount |no | | |filteringParameters |yes |Only relation | |filteringParameters.code |no | | |filteringParameters.name |no | | |filteringParameters.displayName |no | | |filteringParameters.description |no | | |filteringParameters.priority |yes | | |filteringParameters.googleMapping |no | | |filteringParameters.values |yes |Only relation | |filteringParameters.values.valueIndex |no | | |filteringParameters.values.name |no | | |filteringParameters.values.priority |no | | |filteringParameters.values.color |no | | |filteringParameters.values.image |no | | |warranty |yes |only relation | |warranty.inMonths |no | | |warranty.description |no | |