0

Could anyone help me to find the rest api to get hex or image of visual swatch attribute?

I need the api to return the following, Label Value HEX or Image of the swatch.

Thanks

  • Do you mean as an EX : return colors in hex ? – Jsparo30 Mar 6 '18 at 7:50
  • @Jsparo30 yes bro, i mean that.. i need hex colors to return in REST API, could you please help? – Mohammed Ibrahim Mar 8 '18 at 10:13
  • I replied below. – Jsparo30 Mar 8 '18 at 12:00
0

In Backend you should enter the hex values for your store colors in color attribute from :

Admin->Stores->Product then choose color ttributes Like

enter image description here

After that, call the Color Attribute API :

http://domain.com/index.php/rest/V1/products/attributes/93/options

enter image description here

Hope this help..

  • what about images? I think best would to alter API response – nikunj Jun 11 '18 at 17:45
  • I want swatch selected color. – Pratik Mehta Nov 27 '18 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.