Retreiving Inventory Level not working

Retreiving Inventory Level not working

apatuka
Visitor
2 0 1

I have this JSON returned from API

{
    "variant": {
        "id"41593179373613,
        "product_id"5251928326189,
        "title""ROJO SALVAJE",
        "price""450000",
        "sku"null,
        "position"1,
        "inventory_policy""deny",
        "compare_at_price"null,
        "fulfillment_service""manual",
        "inventory_management""shopify",
        "option1""ROJO SALVAJE",
        "option2"null,
        "option3"null,
        "created_at""2023-03-15T17:06:42-03:00",
        "updated_at""2023-03-15T17:06:42-03:00",
        "taxable"true,
        "barcode"null,
        "grams"0,
        "image_id"17809030316077,
        "weight"0.0,
        "weight_unit""kg",
        "inventory_item_id"43633412112429,
        "inventory_quantity"1,
        "old_inventory_quantity"1,
        "requires_shipping"true,
        "admin_graphql_api_id""gid://shopify/ProductVariant/41593179373613"
    }
}
 
Then i use the inventory level retrieval
https://*****.myshopify.com/admin/api/2023-04/inventory_levels/inventory_levels.json?inventory_item_ids=43633412112429

This returns:
{
    "errors""Not Found"
}
What im doing wrong ? I send the correct inventory item id
Can you help me please ?


Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 508

Hi @apatuka,

 

The reason for the 'Not Found' error is the path that's being used of /admin/api/2023-04/inventory_levels/inventory_levels.json

 

This should be just:

 

/admin/api/2023-04/inventory_levels.json

 

[Related documentation]

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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