Inventory Item Object


Inventory Item.

Each inventory item represents a specific product variant at a specific location. The combination of variantId and locationId is unique — you can't have two inventory items for the same variant at the same location.

Properties
_idstringRead-onlyformat GUID

Inventory item ID.


revisionstringRead-onlyformat int64

Revision number, which increments by 1 each time the inventory item is updated. To prevent conflicting changes, the current revision must be passed when updating the inventory item.

Ignored when creating an inventory item.


_createdDateDateRead-onlyformat date-time

Date and time the inventory item was created.


_updatedDateDateRead-onlyformat date-time

Date and time the inventory item was last updated.


variantIdstringformat GUIDimmutable

Variant ID.


locationIdstringformat GUIDimmutable

Stores location ID. If not specified when creating an inventory item, the store's default location is used.


productIdstringminLength 1maxLength 36immutable

Product ID.


trackQuantitybooleanRead-only

Whether the quantity is being tracked.


availabilityStatusstringRead-only

Inventory item availability status.


preorderInfoPreorderInfo

Item preorder info.

Preorder settings are configured per inventory item, so each variant-location combination can have its own preorder configuration.

Note: The product entity's inventory.preorderStatus and inventory.preorderAvailability fields reflect only the default location's preorder state.


productProductRead-only

Associated product and variant details.


extendedFieldsExtendedFields

Custom field data for the inventory item object.

Extended fields must be configured in the app dashboard before they can be accessed with API calls.


One Of

inStockboolean

Indicates that inventory is tracked by status rather than quantity.

When set to true, the item is marked as available for sale without tracking exact quantities. When set to false, the item is marked as out of stock. This tracking method is useful for made-to-order products or items with unlimited inventory.

When using this tracking method, trackQuantity is false and preorder limits aren't supported.


quantityintegerminimum -99999maximum 99999

Indicates that inventory is tracked by quantity.

Set this field to the number of items currently in stock. This tracking method is useful when you need to know exactly how many items are available.

When using this tracking method, trackQuantity is true. Quantity can be negative when inventory is decremented for an order that has already been paid.

Did this help?