--- title: InventoryItem description: List or update the inventory of a variant's inventory item. Each variant can have one inventory item, and each inventory item can have multiple locations. Each location can have multiple inventory items for multiple variants. api_version: 2025-10 api_name: admin-rest api_type: rest source_url: html: https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem md: https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem.md --- ![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg) The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql). For details and migration steps, visit our [migration guide](https://shopify.dev/docs/apps/build/graphql/migrate). # Inventory​Item Requires `inventory` access scope. An inventory item represents a physical good. It holds essential information about the physical good, including its SKU and whether its inventory is tracked. There is a 1:1 relationship between a product variant and an inventory item. Each product variant includes the ID of its related inventory item. You can use the inventory item ID to query the [InventoryLevel](https://shopify.dev/api/admin-rest/latest/resources/inventorylevel) resource to retrieve the location and quantity for an inventory item. Use the InventoryItem resource together with the [InventoryLevel](https://shopify.dev/api/admin-rest/latest/resources/inventorylevel) and [Location](https://shopify.dev/api/admin-rest/latest/resources/location) resources to manage a store's inventory across multiple locations. \# ## Endpoints * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#get-inventory-items?ids=808950810,39072856,457924702) [/admin/api/latest/inventory\_​items.​json?ids=808950810,39072856,457924702](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#get-inventory-items?ids=808950810,39072856,457924702) Retrieves a detailed list for inventory items by IDs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItems?example=retrieves-a-detailed-list-for-inventory-items-by-ids) [inventoryItems](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItems?example=retrieves-a-detailed-list-for-inventory-items-by-ids) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#get-inventory-items-inventory-item-id) [/admin/api/latest/inventory\_​items/{inventory\_​item\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#get-inventory-items-inventory-item-id) Retrieves a single inventory item by ID [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem) [inventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem) * [put](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#put-inventory-items-inventory-item-id) [/admin/api/latest/inventory\_​items/{inventory\_​item\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/inventoryitem#put-inventory-items-inventory-item-id) Updates an existing inventory item [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryItemUpdate?example=updates-an-existing-inventory-item) [inventoryItemUpdate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryItemUpdate?example=updates-an-existing-inventory-item) *** ## The InventoryItem resource ### Properties *** cost -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.unitCost) [unitCost](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.unitCost) The unit cost of the inventory item. The shop's default currency is used. *** country\_code\_of\_origin -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.countryCodeOfOrigin) [countryCodeOfOrigin](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.countryCodeOfOrigin) The country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) of where the item came from. *** country\_harmonized\_system\_codes -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.countryHarmonizedSystemCodes) [countryHarmonizedSystemCodes](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.countryHarmonizedSystemCodes) An array of country-specific [Harmonized System](https://en.wikipedia.org/wiki/Harmonized_System) (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. *** created\_at read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.createdAt) [createdAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.createdAt) The date and time ([ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)) when the inventory item was created. *** harmonized\_system\_code -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.harmonizedSystemCode) [harmonizedSystemCode](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.harmonizedSystemCode) The general [Harmonized System](https://en.wikipedia.org/wiki/Harmonized_System) (HS) code for the inventory item. Used if a country-specific HS code (`countryHarmonizedSystemCode`) is not available. *** id read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.id) [id](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.id) The ID of the inventory item. *** province\_code\_of\_origin -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.provinceCodeOfOrigin) [provinceCodeOfOrigin](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.provinceCodeOfOrigin) The province code ([ISO 3166-2 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2)) of where the item came from. The province code is only used if the shipping provider for the inventory item is Canada Post. *** sku -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.sku) [sku](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.sku) The unique SKU (stock keeping unit) of the inventory item. Case-sensitive string. *** tracked -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.tracked) [tracked](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.tracked) Whether inventory levels are tracked for the item. If true, then the inventory quantity changes are tracked by Shopify. *** updated\_at read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.updatedAt) [updatedAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.updatedAt) The date and time ([ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)) when the inventory item was last modified. *** requires\_shipping -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.requiresShipping) [requiresShipping](https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItem#field-InventoryItem.fields.requiresShipping) Whether a customer needs to provide a shipping address when placing an order containing the inventory item. *** {} ## The InventoryItem resource ```json { "cost": "25.00", "country_code_of_origin": "FR", "country_harmonized_system_codes": [ { "harmonized_system_code": "1234561111", "country_code": "CA" }, { "harmonized_system_code": "1234562222", "country_code": "US" } ], "created_at": "2012-08-24T14:01:47-04:00", "harmonized_system_code": 123456, "id": 450789469, "province_code_of_origin": "QC", "sku": "IPOD2008PINK", "tracked": true, "updated_at": "2012-08-24T14:01:47-04:00", "requires_shipping": true } ``` *** ## getRetrieves a detailed list for inventory items by IDs [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItems?example=retrieves-a-detailed-list-for-inventory-items-by-ids) [inventoryItems](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItems?example=retrieves-a-detailed-list-for-inventory-items-by-ids) Retrieves a list that will display details for the inventory item IDs you specify. **Note:** This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to [Make paginated requests to the REST Admin API](https://shopify.dev/api/usage/pagination-rest). ### Parameters *** api\_version string required *** ids required ≤ 100 Show only inventory items specified by a comma-separated list of IDs. *** limit ≤ 250 default 50 The maximum number of results to show. *** ### Examples Retrieves a detailed list for inventory items by IDs Query parameters ids=​808950810,​39072856,​457924702 required ≤ 100 Show only inventory items specified by a comma-separated list of IDs. get ## /admin/api/2025-10/inventory\_​items.​json?ids=​808950810,​39072856,​457924702 ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items.json?ids=808950810%2C39072856%2C457924702" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "inventory_items": [ { "id": 39072856, "sku": "IPOD2008GREEN", "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "requires_shipping": true, "cost": "25.00", "country_code_of_origin": null, "province_code_of_origin": null, "harmonized_system_code": null, "tracked": true, "country_harmonized_system_codes": [], "admin_graphql_api_id": "gid://shopify/InventoryItem/39072856" }, { "id": 457924702, "sku": "IPOD2008BLACK", "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "requires_shipping": true, "cost": "25.00", "country_code_of_origin": null, "province_code_of_origin": null, "harmonized_system_code": null, "tracked": true, "country_harmonized_system_codes": [], "admin_graphql_api_id": "gid://shopify/InventoryItem/457924702" }, { "id": 808950810, "sku": "IPOD2008PINK", "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "requires_shipping": true, "cost": "25.00", "country_code_of_origin": null, "province_code_of_origin": null, "harmonized_system_code": null, "tracked": true, "country_harmonized_system_codes": [], "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810" } ] } ``` ### examples * #### Retrieves a detailed list for inventory items by IDs ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items.json?ids=808950810%2C39072856%2C457924702" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.InventoryItem.all({ session: session, ids: "808950810,39072856,457924702", }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::InventoryItem.all( session: test_session, ids: "808950810,39072856,457924702", ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.InventoryItem.all({ session: session, ids: "808950810,39072856,457924702", }); ``` #### response ```json HTTP/1.1 200 OK{"inventory_items":[{"id":39072856,"sku":"IPOD2008GREEN","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/39072856"},{"id":457924702,"sku":"IPOD2008BLACK","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/457924702"},{"id":808950810,"sku":"IPOD2008PINK","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/808950810"}]} ``` *** ## getRetrieves a single inventory item by ID [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem) [inventoryItem](https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItem) Retrieves a single inventory item by ID ### Parameters *** api\_version string required *** inventory\_item\_id string required *** ### Examples Retrieve an inventory item by ID Path parameters inventory\_​item\_​id=​808950810 string required get ## /admin/api/2025-10/inventory\_​items/808950810.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items/808950810.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "inventory_item": { "id": 808950810, "sku": "IPOD2008PINK", "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:30:56-04:00", "requires_shipping": true, "cost": "25.00", "country_code_of_origin": null, "province_code_of_origin": null, "harmonized_system_code": null, "tracked": true, "country_harmonized_system_codes": [], "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810" } } ``` ### examples * #### Retrieve an inventory item by ID ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items/808950810.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.InventoryItem.find({ session: session, id: 808950810, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::InventoryItem.find( session: test_session, id: 808950810, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.InventoryItem.find({ session: session, id: 808950810, }); ``` #### response ```json HTTP/1.1 200 OK{"inventory_item":{"id":808950810,"sku":"IPOD2008PINK","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/808950810"}} ``` *** ## putUpdates an existing inventory item [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryItemUpdate?example=updates-an-existing-inventory-item) [inventoryItemUpdate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/inventoryItemUpdate?example=updates-an-existing-inventory-item) Updates an existing inventory item ### Parameters *** api\_version string required *** inventory\_item\_id string required *** ### Examples Update an inventory item's SKU Path parameters inventory\_​item\_​id=​808950810 string required Request body inventory\_​item​ Inventory\_item resource Show inventory\_item properties inventory\_​item.id:​808950810 read-only The ID of the inventory item. inventory\_​item.sku:​"new sku" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/InventoryItemInput#fields-sku) [sku](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/InventoryItemInput#fields-sku) The unique SKU (stock keeping unit) of the inventory item. Case-sensitive string. Update an inventory item's unit cost Path parameters inventory\_​item\_​id=​808950810 string required Request body inventory\_​item​ Inventory\_item resource Show inventory\_item properties inventory\_​item.id:​808950810 read-only The ID of the inventory item. inventory\_​item.cost:​"25.00" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/InventoryItemInput#fields-cost) [cost](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/InventoryItemInput#fields-cost) The unit cost of the inventory item. The shop's default currency is used. put ## /admin/api/2025-10/inventory\_​items/808950810.​json ```bash curl -d '{"inventory_item":{"id":808950810,"sku":"new sku"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items/808950810.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "inventory_item": { "id": 808950810, "sku": "new sku", "created_at": "2025-10-01T14:30:56-04:00", "updated_at": "2025-10-01T14:56:24-04:00", "requires_shipping": true, "cost": "25.00", "country_code_of_origin": null, "province_code_of_origin": null, "harmonized_system_code": null, "tracked": true, "country_harmonized_system_codes": [], "admin_graphql_api_id": "gid://shopify/InventoryItem/808950810" } } ``` ### examples * #### Update an inventory item's SKU ##### ```curl curl -d '{"inventory_item":{"id":808950810,"sku":"new sku"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items/808950810.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const inventory_item = new admin.rest.resources.InventoryItem({session: session}); inventory_item.id = 808950810; inventory_item.sku = "new sku"; await inventory_item.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session inventory_item = ShopifyAPI::InventoryItem.new(session: test_session) inventory_item.id = 808950810 inventory_item.sku = "new sku" inventory_item.save! ``` ##### ```node // Session is built by the OAuth process const inventory_item = new shopify.rest.InventoryItem({session: session}); inventory_item.id = 808950810; inventory_item.sku = "new sku"; await inventory_item.save({ update: true, }); ``` #### response ```json HTTP/1.1 200 OK{"inventory_item":{"id":808950810,"sku":"new sku","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:56:24-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/808950810"}} ``` * #### Update an inventory item's unit cost ##### ```curl curl -d '{"inventory_item":{"id":808950810,"cost":"25.00"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/2025-10/inventory_items/808950810.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const inventory_item = new admin.rest.resources.InventoryItem({session: session}); inventory_item.id = 808950810; inventory_item.cost = "25.00"; await inventory_item.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session inventory_item = ShopifyAPI::InventoryItem.new(session: test_session) inventory_item.id = 808950810 inventory_item.cost = "25.00" inventory_item.save! ``` ##### ```node // Session is built by the OAuth process const inventory_item = new shopify.rest.InventoryItem({session: session}); inventory_item.id = 808950810; inventory_item.cost = "25.00"; await inventory_item.save({ update: true, }); ``` #### response ```json HTTP/1.1 200 OK{"inventory_item":{"id":808950810,"sku":"IPOD2008PINK","created_at":"2025-10-01T14:30:56-04:00","updated_at":"2025-10-01T14:30:56-04:00","requires_shipping":true,"cost":"25.00","country_code_of_origin":null,"province_code_of_origin":null,"harmonized_system_code":null,"tracked":true,"country_harmonized_system_codes":[],"admin_graphql_api_id":"gid://shopify/InventoryItem/808950810"}} ```