Download settings_data.json file from API

Hi, is there a way to download the settings_data.json file with an API? Or in absolute terms, a way to access these settings programmatically (not through the Shopify interface). Thank you!

2 Likes

Hi Aurelien,

Yes you would use the asset api to get/put theme assets

https://shopify.dev/api/admin-rest/2023-01/resources/asset

you need the theme’s id and then you should be able to get it with:

/admin/api/2023-01/themes/[theme_id]/assets.json?asset[key]=config/settings_data.json

Cheers,

Gary

3 Likes

Hello there!

Yes, you can access the settings_data.json file programmatically through the Shopify API. The Shopify API allows you to retrieve and update data in a Shopify store, including the settings data stored in the settings_data.json file. You can use the Shopify API with any programming language that can make HTTP requests and parse JSON data.

To access the settings_data.json file through the API, you would need to make a GET request to the /admin/themes/{theme_id}/settings.json endpoint, where “theme_id” is the ID of the theme for which you want to retrieve the settings data. You’ll need to provide authentication for the API request, such as an API key and password, or an OAuth token.

Thanks a lot works like a charm!