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 72

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.