The Read-Only Variants V3 API allows you to query product variants as primary entities with enhanced pagination, filtering, and sorting capabilities. Unlike the Product API where variants are nested within products, this service focuses exclusively on variants, making it easier to implement variant-focused features. Use the Read-Only Variants API when you need to search and filter variants across multiple products efficiently.
For creating, updating, or deleting variants, use the Products V3 API instead.
Choose the right method for your use case:
queryVariants
: Use for simple, structured filtering operations. Ideal when you know specific criteria like product ID and/or variant ID.searchVariants
: Use for complex queries involving free-text search, aggregations, or faceted search for all other fields.Both methods support cursor-based pagination and return the same variant data structure.
Each variant includes:
Variants are defined by their option choices (like "Size: Large" or "Color: Red"). Each option choice includes:
This API operates on an eventually consistent model. Changes made through the Products V3 API (creating, updating, or deleting variants) will synchronize to this service over time. This design optimizes read performance while ensuring data integrity.
For real-time accuracy requirements, verify critical data through the Products V3 API before making business decisions.
Use the fields
parameter to request additional data:
CURRENCY
: Include currency information.MERCHANT_DATA
: Cost, profit, and margin data (requires admin permissions).SUBSCRIPTION_PRICES_INFO
: Subscription pricing details.WEIGHT_MEASUREMENT_UNIT_INFO
: Weight unit information.