1

Currently I can only change weight using api not Length, Width and Height. these are out of the box attributes in magento 2.3 as seen in the product panel below. LWH in Magento 2 Product Config Page

Price and weight is updated by POST to "http://www.hostname.com/rest/V1/products"

POST body contains:

{
"product": {
    "sku": "ProductSKU",
    "price": 99.99,
    "weight": 10,
    "extensionAttributes": {
        "stockItem": {
            "qty": 4,
            "isInStock": true
        }
    }
},
"saveOptions": true

}

This works perfectly for changing the price and weight. What line can I add to change the built in Length, Width and Height attributes?

1 Answer 1

0

You have use ts_dimensions_length, ts_dimensions_width, ts_dimensions_height in the custom_attributes.

[8] => Array ( [attribute_code] => ts_dimensions_length [value] => 1.0200 )

        [9] => Array
            (
                [attribute_code] => ts_dimensions_width
                [value] => 0.5200
            )

        [10] => Array
            (
                [attribute_code] => ts_dimensions_height
                [value] => 0.1500
            )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.