Updating Dimensions via API gives error “dimensions is not of type object.”
-
Updating dimensions via API is giving the following error:
{ "code": "rest_invalid_param", "message": "Invalid parameter(s): dimensions", "data": { "status": 400, "params": { "dimensions": "dimensions is not of type object." }, "details": { "dimensions": { "code": "rest_invalid_type", "message": "dimensions is not of type object.", "data": { "param": "dimensions" } } } } }
I have tried PUT and POST to /wp-json/wc/v3/products/{id} with the following string:
{"dimensions":{"length":"7.00","width":"7.00","height":"6.00"}}
I can’t seem to find any help on that error, if I try to update other fields that are not nested, it updates correctly.
In the help file it says that “dimensions” it’s an “object”, it points out to this section:
https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#product-dimensions-properties
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Updating Dimensions via API gives error “dimensions is not of type object.”’ is closed to new replies.