Shopify API to add custom a section with long HTML code

19 0 2

I have an app that creates custom section on the active theme, but the file content is too long and I also added {% schema %}.
is there an option to upload a file as a section instead sending an array with endless code?

on the API documentation there is an option only for image URL but not for file/liquid URL for upload as section.

sample of PUT request i use:

PUT /admin/api/2021-01/themes/828155753/assets.json { "asset": { "key": "templates/index.liquid", "value": "<img src='backsoon-postit.png'><p>We are busy updating the store for you and will be back within the hour.</p>" } }

Want to hire me to help you with your theme? looking for experienced Shopify developer?
Mail me - my post solved you problem? you can send me a bonus on PayPal 🙂
Reply 1 (1)
1 0 0

As expected, no replies