I need to get the attribute code by attribute id with rest api. This is needed for configurable product. I get the configurable product data:
"extension_attributes": {
"website_ids": [
1
],
"configurable_product_options": [
{
"id": 2568,
"attribute_id": "253",
"label": "Size",
"position": 0,
"values": [
{
"value_index": 1847
},
{
"value_index": 1844
},
{
"value_index": 1845
}
],
"product_id": 25539
}
],
"configurable_product_links": [
25540,
25541,
25542
]
},
The 'configurable_product_options
' has no attribute_code
, I need it to find the value of the value_index which is the option id.
How to get the attribute_code
?