shopify - Update custom settings in settings_data.json file via api
I have added my custom setting in settings_data.json file, Is it possible to update my custom setting in settings_data.json file via api?
You can edit the settings.json file. All you need to do is fetch the asset/file using the fetch asset API, edit the contents and push it back.
Fetch Asset API (GET Request) - Link (https://help.shopify.com/en/api/reference/online-store/asset#show)
Push Asset API (PUT Request) - Link (https://help.shopify.com/en/api/reference/online-store/asset#update)
Another way to achieve the same is you can maintain a copy of the settings.json on your local environment and whenever you edit the file push the same to Shopify using Shopify's Push Asset API. However, this might lead to issues if someone edits the file in Shopify admin console and then you overwrite those changes.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.