Reference

Endpoint Update a Product Variant


Name

put_product_variant

Description

Updates an existing product variant. [API reference]

Related Tables

ProductVariants

Parameters

Parameter Required Options
Name: Id

Label: Product Variant Id

The ID of the product variant to be updated.
YES

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_I8 bigint
ProductId DT_I8 bigint
Title DT_WSTR nvarchar(100) 100
Sku DT_WSTR nvarchar(500) 500
Price DT_WSTR nvarchar(100) 100
CompareAtPrice DT_WSTR nvarchar(100) 100
Position DT_I4 int
Option1 DT_WSTR nvarchar(500) 500
Option2 DT_WSTR nvarchar(500) 500
Option3 DT_WSTR nvarchar(500) 500
CreatedAt DT_DBTIMESTAMP datetime
UpdatedAt DT_DBTIMESTAMP datetime
Taxable DT_BOOL bit
InventoryItemId DT_I8 bigint
InventoryQuantity DT_I4 int
OldInventoryQuantity DT_I4 int
InventoryPolicy DT_WSTR nvarchar(50) 50
InventoryManagement DT_WSTR nvarchar(100) 100
FulfillmentService DT_WSTR nvarchar(100) 100
Barcode DT_WSTR nvarchar(500) 500
Grams DT_I4 int
ImageId DT_WSTR nvarchar(500) 500
Weight DT_R8 float
WeightUnit DT_WSTR nvarchar(50) 50
RequiresShipping DT_BOOL bit
AdminGraphqlApiId DT_WSTR nvarchar(500) 500
PresentmentPrices DT_WSTR nvarchar(4000) 4000
If the column you are looking for is missing, consider customizing Shopify Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_I8 bigint
ProductId DT_I8 bigint
Title DT_WSTR nvarchar(500) 500
Price DT_WSTR nvarchar(100) 100
Sku DT_WSTR nvarchar(500) 500
Position DT_I4 int
InventoryPolicy DT_WSTR nvarchar(50) 50
CompareAtPrice DT_WSTR nvarchar(100) 100
FulfillmentService DT_WSTR nvarchar(100) 100
InventoryManagement DT_WSTR nvarchar(100) 100
Option1 DT_WSTR nvarchar(500) 500
Option2 DT_WSTR nvarchar(500) 500
Option3 DT_WSTR nvarchar(500) 500
Taxable DT_BOOL bit
Barcode DT_WSTR nvarchar(500) 500
Grams DT_I4 int
ImageId DT_WSTR nvarchar(500) 500
Weight DT_R8 float
WeightUnit DT_WSTR nvarchar(50) 50
InventoryItemId DT_I8 bigint
InventoryQuantity DT_I4 int
OldInventoryQuantity DT_I4 int
RequiresShipping DT_BOOL bit
AdminGraphqlApiId DT_WSTR nvarchar(500) 500
Required columns that you need to supply are bolded.

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 ProductVariants table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to update a product variant:

API Destination - Shopify
Shopify Connector can be used to integrate Shopify REST API in your App / BI Tools. You can read/write data about Customers, Orders, OrderItems, Products and more.
Shopify
ProductVariants
Update
There are no parameters to configure.
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Update product variant price, image, weight

This example shows how to update product variant price, image, weight and other attributes.

Update ProductVariants 
SET  
	,Option1='Chocolate' 
	,Option2='Large'
	,SKU='ICE-CHO-SML'
	,Price=90.45
	,CompareAtPrice=100.45
	,Position=2
	,Weight=10.5
	,WeightUnit='lb'
	,ImageId=31900013854820  --use available images from Products table
Where Id=42564507992164

put_product_variant endpoint belongs to ProductVariants 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:

Update product variant price, image, weight

This example shows how to update product variant price, image, weight and other attributes.

DECLARE @MyQuery NVARCHAR(MAX) = 'Update ProductVariants 
SET  
	,Option1=''Chocolate'' 
	,Option2=''Large''
	,SKU=''ICE-CHO-SML''
	,Price=90.45
	,CompareAtPrice=100.45
	,Position=2
	,Weight=10.5
	,WeightUnit=''lb''
	,ImageId=31900013854820  --use available images from Products table
Where Id=42564507992164';

EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];

put_product_variant endpoint belongs to ProductVariants table(s), and can therefore be used via those table(s).