A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
I am trying to update the available for a product with:
https://.../arcaecologica.myshopify.com/admin/api/2021-04/inventory_levels/adjust.json
with this payload in the request:
payload = {
"location_id": 62715035846,
"inventory_item_id": 42177144160454,
"available": 290
}
I receive like response a statuscode: 406 and a the following message: Not Acceptable
Please, I need to know how to solve this problem, it's very important for me to update the stocks of the products via api.
Regards.
Solved! Go to the solution
This is an accepted solution.
Hey @rcorona, took a closer look for you here and it appears you are using the PUT method, when POST should be used. Feel free to look through our docs here for reference!
- Cheers
awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
About my problem 406, I add x-request-id codes in the response object:
'X-Request-ID': 'cf0bad4e-94e6-4127-bbdb-cf83d30895c3'
X-Request-ID': '11fac569-5efc-4b3b-b299-c2ea2fa0afdb
X-Request-ID': 'f8863d1c-4876-4cbb-b850-52ff2694cbbc
Regards
This is an accepted solution.
Hey @rcorona, took a closer look for you here and it appears you are using the PUT method, when POST should be used. Feel free to look through our docs here for reference!
- Cheers
awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks!!! It was the problem!!
Amazing, I had the same issue... thank you for the solve!