Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Download settings_data.json file from API

Solved

Download settings_data.json file from API

aurelien-r
Shopify Partner
7 0 2

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!

Accepted Solution (1)

garyrgilbert
Shopify Partner
432 41 190

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

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

View solution in original post

Replies 3 (3)

garyrgilbert
Shopify Partner
432 41 190

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

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
aurelien-r
Shopify Partner
7 0 2

Thanks a lot works like a charm!

EcomGraduates
Shopify Partner
826 70 120

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