Przejdź do głównej zawartości

Zaktualizuj produkt

PUT
/api/products/v3/products/{id}
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.

id
wymagane
integer format: int64
object
id

Required. Unique identifier for the product. Must match with ID in URI.

integer format: int64
name

Optional. Name of the product.

string
nullable
catalogId

Optional. Catalog identifier to which the product belongs.

integer format: int64
nullable
manufacturerId

Optional. Manufacturer identifier of the product.

integer format: int64
nullable
sku

Optional. SKU (Stock Keeping Unit) of the product.

string
nullable
ean

Optional. EAN (European Article Number) of the product.

string
nullable
weight

Optional. Weight of the product.

number format: double
nullable
height

Optional. Height of the product.

number format: double
nullable
width

Optional. Width of the product.

number format: double
nullable
length

Optional. Length of the product.

number format: double
nullable
vat

Optional. VAT rate of the product.

number format: double
nullable
categoryId

Optional. Category identifier of the product.

integer format: int64
nullable
parentId

Optional. Parent product identifier if applicable.

integer format: int64
nullable
isBundle

Optional. Flag indicating whether the product is a bundle.

boolean
nullable
isAsteriskMarked

Optional. Flag indicating whether the product is marked with an asterisk.

boolean
nullable
stocks

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.

Array<object>
nullable
object
warehouseId
integer format: int64
quantity
integer format: int32
nullable
locationName
string
nullable
vatAmount
number format: double
nullable
vatSymbol
string
nullable
purgeExistingStocks

Optional. Flag indicating whether to purge existing stock data before updating.

boolean
nullable
productPriceGroups

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.

Array<object>
nullable
object
priceGroupId
integer format: int64
price
number format: double
purgeExistingProductPriceGroups

Optional. Flag indicating whether to purge existing product price groups before updating.

boolean
nullable
properties

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.

Array<object>
nullable
object
name
string
nullable
value
string
nullable
externalId
string
nullable
purgeExistingProperties

Optional. Flag indicating whether to purge existing product properties before updating.

boolean
nullable
productLinks

Optional. Collection of product links. Must always contains complete list of items. Set to null to skip and leave it unchanged.

Array<object>
nullable
object
id
integer format: int64
nullable
externalProductId
string
nullable
externalVariantId
string
nullable
externalConnectionId
string
nullable
connectionId
integer format: int64
purgeExistingProductLinks

Optional. Flag indicating whether to purge existing product links before updating.

boolean
nullable
complexFields

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.

Array<object>
nullable
object
name
string
nullable
value
string
nullable
purgeExistingComplexFields

Optional. Flag indicating whether to purge existing product complex fields before updating.

boolean
nullable
bundleItems

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.

Array<object>
nullable
object
bundleItemProductId
integer format: int64
quantity
integer format: int32
translations

Optional. Translation matrix keyed by language. Missing non-Polish languages are overwritten as empty strings when provided.

object
key
additional properties
object
name
string
nullable
descriptionComplexFields
Array<object>
nullable
object
name
string
nullable
description
string
nullable
productProperties
Array<object>
nullable
object
name
string
nullable
value
string
nullable
vatSymbol

Optional. Text VAT symbol (e.g. ZW, NP) of the product.

string
nullable
additionalEans

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.

Array<object>
nullable
object
id
string
nullable
ean
string
nullable
quantity
integer format: int32
description
string
nullable
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"
}
]
}

Success

Client Error

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties