Retail API strips HTML from Item.ItemECommerce.longDescription?

VintageWineGuyVintageWineGuy Member Posts: 117 ✭

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,



                    "amount": 10.00,


                    "useTypeID": 2




                "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

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 734 moderator
    Accepted Answer

    In eCom UI yes it works, but you're hitting the Retail API and that is filter it out. You can use the import function within the product.


  • VintageWineGuyVintageWineGuy Member Posts: 117 ✭

    @Lightspeed Team , any response?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 734 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: 117 ✭

    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.

  • VTSteveVTSteve Member Posts: 10

    Did you ever find a solution to this?

  • Ali_MasoumieAli_Masoumie Moderator, Lightspeed Staff Posts: 109 moderator

    This is not possible from the Retail API.

    Best you can do is to use the eCom import function.

Sign In or Register to comment.