Hi,
I have the following and need to be able to find out what the label for the option_id and the option_value is.
I have tried everything from:
https://host/rest/V1/products/attributes
Which brings back info for 93 but not eh extension_attributes.
Also the product itself:
https://m2-tmp.filofax.com/rest/V1/products/
"product_option": {
"extension_attributes": {
"custom_options": [
{
"option_id": "346",
"option_value": "738"
},
{
"option_id": "347",
"option_value": "741"
},
{
"option_id": "348",
"option_value": "test"
}
],
"configurable_item_options": [
{
"option_id": "93",
"option_value": 5476
}
]
Best Regards,
Ross
Hello @ross_robertson
These Extension Attributes are not like normal attributes. They are not magically saved to the database or populated when the entity is loaded from the database. So the solution is that you should use plugin or observer to save and get data of these attributes.
So to fetch the extension attribute you have to do some custom code to get these in API, please take reference from here, it's explain why we can't get and how we can get by custom code :
https://store.magenest.com/blog/create-expose-extension-attributes/
Hope it will help to resolve your problem.