Hey, so I am currently trying to update the products.liquid page of the default theme by making a PUT request to the API but I always get a 406 error on postman and my app. I have followed the documentation on https://shopify.dev/api/admin/rest/reference/online-store/asset#index-2021-07 but I cannot get the put request to work. Here is a screenshot of my postman:
I have my auth token as a header so that isnt the issue and I know that the theme id is correct, and I also have access to write to themes. My X-Request-ID is 4a016b88-43c8-4d10-b30a-f8004906f154. If anyone here who works at Shopify could check my requests and tell my whats wrong that would be great, or maybe someone knows what else could be causing the 406 error. Thanks!
Also get requests work fine
Solved! Go to the solution
This is an accepted solution.
Hello @marioguy08 ,
Taking a quick look at the request id you provided, it looks like the internal error is '404'. I expect this is because with a PUT request, the system seeks to update an existing file within the directory you are requesting, which may be a problem here. You are sending requests to /assets, which as a folder does not hold template files. Things like product.liquid would be held in the 'templates' folder, which is not accessible through the /assets endpoint.
I hope this helps!