Update Inventory Levels
Name
put_inventory_level
Description
Related Tables
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
InventoryItemId |
DT_I8
|
bigint
|
False |
||
LocationId |
DT_I8
|
bigint
|
False |
||
UpdatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
Available |
DT_I4
|
int
|
False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
InventoryItemId |
DT_I8
|
bigint
|
False |
||
LocationId |
DT_I8
|
bigint
|
False |
||
AvailableAdjustment |
DT_I4
|
int
|
False |
||
Available |
DT_I4
|
int
|
False |
Examples
SSIS
Use Shopify Connector in API Source component to read data or in API Destination component to read/write data:
Update rows in InventoryLevels table using API Destination
This Endpoint belongs to InventoryLevels table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Adjust inventory level for a specific inventory / location id(s)
Adjusts the inventory level of an inventory item at a single location
UPDATE InventoryLevels
SET AvailableAdjustment=488,
LocationId=25801916516
WHERE InventoryItemId=43512276942948
WITH(
Action='Adjust' --or set or connect
, ContineOn404Error=0
)
Set / insert inventory with a specific inventory item and location id
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
UPDATE InventoryLevels
SET LocationId=25801916516
,Available=488
WHERE InventoryItemId=43512276942948
WITH(
Action='set' --or adjust or connect
, ContineOn404Error=0
)
--OR--
/*
INSERT INTO InventoryLevels (InventoryItemId,LocationId,Available)
VALUES(43512276942948, 25801916516, 488)
--WITH( ContineOn404Error=0 )
*/
Connects an inventory item to a location
Connects an inventory item to a location by creating an inventory level at that location.
UPDATE InventoryLevels
SET LocationId=25801916516
WHERE InventoryItemId=43512276942948
WITH(
Action='connect' --or adjust or set
, ContineOn404Error=0
)
put_inventory_level
endpoint belongs to
InventoryLevels
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Adjust inventory level for a specific inventory / location id(s)
Adjusts the inventory level of an inventory item at a single location
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE InventoryLevels
SET AvailableAdjustment=488,
LocationId=25801916516
WHERE InventoryItemId=43512276942948
WITH(
Action=''Adjust'' --or set or connect
, ContineOn404Error=0
)';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Set / insert inventory with a specific inventory item and location id
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
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE InventoryLevels
SET LocationId=25801916516
,Available=488
WHERE InventoryItemId=43512276942948
WITH(
Action=''set'' --or adjust or connect
, ContineOn404Error=0
)
--OR--
/*
INSERT INTO InventoryLevels (InventoryItemId,LocationId,Available)
VALUES(43512276942948, 25801916516, 488)
--WITH( ContineOn404Error=0 )
*/';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Connects an inventory item to a location
Connects an inventory item to a location by creating an inventory level at that location.
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE InventoryLevels
SET LocationId=25801916516
WHERE InventoryItemId=43512276942948
WITH(
Action=''connect'' --or adjust or set
, ContineOn404Error=0
)';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
put_inventory_level
endpoint belongs to
InventoryLevels
table(s), and can therefore be used via those table(s).