List variants for pickers
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/products/variants/list?store_id=1&ids=1&ids=2&ids=3&limit=20&offset=0&search=cotton%20shirt&keyword=cotton%20shirt&status=draft&inventory_status=in_stock&collection_id=12&sort_by=id&sort_order=asc&include_counts=true&include_variants=false&include_combinations=false&include_promotion=false&min_price=10&max_price=100&external_id_pattern=tiktok_%25&filters=%5B%7B%22field%22%3A%22status%22%2C%22operator%22%3A%22is_not%22%2C%22values%22%3A%5B%22draft%22%5D%7D%5D';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://apibase.ecomweb.app/api/v1/stores/example/products/variants/list?store_id=1&ids=1&ids=2&ids=3&limit=20&offset=0&search=cotton%20shirt&keyword=cotton%20shirt&status=draft&inventory_status=in_stock&collection_id=12&sort_by=id&sort_order=asc&include_counts=true&include_variants=false&include_combinations=false&include_promotion=false&min_price=10&max_price=100&external_id_pattern=tiktok_%25&filters=%5B%7B%22field%22%3A%22status%22%2C%22operator%22%3A%22is_not%22%2C%22values%22%3A%5B%22draft%22%5D%7D%5D' \ --header 'x-api-key: <x-api-key>'Returns a compact array of variants across products, each with its product name, a readable option label, price, promotion price and the full variant. It takes the same filters as the product list and returns the first 100 products’ variants when no limit is given. The filters parameter is a JSON array of clauses, each {"field", "operator", "values"}, with at most 10 clauses and 50 values per clause. Fields: status (is, is_not; draft, active or unlisted), category and product_type (is, is_not), tag and collection (is, is_not; numeric IDs), sales_channel (is; numeric IDs), inventory_status (is; in_stock, low_stock or out_of_stock) and price (gte, lte; an amount). sort_by accepts id, name, status, created_at, updated_at, min_price and max_price.
Required scopes: read:products
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Example
1Filter by store ID (required for store-specific queries)
Example
[ 1, 2, 3]Filter by multiple product IDs
Example
20Number of items per page
Example
0Number of items to skip
Example
cotton shirtFree-text search over product name or description
Example
cotton shirtDeprecated alias for search, kept so existing callers keep working. search wins when both are sent. New callers should send search.
Example
activeFilter by product status
Example
low_stockFilter by inventory status (in_stock, low_stock, out_of_stock)
Example
12Only products in this manual collection. A smart collection is refused (400): its products are chosen by its rules.
Example
created_atSort field. Any other value is rejected with a 400 error.
Example
descSort order
Example
trueInclude related counts (variants, inventory)
Example
falseInclude product variants in the response
Example
falseInclude variant combinations (options and values) in the response
Example
falseInclude promotion information in the response
Example
10Filter by minimum price
Example
100Filter by maximum price
Example
tiktok_%Filter by external ID pattern (for bulk imports)
Example
[{"field":"status","operator":"is_not","values":["draft"]}]A JSON array of filter clauses, each {field, operator, values}. At most 10 clauses, at most 50 values each. Fields: status (is, is_not; draft, active, unlisted), category and product_type (is, is_not), tag and collection (is, is_not; numeric IDs), sales_channel (is; numeric IDs), inventory_status (is; in_stock, low_stock, out_of_stock) and price (gte, lte; an amount).
Responses
Section titled “Responses”object
The full variant, with combinations and promotion price.
object
deny rejects checkout when stock is short; continue lets stock go negative.
Package dimensions, or null.
object
Images for this variant.
object
Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.
Image URL: the asset’s public_url or cdn_url
Canva design ID
Canva design edit URL
Canva asset ID
Image alt text
Image caption
Sort order for image display
Whether this is the primary image
Attribute values that define this variant. Present only when combinations are requested.
object
The attribute (axis), or null when it no longer exists.
object
Attribute ID.
Attribute name, such as “Color”.
URL-safe identifier of the attribute, unique within the store.
How values are chosen, such as select.
How the values are ordered, such as manual.
Position of the attribute among the store’s attributes.
When the attribute was created, as an ISO 8601 timestamp.
When the attribute was last updated, as an ISO 8601 timestamp.
Code of the global taxonomy attribute this one maps to, or null for a local attribute.
The chosen value, or null when it no longer exists.
object
Attribute value ID.
ID of the attribute this value belongs to.
Stored value, such as “red”.
Value as shown to shoppers, such as “Red”.
Swatch kind: none, color or image.
Swatch content: a color code or an image URL. Empty when there is no swatch.
Position of the value within its attribute.
When the value was created, as an ISO 8601 timestamp.
When the value was last updated, as an ISO 8601 timestamp.
Code of the global taxonomy value this one maps to, or null.
Active promotions on this variant. Present only when promotions are requested on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
The promotion giving the lowest price, or null. Present only when promotions are requested on a single product.
object
Promotion ID.
Promotion name.
Promotion description.
How the promotion is applied, such as automatic or code.
Discount code, for code promotions.
Promotion type.
What the promotion targets, such as product or variant.
How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.
Discount amount or percentage.
Upper bound on the discount amount.
Fixed price the item is sold at, for fixed-price promotions.
Minimum order amount for the promotion to apply.
Minimum quantity for the promotion to apply.
When the promotion starts, as an ISO 8601 timestamp.
When the promotion ends, as an ISO 8601 timestamp.
Price after the promotion.
Price before the promotion.
Amount taken off the original price.
Variant ID.
ID of the product this variant belongs to.
Store-wide numeric SKU identifier, assigned automatically.
Merchant-assigned SKU, or null.
The variant’s ID in an external system, or null.
Selling price in the store’s currency.
Units available across all locations.
Counter that increases on every stock change.
Stock level at or below which the variant counts as low stock.
Whether stock is tracked. When false the variant never runs out.
Unit cost to the store. Present only when the key holds the read:inventory scope.
Null when no cost is recorded.
Weight, in the store’s weight unit, or null.
Whether this is the product’s default variant.
Variant status, such as active or inactive.
When the variant was created, as an ISO 8601 timestamp.
When the variant was last updated, as an ISO 8601 timestamp.
Price after the best active promotion. Present only when promotions are requested; null when none applies.
Variant ID.
Name of the product the variant belongs to.
Readable label of the variant’s options, such as “Color: Red, Size: M”, or “Default”.
Variant price.
Price after promotion, or null.
URL of the product’s first image, or null.
Example
[ { "variant": { "inventory_policy": "deny", "images": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/image.jpg", "design_id": "DABCdefg123", "design_edit_url": "https://canva.com/design/edit/123", "canva_asset_id": "asset123", "alt": "Product image", "caption": "Main product view", "sort_order": 1, "is_primary": true } ] } }]The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}