Shopify theme asset fetch: theme ID in path and as query param

Solved
Highlighted
Shopify Partner
5 0 2

I've noticed in the docs for the asset API that when fetching an asset by key, the theme ID is included twice:

 

https://help.shopify.com/en/api/reference/online-store/asset#show-2019-07

 

GET /admin/api/2019-07/themes/#{theme_id}/assets.json?asset[key]=templates/index.liquid&theme_id=828155753 

 

In our testing, the query parameter is useless and we can successfully fetch just providing the path. What is the use case, if any, for including the query parameter, and is it safe to omit going forward?

0 Likes

Success.

Shopify Staff
Shopify Staff
153 26 24

Hey @smahr,

 

The query param appears to be ignored. I'll kick off a conversation on this end to confirm and update the docs. Thanks for reporting!

0 Likes
Shopify Partner
5 0 2

thanks!

0 Likes