Endpoint Get Product Variants
Name
get_product_variants
Description
Gets a list of products with their variants. [API reference]
Related Tables
Parameters
| Parameter | Required | Options | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Name:
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:
Label: Since Product Id Restrict results created after the specified product ID. |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Only Fields to Show Limit data retrieval to only the selected product-related fields. |
|
|||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Created Before Restrict results to products created before a specified date. (format: 2014-04-25T16:15:47-04:00) |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Created After Restrict results to products created after a specified date. (format: 2014-04-25T16:15:47-04:00) |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Updated Before Restrict results to products last updated before a specified date. (format: 2014-04-25T16:15:47-04:00) |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Updated After Restrict results to products last updated after a specified date. (format: 2014-04-25T16:15:47-04:00) |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Page Size The maximum number of records to show. |
||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Extra Api Features (** SLOW **) |
|
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 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| ProductId |
DT_I8
|
bigint
|
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:
| Optional Parameters | |
|---|---|
| Product Id(s) - Comma separated | |
| Since Product Id | |
| Only Fields to Show | |
| Created Before | |
| Created After | |
| Updated Before | |
| Updated After | |
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:
| Optional Parameters | |
|---|---|
| Product Id(s) - Comma separated | |
| Since Product Id | |
| Only Fields to Show | |
| Created Before | |
| Created After | |
| Updated Before | |
| Updated After | |
ODBC application
Use these SQL queries in your ODBC application data source:
Read product variants
<p>Gets a list of all product variants from the <code>ProductVariants</code> table.</p>
SELECT * FROM ProductVariants
Read product variants by multiple product IDs
<p>Gets variants for multiple products by supplying a comma-separated list of product IDs in the <code>ids</code> parameter within the <code>WITH</code> clause.</p>
SELECT * FROM ProductVariants WITH(ids='1111111111111,2222222222222,3333333333333')
Read product variants by product ID
<p>Gets all variants belonging to a specific product. Supply the <code>ProductId</code> in the <code>WHERE</code> clause.</p>
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:
Read product variants
<p>Gets a list of all product variants from the <code>ProductVariants</code> table.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ProductVariants';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Read product variants by multiple product IDs
<p>Gets variants for multiple products by supplying a comma-separated list of product IDs in the <code>ids</code> parameter within the <code>WITH</code> clause.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM ProductVariants WITH(ids=''1111111111111,2222222222222,3333333333333'')';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Read product variants by product ID
<p>Gets all variants belonging to a specific product. Supply the <code>ProductId</code> in the <code>WHERE</code> clause.</p>
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).