I need to create new sizes via API
Example:
XXS
XXXL
How can I do it?
Thank you very much.
Solved! Go to Solution.
@luciano_siqueir I hope you need to create product attributes options via API. If yes we have a OOTB API to create option.
You can refer this API
Note: Make sure size attribute is already created.
Example:
API URL: http://{{site_url}}/index.php/rest/V1/products/attributes/{attribute_code}/options
METHOD: POST
BODY:
{ "option": { "label": "XXS", "value": "XXS", "sort_order": 0, "is_default": true, "store_labels": [ { "store_id": 0, "label": "XXS" } ] } }
Thanks
Sathish
So you want to create a new size attribute of new configurable product using REST Api ?
If you are talking about new configurable products with new size then i would suggest you to refer below link :
It will helps you for the same.
Hope it helps !
@luciano_siqueir I hope you need to create product attributes options via API. If yes we have a OOTB API to create option.
You can refer this API
Note: Make sure size attribute is already created.
Example:
API URL: http://{{site_url}}/index.php/rest/V1/products/attributes/{attribute_code}/options
METHOD: POST
BODY:
{ "option": { "label": "XXS", "value": "XXS", "sort_order": 0, "is_default": true, "store_labels": [ { "store_id": 0, "label": "XXS" } ] } }
Thanks
Sathish
Hi Sathish,
Thank you very much!!
Worked perfectly.
Tks
Luciano
Hi Sathish.
Could you help me again?
New questions:
1- How can I do if I need to change the description of a Size, make a PUT. Have any options?
2- If I have a website with 2 languages, how can I insert the description of Size in different languages.
Would it be in "store_id": 0?
Thank you.
Luciano
@luciano_siqueir My answer resolved your queries Click Kudos & Accept as Solution
Hi @Sathish_S
Could you help me again?
New questions:
1- How can I do if I need to change the description of a Size, make a PUT. Have any options?
2- If I have a website with 2 languages, how can I insert the description of Size in different languages.
Would it be in "store_id": 0?
Thank you.
Luciano