Zaktualizuj produkt
const url = 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/products/v3/products/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":1,"name":"example","catalogId":1,"manufacturerId":1,"sku":"example","ean":"example","weight":1,"height":1,"width":1,"length":1,"vat":1,"categoryId":1,"parentId":1,"isBundle":true,"isAsteriskMarked":true,"stocks":[{"warehouseId":1,"quantity":1,"locationName":"example","vatAmount":1,"vatSymbol":"example"}],"purgeExistingStocks":true,"productPriceGroups":[{"priceGroupId":1,"price":1}],"purgeExistingProductPriceGroups":true,"properties":[{"name":"example","value":"example","externalId":"example"}],"purgeExistingProperties":true,"productLinks":[{"id":1,"externalProductId":"example","externalVariantId":"example","externalConnectionId":"example","connectionId":1}],"purgeExistingProductLinks":true,"complexFields":[{"name":"example","value":"example"}],"purgeExistingComplexFields":true,"bundleItems":[{"bundleItemProductId":1,"quantity":1}],"translations":{"additionalProperty":{"name":"example","descriptionComplexFields":[{"name":"example","description":"example"}],"productProperties":[{"name":"example","value":"example"}]}},"vatSymbol":"example","additionalEans":[{"id":"example","ean":"example","quantity":1,"description":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/products/v3/products/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "name": "example", "catalogId": 1, "manufacturerId": 1, "sku": "example", "ean": "example", "weight": 1, "height": 1, "width": 1, "length": 1, "vat": 1, "categoryId": 1, "parentId": 1, "isBundle": true, "isAsteriskMarked": true, "stocks": [ { "warehouseId": 1, "quantity": 1, "locationName": "example", "vatAmount": 1, "vatSymbol": "example" } ], "purgeExistingStocks": true, "productPriceGroups": [ { "priceGroupId": 1, "price": 1 } ], "purgeExistingProductPriceGroups": true, "properties": [ { "name": "example", "value": "example", "externalId": "example" } ], "purgeExistingProperties": true, "productLinks": [ { "id": 1, "externalProductId": "example", "externalVariantId": "example", "externalConnectionId": "example", "connectionId": 1 } ], "purgeExistingProductLinks": true, "complexFields": [ { "name": "example", "value": "example" } ], "purgeExistingComplexFields": true, "bundleItems": [ { "bundleItemProductId": 1, "quantity": 1 } ], "translations": { "additionalProperty": { "name": "example", "descriptionComplexFields": [ { "name": "example", "description": "example" } ], "productProperties": [ { "name": "example", "value": "example" } ] } }, "vatSymbol": "example", "additionalEans": [ { "id": "example", "ean": "example", "quantity": 1, "description": "example" } ] }'Aktualizuje dane produktu o wskazanym ID (częściowa zmiana; kolekcje scalane po kluczu). W treści podaj id takie samo jak w adresie. Wartości pól złożonych, których definicji nie ma w PIM, są pomijane bez błędu. Odpowiednik addInventoryProduct (edycja) w BaseLinker.
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”Treść żądania
Dział zatytułowany „Treść żądania”object
Required. Unique identifier for the product. Must match with ID in URI.
Optional. Name of the product.
Optional. Catalog identifier to which the product belongs.
Optional. Manufacturer identifier of the product.
Optional. SKU (Stock Keeping Unit) of the product.
Optional. EAN (European Article Number) of the product.
Optional. Weight of the product.
Optional. Height of the product.
Optional. Width of the product.
Optional. Length of the product.
Optional. VAT rate of the product.
Optional. Category identifier of the product.
Optional. Parent product identifier if applicable.
Optional. Flag indicating whether the product is a bundle.
Optional. Flag indicating whether the product is marked with an asterisk.
Optional. Collection of stock information for the product. New stocks will be added, existing (with the same warehouse identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing stock data before updating.
Optional. Collection of product price groups. New prices will be added, existing (with the same price group identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product price groups before updating.
Optional. Collection of product properties. New properties will be added, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product properties before updating.
Optional. Collection of product links. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product links before updating.
Optional. Collection of product complex fields. New fields will be updated, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product complex fields before updating.
Optional. Collection of bundle items for the product if it is a bundle. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Translation matrix keyed by language. Missing non-Polish languages are overwritten as empty strings when provided.
object
object
object
object
Optional. Text VAT symbol (e.g. ZW, NP) of the product.
Optional. Complete collection of additional EAN codes. Must always contain the complete list of items - codes missing from it are removed. Set to null to skip and leave it unchanged, set to an empty array to clear it. None of them may repeat within the product or equal its main EAN.
object
Examplegenerated
{ "id": 1, "name": "example", "catalogId": 1, "manufacturerId": 1, "sku": "example", "ean": "example", "weight": 1, "height": 1, "width": 1, "length": 1, "vat": 1, "categoryId": 1, "parentId": 1, "isBundle": true, "isAsteriskMarked": true, "stocks": [ { "warehouseId": 1, "quantity": 1, "locationName": "example", "vatAmount": 1, "vatSymbol": "example" } ], "purgeExistingStocks": true, "productPriceGroups": [ { "priceGroupId": 1, "price": 1 } ], "purgeExistingProductPriceGroups": true, "properties": [ { "name": "example", "value": "example", "externalId": "example" } ], "purgeExistingProperties": true, "productLinks": [ { "id": 1, "externalProductId": "example", "externalVariantId": "example", "externalConnectionId": "example", "connectionId": 1 } ], "purgeExistingProductLinks": true, "complexFields": [ { "name": "example", "value": "example" } ], "purgeExistingComplexFields": true, "bundleItems": [ { "bundleItemProductId": 1, "quantity": 1 } ], "translations": { "additionalProperty": { "name": "example", "descriptionComplexFields": [ { "name": "example", "description": "example" } ], "productProperties": [ { "name": "example", "value": "example" } ] } }, "vatSymbol": "example", "additionalEans": [ { "id": "example", "ean": "example", "quantity": 1, "description": "example" } ]}object
Required. Unique identifier for the product. Must match with ID in URI.
Optional. Name of the product.
Optional. Catalog identifier to which the product belongs.
Optional. Manufacturer identifier of the product.
Optional. SKU (Stock Keeping Unit) of the product.
Optional. EAN (European Article Number) of the product.
Optional. Weight of the product.
Optional. Height of the product.
Optional. Width of the product.
Optional. Length of the product.
Optional. VAT rate of the product.
Optional. Category identifier of the product.
Optional. Parent product identifier if applicable.
Optional. Flag indicating whether the product is a bundle.
Optional. Flag indicating whether the product is marked with an asterisk.
Optional. Collection of stock information for the product. New stocks will be added, existing (with the same warehouse identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing stock data before updating.
Optional. Collection of product price groups. New prices will be added, existing (with the same price group identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product price groups before updating.
Optional. Collection of product properties. New properties will be added, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product properties before updating.
Optional. Collection of product links. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product links before updating.
Optional. Collection of product complex fields. New fields will be updated, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product complex fields before updating.
Optional. Collection of bundle items for the product if it is a bundle. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Translation matrix keyed by language. Missing non-Polish languages are overwritten as empty strings when provided.
object
object
object
object
Optional. Text VAT symbol (e.g. ZW, NP) of the product.
Optional. Complete collection of additional EAN codes. Must always contain the complete list of items - codes missing from it are removed. Set to null to skip and leave it unchanged, set to an empty array to clear it. None of them may repeat within the product or equal its main EAN.
object
Examplegenerated
{ "id": 1, "name": "example", "catalogId": 1, "manufacturerId": 1, "sku": "example", "ean": "example", "weight": 1, "height": 1, "width": 1, "length": 1, "vat": 1, "categoryId": 1, "parentId": 1, "isBundle": true, "isAsteriskMarked": true, "stocks": [ { "warehouseId": 1, "quantity": 1, "locationName": "example", "vatAmount": 1, "vatSymbol": "example" } ], "purgeExistingStocks": true, "productPriceGroups": [ { "priceGroupId": 1, "price": 1 } ], "purgeExistingProductPriceGroups": true, "properties": [ { "name": "example", "value": "example", "externalId": "example" } ], "purgeExistingProperties": true, "productLinks": [ { "id": 1, "externalProductId": "example", "externalVariantId": "example", "externalConnectionId": "example", "connectionId": 1 } ], "purgeExistingProductLinks": true, "complexFields": [ { "name": "example", "value": "example" } ], "purgeExistingComplexFields": true, "bundleItems": [ { "bundleItemProductId": 1, "quantity": 1 } ], "translations": { "additionalProperty": { "name": "example", "descriptionComplexFields": [ { "name": "example", "description": "example" } ], "productProperties": [ { "name": "example", "value": "example" } ] } }, "vatSymbol": "example", "additionalEans": [ { "id": "example", "ean": "example", "quantity": 1, "description": "example" } ]}object
Required. Unique identifier for the product. Must match with ID in URI.
Optional. Name of the product.
Optional. Catalog identifier to which the product belongs.
Optional. Manufacturer identifier of the product.
Optional. SKU (Stock Keeping Unit) of the product.
Optional. EAN (European Article Number) of the product.
Optional. Weight of the product.
Optional. Height of the product.
Optional. Width of the product.
Optional. Length of the product.
Optional. VAT rate of the product.
Optional. Category identifier of the product.
Optional. Parent product identifier if applicable.
Optional. Flag indicating whether the product is a bundle.
Optional. Flag indicating whether the product is marked with an asterisk.
Optional. Collection of stock information for the product. New stocks will be added, existing (with the same warehouse identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing stock data before updating.
Optional. Collection of product price groups. New prices will be added, existing (with the same price group identifier) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product price groups before updating.
Optional. Collection of product properties. New properties will be added, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product properties before updating.
Optional. Collection of product links. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product links before updating.
Optional. Collection of product complex fields. New fields will be updated, existing (with the same name) will be updated. Set to null to skip and leave it unchanged.
object
Optional. Flag indicating whether to purge existing product complex fields before updating.
Optional. Collection of bundle items for the product if it is a bundle. Must always contains complete list of items. Set to null to skip and leave it unchanged.
object
Optional. Translation matrix keyed by language. Missing non-Polish languages are overwritten as empty strings when provided.
object
object
object
object
Optional. Text VAT symbol (e.g. ZW, NP) of the product.
Optional. Complete collection of additional EAN codes. Must always contain the complete list of items - codes missing from it are removed. Set to null to skip and leave it unchanged, set to an empty array to clear it. None of them may repeat within the product or equal its main EAN.
object
Examplegenerated
{ "id": 1, "name": "example", "catalogId": 1, "manufacturerId": 1, "sku": "example", "ean": "example", "weight": 1, "height": 1, "width": 1, "length": 1, "vat": 1, "categoryId": 1, "parentId": 1, "isBundle": true, "isAsteriskMarked": true, "stocks": [ { "warehouseId": 1, "quantity": 1, "locationName": "example", "vatAmount": 1, "vatSymbol": "example" } ], "purgeExistingStocks": true, "productPriceGroups": [ { "priceGroupId": 1, "price": 1 } ], "purgeExistingProductPriceGroups": true, "properties": [ { "name": "example", "value": "example", "externalId": "example" } ], "purgeExistingProperties": true, "productLinks": [ { "id": 1, "externalProductId": "example", "externalVariantId": "example", "externalConnectionId": "example", "connectionId": 1 } ], "purgeExistingProductLinks": true, "complexFields": [ { "name": "example", "value": "example" } ], "purgeExistingComplexFields": true, "bundleItems": [ { "bundleItemProductId": 1, "quantity": 1 } ], "translations": { "additionalProperty": { "name": "example", "descriptionComplexFields": [ { "name": "example", "description": "example" } ], "productProperties": [ { "name": "example", "value": "example" } ] } }, "vatSymbol": "example", "additionalEans": [ { "id": "example", "ean": "example", "quantity": 1, "description": "example" } ]}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Client Error
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
