The Read-Only Variants API allows you to query product variants as primary entities with enhanced pagination, filtering, and sorting capabilities. Unlike the Products API where variants are nested within products, this service focuses exclusively on variants, making it easier to implement variant-focused features.
With the Read-Only Variants API, you can:
For creating, updating, or deleting variants, use the Products API.
For more information about how options and variants work together, see About Product Options and Variants.
Choose the right method for your use case:
Both methods support cursor-based pagination and return the same variant data structure.
This API operates on an eventually consistent model. Changes made through the Products API (creating, updating, or deleting variants) sync 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 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.It's important to note the following points before starting to code:
SCOPE.STORES.PRODUCT_READ_ADMIN permission.For a comprehensive glossary of Catalog V3 terms, see Terminology.