FROM CACHE - en_header

GET admin/inventory_levels.json returns 422 Unprocessable Entity

test-thuma_Admi
Shopify Partner
3 0 0

I have a test account to workout the details of the api.

All of the api's I've tried appear to be working with no issues.

I haven't been able to get any of the inventory_levels api's to work.  I'm not sure if there's a problem with the product and variant setup, security issue, or something else.

Here is the X-Request-Id

X-Request-Id →3b032e99-3e8f-48ed-b612-99d58058cbc2

The test store is very simple with a single location, a single product, and a handful of product variants.

Here is the inventory levels for the location.

[ { inventory_item_id: 16852337295424,
    location_id: 11474141248,
    available: 4,
    updated_at: '2018-12-08T12:08:23-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337295424' },
  { inventory_item_id: 16852337328192,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:40-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337328192' },
  { inventory_item_id: 16852337360960,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:40-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337360960' },
  { inventory_item_id: 16852337393728,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:40-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337393728' },
  { inventory_item_id: 16852337426496,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:40-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337426496' },
  { inventory_item_id: 16852337459264,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:45-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337459264' },
  { inventory_item_id: 16852337492032,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:45-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337492032' },
  { inventory_item_id: 16852337524800,
    location_id: 11474141248,
    available: 5,
    updated_at: '2018-12-05T18:21:45-05:00',
    admin_graphql_api_id:
     'gid://shopify/InventoryLevel/11130536000?inventory_item_id=16852337524800' } ]

 

Replies 4 (4)
KarlOffenberger
Shopify Partner
1873 184 868

Hi,

Not sure what problem you are having since you posted the response of a GET /admin/inventory_levels.json request.

Are you having problems adjusting or setting inventory levels? What requests are you sending?

Liked this post? You might also like our fantastic upsell apps Candy Rack, Last Upsell post-purchase and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
test-thuma_Admi
Shopify Partner
3 0 0

Actually this is the one i'm having a problem with

GET /admin/inventory_levels.json

This is the one that worked

GET /admin/locations/#{location_id}/inventory_levels.json

 

KarlOffenberger
Shopify Partner
1873 184 868

Have you added the location_ids or inventory_item_ids filter parameters?

You must include inventory_item_ids, location_ids, or both as filter parameters.

Liked this post? You might also like our fantastic upsell apps Candy Rack, Last Upsell post-purchase and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
test-thuma_Admi
Shopify Partner
3 0 0

Hey that worked, thanks!