What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Error 422 in InventoryLevel

Error 422 in InventoryLevel

ruckert
Visitor
1 0 0

I'm trying to do the method GET on the InventoryLevel endpoint, but it keeps returning the error 422. Does someone have this same problem or know how to solve it? I already checked the URL syntax and don't have any required parameters that are not in the request.

 

The URL syntax: admin/api/2023-04/inventory_levels.json

 

Link of documentation that I'm following: https://shopify.dev/docs/api/admin-rest/2023-04/resources/inventorylevel (Remember that I'm using the GET method)

Reply 1 (1)

lizk
Shopify Staff
246 58 78

Hi there 👋

You must include 
inventory_item_idslocation_ids, or both as filter parameters.

curl -X GET "https://your-development-store.myshopify.com/admin/api/2023-04/inventory_levels.json?location_ids=655441491" \
-H "X-Shopify-Access-Token: {access_token}"

 

To learn more visit the Shopify Help Center or the Community Blog.