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. For details and migration steps, visit our migration guide.
Inventory Level
inventory
access scope.An inventory level represents the quantities of an inventory item for a location.
Each inventory level belongs to one inventory item and has one location. For every location where an inventory item can be stocked, there's an inventory level that represents the inventory item's quantities relating to that location.

Before you begin updating inventory, it's helpful to understand the relationships between the inventory resources:
- Product Variant: Contains merchandising information,
such as price, description, and images. Think of this as the product information that you might want a customer to see.
All product variants have a 1:1 relationship with their associated inventory item. Each product variant has one inventory item, and that inventory item belongs only to that product variant.
- InventoryItem: Contains information about the physical product, such as its SKU.
Think of this as the back-end information used for managing inventory, shipping, and fulfillments.
Inventory items are associated with one or many inventory levels. An inventory item will have an inventory level for each location where the item is stocked.
- InventoryLevel: Represents the actual quantity of an item that is available.
Inventory levels connect one inventory item to one location. Each inventory level holds the available quantity for its inventory item at the associated location.
- Location: Represents a geographical location where a merchant does business,
such as a retail store or warehouse.
Locations can have many inventory levels. Each location has one inventory level for each inventory item that the location stocks.
How an order affects inventory
When a product variant that Shopify tracks is included in an order, Shopify decrements the inventory for that variant. Shopify doesn't know which location the item will be fulfilled from, so Shopify decrements the inventory level at the location that has the lowest ID.
When an order is fulfilled, the fulfillment includes the ID of the location where the fulfillment is taking place. Shopify checks whether the fulfillment location matches the original location where stock was decremented, and then adjusts the inventory if necessary:
- If the fulfillment location matches the original location, then no action is needed.
- If the fulfillment location doesn't match the original location, then Shopify decrements the inventory level at the fulfillment location and increments the inventory level at the original location.
Example: Inventory adjustments for a simple order
An online store uses two warehouses to stock product inventory: one in Los Angeles (ID: 6884556842
),
and one in New York (ID: 13968834616
). One of the store's products is a hat that's stocked at both locations with the following inventory levels:
- Los Angeles: 8
- New York: 6
A customer places an order for a hat. The Los Angeles location has the lowest ID, so Shopify decrements the item's inventory level at that location:
- Los Angeles: 7
- New York: 6
The order is actually fulfilled from the New York location. When the fulfillment is created, it includes the ID for the New York location. Shopify compares the fulfillment location ID to the original location and finds that they're different. Shopify then increments the inventory level at the Los Angeles location, and decrements the inventory level at the New York location:
- Los Angeles: 8
- New York: 5
Inventory levels and fulfillment service locations
A fulfillment service location has a 1:1
relationship with a third-party fulfillment service. When an app creates a new fulfillment service
on a store, Shopify automatically creates a location that's associated with that fulfillment service. The FulfillmentService resource has a
location_id
property, which identifies the associated location.
An inventory item connected to a fulfillment service location can't be connected to any other locations at the same time:

