1

I'm using Magento 2.3.4 CE. I used the below JSON to update the product custom attribute part_number in swagger.

{
  "product": {
    "sku": 678899,
    "name": "Product name",
    "attribute_set_id": "4",
    "price": 2.93,
    "status": "1",
    "visibility": 0,
    "type_id": "simple",
    "weight": 0,
    "extension_attributes": {
      "stock_item": {
        "qty": 10,
        "is_in_stock": true
      }
    },
    "custom_attributes": [
      {
        "attribute_code": "part_number",
        "value": "123456"
      }
    ]
  }
}

And I get 200 success response but when I checked in admin and catalog_product_entity_varchar table I don't see the custom attribute part_number value updated.

I have checked with both PUT and POST method but it is not updated part_number

PUT http://127.0.0.1/default/m234/rest/all/V1/products/678899

POST http://127.0.0.1/default/m234/rest/all/V1/products

I have seen known issues https://github.com/magento/magento2/issues/4527 but I didn't see the proper solution.

1
  • have you found any solution on this
    – Pawankumar
    Commented Jul 13, 2021 at 7:04

1 Answer 1

0

Hello this works for me: php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento cache:clean

https://community.magento.com/t5/Magento-2-x-Admin-Configuration/Updating-an-attribute-set-doesn-t-seem-to-work/td-p/126428

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.