Endpoint Update Inventory Levels
Name
put_inventory_level
Description
Related Tables
Parameters
Parameter | Required | Options | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: Action |
YES |
|
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
InventoryItemId |
DT_I8
|
bigint
|
||
LocationId |
DT_I8
|
bigint
|
||
UpdatedAt |
DT_DBTIMESTAMP
|
datetime
|
||
Available |
DT_I4
|
int
|
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
InventoryItemId |
DT_I8
|
bigint
|
||
LocationId |
DT_I8
|
bigint
|
||
AvailableAdjustment |
DT_I4
|
int
|
||
Available |
DT_I4
|
int
|
Examples
SSIS
Use Shopify Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Destination
This Endpoint belongs to the InventoryLevels table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to update inventory levels:
Required Parameters | |
---|---|
Action | Fill-in the parameter... |
Optional Parameters | |
ContineOn404Error | False |

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).