# InventoryItem <p>An inventory item represents a physical good. It holds essential information about the physical good, including its SKU and whether its inventory is tracked.</p> <p>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 <a href="/api/admin-rest/latest/resources/inventorylevel">InventoryLevel</a> resource to retrieve the location and quantity for an inventory item.</p> <p>Use the InventoryItem resource together with the <a href="/api/admin-rest/latest/resources/inventorylevel">InventoryLevel</a> and <a href="/api/admin-rest/latest/resources/location">Location</a> resources to manage a store's inventory across multiple locations.</p> ## Resource Properties ### InventoryItem * cost: The unit cost of the inventory item. The shop's default currency is used. * Type: x-string * Example: "25.00" * country_code_of_origin: The country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2" target="_blank">ISO 3166-1 alpha-2</a>) of where the item came from. * Type: x-string * Example: "FR" * country_harmonized_system_codes: An array of country-specific <a href="https://en.wikipedia.org/wiki/Harmonized_System" target="_blank">Harmonized System</a> (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. * Type: x-string * Example: [{"harmonized_system_code"=>"1234561111", "country_code"=>"CA"}, {"harmonized_system_code"=>"1234562222", "country_code"=>"US"}] * created_at: The date and time (<a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 format</a>) when the inventory item was created. * Type: x-string * Example: "2012-08-24T14:01:47-04:00" * harmonized_system_code: The general <a href="https://en.wikipedia.org/wiki/Harmonized_System" target="_blank">Harmonized System</a> (HS) code for the inventory item. Used if a country-specific HS code (`countryHarmonizedSystemCode`) is not available. * Type: x-string * Example: 123456 * id: The ID of the inventory item. * Type: x-string * Example: 450789469 * province_code_of_origin: The province code (<a href="https://en.wikipedia.org/wiki/ISO_3166-2" target="_blank">ISO 3166-2 alpha-2</a>) of where the item came from. The province code is only used if the shipping provider for the inventory item is Canada Post. * Type: x-string * Example: "QC" * sku: The unique SKU (stock keeping unit) of the inventory item. Case-sensitive string. * Type: x-string * Example: "IPOD2008PINK" * tracked: Whether inventory levels are tracked for the item. If true, then the inventory quantity changes are tracked by Shopify. * Type: x-string * Example: true * updated_at: The date and time (<a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 format</a>) when the inventory item was last modified. * Type: x-string * Example: "2012-08-24T14:01:47-04:00" * requires_shipping: Whether a customer needs to provide a shipping address when placing an order containing the inventory item. * Type: x-string * Example: true ## Retrieves a detailed list for inventory items by IDs Retrieves a list that will display details for the inventory item IDs you specify. <strong>Note:</strong> This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to <a href='/api/usage/pagination-rest'>Make paginated requests to the REST Admin API</a>. ### Endpoint /admin/api/#{api_version}/inventory_items.json?ids=808950810,39072856,457924702 (GET) ### Parameters * api_version (required): * ids (required): Show only inventory items specified by a comma-separated list of IDs. * limit: The maximum number of results to show. ### Responses #### 200 Retrieves a detailed list for inventory items by IDs Examples: ##### Retrieves a detailed list for inventory items by IDs Request: ``` GET /admin/api/unstable/inventory_items.json ``` Response: ``` HTTP/1.1 200 OK {"inventory_items":[{"id":39072856,"sku":"IPOD2008GREEN","created_at":"2025-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:29:59-05: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-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:29:59-05: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-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:29:59-05: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"}]} ``` ## Retrieves a single inventory item by ID Retrieves a single inventory item by ID ### Endpoint /admin/api/#{api_version}/inventory_items/{inventory_item_id}.json (GET) ### Parameters * api_version (required): * inventory_item_id (required): ### Responses #### 200 Retrieves a single inventory item by ID Examples: ##### Retrieve an inventory item by ID Request: ``` GET /admin/api/unstable/inventory_items/808950810.json ``` Response: ``` HTTP/1.1 200 OK {"inventory_item":{"id":808950810,"sku":"IPOD2008PINK","created_at":"2025-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:29:59-05: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"}} ``` ## Updates an existing inventory item Updates an existing inventory item ### Endpoint /admin/api/#{api_version}/inventory_items/{inventory_item_id}.json (PUT) ### Parameters * api_version (required): * inventory_item_id (required): ### Responses #### 200 Updates an existing inventory item Examples: ##### Update an inventory item's SKU Request: ``` PUT /admin/api/unstable/inventory_items/808950810.json {"inventory_item":{"id":808950810,"sku":"new sku"}} ``` Response: ``` HTTP/1.1 200 OK {"inventory_item":{"id":808950810,"sku":"new sku","created_at":"2025-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:37:01-05: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 Request: ``` PUT /admin/api/unstable/inventory_items/808950810.json {"inventory_item":{"id":808950810,"cost":"25.00"}} ``` Response: ``` HTTP/1.1 200 OK {"inventory_item":{"id":808950810,"sku":"IPOD2008PINK","created_at":"2025-01-02T11:29:59-05:00","updated_at":"2025-01-02T11:29:59-05: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"}} ```