Retail API strips HTML from Item.ItemECommerce.longDescription?

VintageWineGuyVintageWineGuy Member Posts: 97 ✭

Is their some trick to getting the API to not strip certain HTML out of longDescription? I am trying to post content with h3, h2, div, span tags in to the longDescription and when I check it, the only thing that is posting is p, strong tags.

Is something stripping HTML out of the post?

I am updating with:

    data = {"publishToEcom": True,

            "Prices":{

                "ItemPrice":{

                    "amount": 10.00,

                    "useType":"MSRP",

                    "useTypeID": 2

                    }

                },

            "ItemECommerce":{

                "shortDescription":"Some words",

                "longDescription": "<p>Some words.</p><h3>A Subhead</h3><p>Some more...</p>",

                "weight": 48        

                }

            }


But what I see in eCom is:

<p>Some words.</p>

<p>A Subhead</p>

<p>Some more...</p>


Is there something I am missing or is this expected behavior?


Thank you.

Best Answer

Answers

  • VintageWineGuyVintageWineGuy Member Posts: 97 ✭

    @Lightspeed Team , any response?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 299 moderator

    Hi @VintageWineGuy,

    Unfortunately it is not possible to do this via the API. This is also not possible via the UI, then it is also filtered out.

  • VintageWineGuyVintageWineGuy Member Posts: 97 ✭

    In the eCom UI it does work. The eCom UI has an HTML editor, and H3, H4, H5 tags, UL, LI and others are all there, and they save and render correctly. That is why I was surprised the API was so aggressive. But I guess this is part of the RetailAPI, not the eCom. And another area where I would hope there are some fixes that help your Omni customers manage Products/Items more efficiently. I volunteer to help write the user story.

    Thank you.

Sign In or Register to comment.