Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront 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!
Solved! Go to the solution
This is an accepted solution.
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
This is an accepted solution.
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
Thanks a lot works like a charm!
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.
If this fixed your issue, likes and accepting as a solution are highly appreciated
| Build an online presence with our custom-built Shopify Theme: EcomifyTheme
| Check out our reviews: Trustpilot Reviews
| We are Shopify Partners: EcomGraduates Shopify Partner