Inventory Level set API 404 error

Posware
Shopify Partner
6 0 0

I am trying to set inventory level using /inventory_levels/set.json and always getting error 404. I have followed documentation and verified APO credentials. other endpoint works fine with same credentials. Inventory scope also enabled for this. In fact same method works for another shopify store (using as trial) but does not work for this store.

Posware_0-1695825065543.png

 

*Here "inventory_item_id" and "location_id" has 1:1 relation

* Authentication and other headers are present for API

* Shopify is subscribed to basic package with POS lite

* /inventory_levels/set.json and /inventory_levels/adjust.json both does not work

* this app access_token has inventory scope

 

Am I missing something or is there any setting required in admin panel for this operation.

 

Replies 10 (10)

SBD_
Shopify Staff
1829 270 411

Hey @Posware 

 

Can you confirm the inventory item ID is correct? It looks like the API endpoint is found and responding that the inventory ID isn't found. If you're still stuck please DM store/inventory ID details.

Scott | Developer Advocate @ Shopify 

Posware
Shopify Partner
6 0 0

Hi. Thanks for responding. I confirmed that Inventory Item ID is correct. Please see below images. First I called all inventory levels.

Posware_1-1696077754761.png

and then I have used same result for inventory set. 

Posware_2-1696077848072.png

 

 

SBD_
Shopify Staff
1829 270 411

Hey @Posware 

 

Can you confirm you're POSTing to /admin/api/2023-07/inventory_levels/set.json?

 

Curl example:

curl -d '{"location_id":61107961909,"inventory_item_id":44204478332981,"available":42}' \
-X POST "https://{store}.myshopify.com/admin/api/2023-07/inventory_levels/set.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"



Scott | Developer Advocate @ Shopify 

Posware
Shopify Partner
6 0 0

Hi @SBD_ 

I confirm that i have used mentioned endpoint.

Posware_0-1696435382713.png

Please note that I have tested the same (I have changed access token and store name) and that working with another trial shopify.

SBD_
Shopify Staff
1829 270 411

Thanks. Is there a request ID attached to the response headers? and if so can you please provide it.

Scott | Developer Advocate @ Shopify 

Posware
Shopify Partner
6 0 0
Hi, here is the request id attached to the header.
e5703902-42fc-4835-aec5-94bab44b42bf
SBD_
Shopify Staff
1829 270 411

Thanks @Posware. Logs indicate that's a GET request, you'll need to POST to this endpoint. We could really improve our error message here 😅

Scott | Developer Advocate @ Shopify 

Posware
Shopify Partner
6 0 0

Thank you for your response, However this can't be a GET request. Please see the following video. X-Request-ID: e01cb1bb-3f61-41d3-acea-7875d03cd5b6

Posware
Shopify Partner
6 0 0

Hi. It's been long and am still stuck there. Please have a look and advise me.

Best regard.

FaizaBashir
Shopify Partner
38 0 2

@Posware were you able to resolve this? I have same issue