InventoryItem
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-01/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2020-01/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2020-01/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2020-01/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2020-01/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2020-01/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2020-01/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-04/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2020-04/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2020-04/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2020-04/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2020-04/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2020-04/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2020-04/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-07/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2020-07/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2020-07/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2020-07/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2020-07/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2020-07/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2020-07/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-10/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2020-10/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2020-10/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2020-10/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2020-10/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2020-10/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2020-10/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2021-01/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2021-01/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2021-01/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2021-01/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2021-01/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2021-01/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2021-01/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/2021-04/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/2021-04/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/2021-04/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/2021-04/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/2021-04/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/2021-04/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/2021-04/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}
An inventory item represents the physical good available to be shipped to a customer. 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 resource to retrieve inventory information.
Use the InventoryItem resource together with the InventoryLevel and Location resources to manage a store's inventory across multiple locations.
What you can do with InventoryItem
The Shopify API lets you do the following with the InventoryItem resource. More detailed versions of these general actions may be available:
- GET /admin/api/unstable/inventory_items.json?ids=808950810,39072856,457924702 Retrieves a list of inventory items
- GET /admin/api/unstable/inventory_items/{inventory_item_id}.json Retrieves a single inventory item by ID
- PUT /admin/api/unstable/inventory_items/{inventory_item_id}.json Updates an existing inventory item
InventoryItem properties
cost |
The unit cost of the inventory item. |
country_code_of_origin |
The two-digit code for the country where the inventory item was made. |
country_harmonized_system_codes |
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries. |
created_at
read-only |
The date and time (ISO 8601 format) when the inventory item was created. |
harmonized_system_code |
The general Harmonized System (HS) code for the inventory item. Used if a country-specific HS code is not available. |
id
read-only |
The ID of the inventory item. |
province_code_of_origin |
The two-digit code for the province where the inventory item was made. Used only if the shipping provider for the inventory item is Canada Post. |
sku |
The unique SKU (stock keeping unit) of the inventory item. |
tracked |
Whether the inventory item is tracked. If true, then inventory quantity changes are tracked by Shopify. |
updated_at
read-only |
The date and time (ISO 8601 format) when the inventory item was last modified. |
requires_shipping |
Whether a customer needs to provide a shipping address when placing an order containing the inventory item. |
Endpoints
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
ids
required |
Show only inventory items specified by a comma-separated list of IDs. (maximum:100 )
|
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
Retrieve a list of inventory items
GET /admin/api/unstable/inventory_items.json?ids=808950810,39072856,457924702
View Response
HTTP/1.1 200 OK
{
"inventory_items": [
{
"id": 39072856,
"sku": "IPOD2008GREEN",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
]
}
Retrieve an inventory item by ID
GET /admin/api/unstable/inventory_items/808950810.json
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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 SKU
PUT /admin/api/unstable/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"sku": "new sku"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "new sku",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:26:50-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
PUT /admin/api/unstable/inventory_items/808950810.json
{
"inventory_item": {
"id": 808950810,
"cost": "25.00"
}
}
View Response
HTTP/1.1 200 OK
{
"inventory_item": {
"id": 808950810,
"sku": "IPOD2008PINK",
"created_at": "2021-01-01T14:22:39-05:00",
"updated_at": "2021-01-01T14:22:39-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"
}
}