Skip to content
Get started

Update Product Attributes

products.update_product_attributes(ProductUpdateProductAttributesParams**kwargs) -> ProductUpdateProductAttributesResponse
PUT/api/v2/public/products/attributes

Replaces one attribute value across every product that carries it, for example when a brand is renamed in the source system. attribute accepts only product_name, brand_code, brand_description or volume; any other name is ignored and the call still reports success. Matching is on the whole value, not a partial one.

ParametersExpand Collapse
attribute: str

Which attribute to change. One of product_name, brand_code, brand_description or volume. Any other value is ignored.

minLength1
new_value: str

The value to write in its place.

minLength1
old_value: str

The existing value to look for. Products are matched on the whole value, not a part of it.

minLength1
ReturnsExpand Collapse
class ProductUpdateProductAttributesResponse: …
data: bool
code: Optional[int]
formatint32
message: Optional[str]
status: Optional[str]

Update Product Attributes

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.products.update_product_attributes(
    attribute="x",
    new_value="x",
    old_value="x",
)
print(response.data)
{
  "data": true,
  "code": 0,
  "message": "message",
  "status": "status"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "data": true,
  "code": 0,
  "message": "message",
  "status": "status"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}