Skip to main content

Update products attributes

Updates the attributes of the selected items

Function UpdateProductsAttributes(Val ClientID, Val APIKey, Val AttributesArray) Export

ParameterCLI optionTypeRequiredDescription
ClientID--clientidStringClient identifier
APIKey--apikeyStringAPI key
AttributesArray--itemsArray Of StringArray or one structure of product attribute fields

Returns: Map Of KeyAndValue - serialized JSON response from Ozon Seller API


tip

You can get an empty structure using the GetAttributesUpdateStructure method()

Method at API documentation: post /v1/product/attributes/update


1C:Enterprise/OneScript code example
    ClientID = "2479669";
APIKey = "09f65e9f-262d-4aca...";

AttributesStructure = New Structure("offer_id", "143210609");

CategoryAttribute1 = New Structure("dictionary_value_id,value", 971082156, "Speaker stand");
CategoryAttribute2 = New Structure("dictionary_value_id,value", 5060050, "Samsung");
CategoryAttribute3 = New Structure("dictionary_value_id,value", 61576, "red");

OPI_Ozon.CompleteComplexAttribute(AttributesStructure, 5076 , 0, CategoryAttribute1);
OPI_Ozon.CompleteComplexAttribute(AttributesStructure, 85 , 0, CategoryAttribute2);
OPI_Ozon.CompleteComplexAttribute(AttributesStructure, 10096, 0, CategoryAttribute3);

Result = OPI_Ozon.UpdateProductsAttributes(ClientID, APIKey, AttributesStructure);
    oint ozon UpdateProductsAttributes \
--clientid "***" \
--apikey "***" \
--items "{'offer_id':'143210609','attributes':[{'id':'5076','complex_id':'0','values':[{'dictionary_value_id':'971082156','value':'Speaker stand'}]},{'id':'85','complex_id':'0','values':[{'dictionary_value_id':'5060050','value':'Samsung'}]},{'id':'10096','complex_id':'0','values':[{'dictionary_value_id':'61576','value':'red'}]}]}"
Result
{
"task_id": 2921237180
}