Solved

Inventory levels - Error (406) Not Acceptable

rcorona
Tourist
3 0 1

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.

 

 

 

Accepted Solution (1)
awwdam
Shopify Staff
249 42 36

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

View solution in original post

Replies 4 (4)

rcorona
Tourist
3 0 1

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

awwdam
Shopify Staff
249 42 36

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

rcorona
Tourist
3 0 1

Thanks!!! It was the problem!!

cm_lk
Visitor
1 0 0

Amazing, I had the same issue... thank you for the solve!