Connecting an inventory item to a fulfillment service location
When you work with items that have been or will be connected a fulfillment location, you should include
"relocate_if_necessary": true
in the body of the request. There are two situations where you might
do this:
- connecting an inventory item to a fulfillment service location and disconnecting it from all standard locations
- connecting an inventory item to one or more standard locations and disconnecting it from a fulfillment service location
If relocate_if_necessary
is true
, then all
inventory for the item is relocated to the new location and disconnected from any other locations. If a fulfillment service location is involved but
relocate_if_necessary
is false
, then the connection will fail. If no fulfillment service is involved, then the
property is ignored and no inventory is relocated.
Setting the inventory level at a fulfillment service location
When you set inventory for a location, the inventory item is connected to the location if they are not already connected.
If the item has been or will be connected to a fulfillment service location, then you should include "disconnect_if_necessary": true
in the body of the request.
There are two situations where you might do this:
- setting inventory for an inventory item at a fulfillment service location when the item is already connected to one or more standard locations
- setting inventory for an inventory item at a standard location when the item is already connected to a fulfillment service location
The inventory at the new location is set to the value of the available
property. The inventory for
other locations is set to 0 and the locations are disconnected from the inventory item.
If disconnect_if_necessary
is set to false
when you set inventory at a location and a fulfillment service
location is involved, then the action will fail. If no fulfillment service location is involved, then this property is ignored.
Endpoints
- post/admin/api/latest/inventory_
levels/adjust. json Adjusts the inventory level of an inventory item at a location - post/admin/api/latest/inventory_
levels/connect. json Connects an inventory item to a location - post/admin/api/latest/inventory_
levels/set. json Sets the inventory level for an inventory item at a location - get/admin/api/latest/inventory_
levels. json?location_ ids=655441491 Retrieves a list of inventory levels - del/admin/api/latest/inventory_
levels. json?inventory_ item_ id=808950810&location_ id=655441491 Deletes an inventory level from a location
The InventoryLevel resource
Properties
The available quantity of an inventory item at the inventory level's associated location. Returns null
if the inventory item is not tracked.
The ID of the inventory item associated with the inventory level. To find the ID of an inventory item, use the Inventory Item resource
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The date and time (ISO 8601 format) when the inventory level was last modified.
The InventoryLevel resource
Anchor to POST request, Adjusts the inventory level of an inventory item at a locationpostAdjusts the inventory level of an inventory item at a location
Adjusts the inventory level of an inventory item at a single location
The amount to adjust the available inventory quantity. Send negative values to subtract from the current available quantity. For example, "available_adjustment": 2
increases the current available quantity by 2, and "available_adjustment": -3
decreases the current available quantity by 3.
The ID of the inventory item.
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
Adjust the available quantity of an inventory item by 5 at a single location
Adjust the available quantity of an inventory item by 5 at a single location
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
The amount to adjust the available inventory quantity. Send negative values to subtract from the current available quantity. For example, "available_adjustment": 2
increases the current available quantity by 2, and "available_adjustment": -3
decreases the current available quantity by 3.
Adjusting inventory levels at a non-existent location fails and returns an error
Adjusting inventory levels at a non-existent location fails and returns an error
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
The amount to adjust the available inventory quantity. Send negative values to subtract from the current available quantity. For example, "available_adjustment": 2
increases the current available quantity by 2, and "available_adjustment": -3
decreases the current available quantity by 3.
Adjusting inventory levels for an inventory item that is untracked fails and returns an error
Adjusting inventory levels for an inventory item that is untracked fails and returns an error
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
The amount to adjust the available inventory quantity. Send negative values to subtract from the current available quantity. For example, "available_adjustment": 2
increases the current available quantity by 2, and "available_adjustment": -3
decreases the current available quantity by 3.
/admin/api/2025-07/inventory_ levels/adjust. json
Response
Anchor to POST request, Connects an inventory item to a locationpostConnects an inventory item to a location
Connects an inventory item to a location by creating an inventory level at that location.
When connecting inventory items to locations, it's important to understand the rules around fulfillment service locations.
The ID of the inventory item.
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
Whether inventory for any previously connected locations will be relocated. This property is ignored when no fulfillment service location is involved. For more information, refer to Inventory levels and fulfillment service locations.
Connect an inventory item to a location
Connect an inventory item to a location
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
Connecting an inventory item to a fulfillment service location without "relocate_if_necessary": true
fails with a 422 error when permits_sku_sharing is false
Connecting an inventory item to a fulfillment service location without "relocate_if_necessary": true
fails with a 422 error when permits_sku_sharing is false
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
Connecting an inventory item to a non-existent location fails and returns an error
Connecting an inventory item to a non-existent location fails and returns an error
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item.
/admin/api/2025-07/inventory_ levels/connect. json
Response
Anchor to POST request, Sets the inventory level for an inventory item at a locationpostSets the inventory level for an inventory item at a location
Sets the inventory level for an inventory item at a location. If the specified location is not connected, it will be automatically connected first.
When connecting inventory items to locations, it's important to understand the rules around fulfillment service locations.Sets the available inventory quantity.
The ID of the inventory item associated with the inventory level. To find the ID of the inventory item, use the Inventory Item resource
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
Whether inventory for any previously connected locations will be set to 0 and the locations disconnected. This property is ignored when no fulfillment service is involved. For more information, refer to Inventory levels and fulfillment service locations.
Set the available inventory at a location
Set the available inventory at a location
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item associated with the inventory level. To find the ID of the inventory item, use the Inventory Item resource
Sets the available inventory quantity.
Setting an inventory item to a fulfillment service without "disconnect_if_necessary": true
fails with a 422 error
Setting an inventory item to a fulfillment service without "disconnect_if_necessary": true
fails with a 422 error
Show location_id properties
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
The ID of the inventory item associated with the inventory level. To find the ID of the inventory item, use the Inventory Item resource
Sets the available inventory quantity.
/admin/api/2025-07/inventory_ levels/set. json
Response
Anchor to GET request, Retrieves a list of inventory levelsgetRetrieves a list of inventory levels
Retrieves a list of inventory levels.
You must include inventory_item_ids
, location_ids
, or both as filter parameters.
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.
A comma-separated list of inventory item IDs. To find the ID of an inventory item, use the Inventory Item resource
The maximum number of results to show.
A comma-separated list of location IDs. To find the ID of a location, use the Location resource
Show inventory levels updated at or after date (format: 2019-03-19T01:21:44-04:00).
Retrieve inventory levels at a single location
Retrieve inventory levels at a single location
A comma-separated list of location IDs. To find the ID of a location, use the Location resource
Retrieve inventory levels for a single inventory item
Retrieve inventory levels for a single inventory item
A comma-separated list of inventory item IDs. To find the ID of an inventory item, use the Inventory Item resource
Retrieve inventory levels for the specified inventory items and locations
Retrieve inventory levels for the specified inventory items and locations
A comma-separated list of inventory item IDs. To find the ID of an inventory item, use the Inventory Item resource
A comma-separated list of location IDs. To find the ID of a location, use the Location resource
Retrieving inventory levels without specifying location_ids
or inventory_item_ids
fails and returns an error
Retrieving inventory levels without specifying location_ids
or inventory_item_ids
fails and returns an error
/admin/api/2025-07/inventory_ levels. json?location_ ids= 655441491
Response
Anchor to DELETE request, Deletes an inventory level from a locationdelDeletes an inventory level from a location
Deletes an inventory level of an inventory item at a location. Deleting an inventory level for an inventory item removes that item from the specified location. Every inventory item must have at least one inventory level. To move inventory to another location, first connect the inventory item to another location, and then delete the previous inventory level.
The ID for the inventory item.
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource
Delete an inventory level
Delete an inventory level
The ID for the inventory item.
The ID of the location that the inventory level belongs to. To find the ID of the location, use the Location resource