Data schemas
Quantities assigned to warehouse locations
AllocationData · Schema · Stock and inventory models
location_codeStringRequiredWarehouse location code.
location_idStringRequiredWarehouse location identifier.
location_nameStringRequiredWarehouse location name.
on_handIntegerRequiredPhysical stock quantity.
Additional fields: No
List stock records — Response
ApiResponse_list_StockData__ · Fields, types and constraints of data accepted or returned by the API.
dataArray <StockData> RequiredResponse example · ApiResponse_list_StockData__.
metaContextPageMetaContextMetaPageMetaRequestMetaRequiredResponse metadata.
Additional fields: No
Get a stock record — Response
ApiResponse_StockDetailData_ · Fields, types and constraints of data accepted or returned by the API.
dataStockDetailDataRequiredResponse example · StockDetailData.
metaContextPageMetaContextMetaPageMetaRequestMetaRequiredResponse metadata.
Additional fields: No
Update a manual reservation — Request body
ManualReservationUpdate · Fields, types and constraints of data accepted or returned by the API.
expected_versionIntegerRequiredVersion read before the write; a mismatch rejects the update.
minimum:1maximum:9223372036854775807manual_reservedIntegerRequiredQuantity reserved manually.
minimum:0maximum:2147483647reasonStringOptionalReason recorded for the change.
maxLength:500
Additional fields: No
Update a sales limit — Request body
SalesLimitUpdate · Fields, types and constraints of data accepted or returned by the API.
expected_versionIntegerRequiredVersion read before the write; a mismatch rejects the update.
minimum:1maximum:9223372036854775807reasonStringOptionalReason recorded for the change.
maxLength:500sellable_limitIntegerRequiredSales limit: -1 means unlimited and 0 disables available sales.
minimum:-1maximum:2147483647
Additional fields: No
Create a stock adjustment — Request body
StockAdjustmentCreate · Fields, types and constraints of data accepted or returned by the API.
expected_versionIntegerRequiredVersion read before the write; a mismatch rejects the update.
minimum:0maximum:9223372036854775807locationsArray <LocationQuantity> RequiredWarehouse locations.
minItems:1maxItems:100reasonStringRequiredReason recorded for the change.
minLength:1maxLength:500target_idStringRequiredIdentifier of the product or variant affected by the operation.
Constraints
pattern"^[a-z0-9][a-z0-9_-]{0,62}$"
target_typeStringRequiredWhether the operation concerns a product or a variant.
Constraints
enum["product", "variant"]
warehouse_idStringRequiredWarehouse identifier.
Constraints
pattern"^[a-z0-9][a-z0-9_-]{0,62}$"
Additional fields: No
Update a stock record — Request body
StockAdjustmentUpdate · Fields, types and constraints of data accepted or returned by the API.
expected_versionIntegerRequiredVersion read before the write; a mismatch rejects the update.
minimum:1maximum:9223372036854775807locationsArray <LocationQuantity> RequiredWarehouse locations.
minItems:1maxItems:100reasonStringRequiredReason recorded for the change.
minLength:1maxLength:500
Additional fields: No
List stock records — Response
StockData · Fields, types and constraints of data accepted or returned by the API.
activeBooleanRequiredWhether the resource is active.
availableInteger nullRequiredQuantity available for sale; null represents an unbounded amount.
idStringRequiredResource identifier; preserve it as returned. (StockData).
manual_reservedIntegerRequiredQuantity reserved manually.
on_handIntegerRequiredPhysical stock quantity.
reservedIntegerRequiredQuantity reserved by orders.
sellable_limitIntegerRequiredSales limit: -1 means unlimited and 0 disables available sales.
target_idStringRequiredIdentifier of the product or variant affected by the operation.
target_typeStringRequiredWhether the operation concerns a product or a variant.
Constraints
enum["product", "variant"]
total_reservedIntegerRequiredTotal reserved quantity.
updated_atStringRequiredMost recent update time.
format:"date-time"versionIntegerRequiredResource version used for concurrency control.
warehouse_idStringRequiredWarehouse identifier.
Additional fields: No
Get a stock record — Response
StockDetailData · Fields, types and constraints of data accepted or returned by the API.
activeBooleanRequiredWhether the resource is active.
allocationsArray <AllocationData> RequiredQuantities assigned to warehouse locations.
availableInteger nullRequiredQuantity available for sale; null represents an unbounded amount.
idStringRequiredResource identifier; preserve it as returned. (StockDetailData).
manual_reservedIntegerRequiredQuantity reserved manually.
on_handIntegerRequiredPhysical stock quantity.
reservedIntegerRequiredQuantity reserved by orders.
sellable_limitIntegerRequiredSales limit: -1 means unlimited and 0 disables available sales.
target_idStringRequiredIdentifier of the product or variant affected by the operation.
target_typeStringRequiredWhether the operation concerns a product or a variant.
Constraints
enum["product", "variant"]
total_reservedIntegerRequiredTotal reserved quantity.
updated_atStringRequiredMost recent update time.
format:"date-time"versionIntegerRequiredResource version used for concurrency control.
warehouse_idStringRequiredWarehouse identifier.
Additional fields: No