Reference

Endpoint Get Product Variants


Name

get_product_variants

Description

Gets a list of products with their variants. [API reference]

Related Tables

ProductVariants

Parameters

Parameter Required Options
Name: ids

Label: Product Id(s) - Comma separated

Restrict results to records specified by a comma-separated list of IDs. Max IDs per request controlled by BatchSize property (found in PaginationParams)
Name: since_id

Label: Since Product Id

Restrict results created after the specified product ID.
Name: fields

Label: Only Fields to Show

Limit data retrieval to only the selected product-related fields.
Option Value
id id
title title
body_html body_html
vendor vendor
product_type product_type
created_at created_at
handle handle
updated_at updated_at
published_at published_at
template_suffix template_suffix
status status
published_scope published_scope
tags tags
admin_graphql_api_id admin_graphql_api_id
variants variants
options options
images images
image image
Name: created_at_max

Label: Created Before

Restrict results to products created before a specified date. (format: 2014-04-25T16:15:47-04:00)
Name: created_at_min

Label: Created After

Restrict results to products created after a specified date. (format: 2014-04-25T16:15:47-04:00)
Name: updated_at_max

Label: Updated Before

Restrict results to products last updated before a specified date. (format: 2014-04-25T16:15:47-04:00)
Name: updated_at_min

Label: Updated After

Restrict results to products last updated after a specified date. (format: 2014-04-25T16:15:47-04:00)
Name: limit

Label: Page Size

The maximum number of records to show.
Name: ExtraApiFeatures

Label: Extra Api Features (** SLOW **)

Option Value
None
Output Presentment Prices (All Currencies) include-presentment-prices

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
ProductTitle DT_WSTR nvarchar(500) 500
ProductBodyHtml DT_NTEXT nvarchar(MAX)
ProductVendor DT_WSTR nvarchar(500) 500
ProductType DT_WSTR nvarchar(500) 500
ProductCreatedAt DT_DBTIMESTAMP datetime
ProductHandle DT_WSTR nvarchar(500) 500
ProductUpdatedAt DT_DBTIMESTAMP datetime
ProductPublishedAt DT_DBTIMESTAMP datetime
ProductTemplateSuffix DT_WSTR nvarchar(500) 500
ProductStatus DT_WSTR nvarchar(100) 100
ProductPublishedScope DT_WSTR nvarchar(50) 50
ProductTags DT_WSTR nvarchar(500) 500
ProductAdminGraphqlApiId DT_WSTR nvarchar(500) 500
ProductImage DT_WSTR nvarchar(500) 500
ProductImageId DT_I8 bigint
ProductImageProductId DT_I8 bigint
ProductImagePosition DT_I4 int
ProductImageCreatedAt DT_DBTIMESTAMP datetime
ProductImageUpdatedAt DT_DBTIMESTAMP datetime
ProductImageAlt DT_WSTR nvarchar(500) 500
ProductImageWidth DT_I4 int
ProductImageHeight DT_I4 int
ProductImageSrc DT_WSTR nvarchar(1000) 1000
ProductImageAdminGraphqlApiId DT_WSTR nvarchar(500) 500
If the column you are looking for is missing, consider customizing Shopify Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
ProductId DT_I8 bigint
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 Source

This Endpoint belongs to the ProductVariants table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - 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
Optional Parameters
Product Id(s) - Comma separated
Since Product Id
Only Fields to Show
Created Before
Created After
Updated Before
Updated After
SSIS API Source - Read from table or endpoint

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 get product variants:

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
Select, Lookup
Optional Parameters
Product Id(s) - Comma separated
Since Product Id
Only Fields to Show
Created Before
Created After
Updated Before
Updated After
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get list of all product variants

SELECT * FROM ProductVariants

Get all product variants by multiple specific product IDs

SELECT * FROM ProductVariants WITH(ids='1111111111111,2222222222222,3333333333333')

Get all product variants by a specific product ID

SELECT * FROM ProductVariants Where ProductId='1111111111111'

get_product_variants 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:

Get list of all product variants

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ProductVariants';

EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];

Get all product variants by multiple specific product IDs

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ProductVariants WITH(ids=''1111111111111,2222222222222,3333333333333'')';

EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];

Get all product variants by a specific product ID

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ProductVariants Where ProductId=''1111111111111''';

EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];

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