Use $expand to request optional aggregate information in a Catalog API response.
The current Catalog API supports $expand=Variants on the endpoints that document this query parameter. When used, it includes the Variants count in the result.
$expand does not return the full Variant resources or embed the Variants collection in the response.
$expand is not documented in the current DAM OpenAPI specification.
Use $expand=Variants when an integration needs to know how many variants are associated with each returned resource and the endpoint supports this option.
If the integration needs the actual variant records, request them from the Filter Product Variants endpoint instead of relying on $expand.
$expand=VariantsExample:
GET https://api2.saleslayer.com/catalog/Products?$select=prod_ref,prod_title&$expand=Variants$expand=Variants is useful to know that variants exist and how many are associated with a product, but it does not return the variant records.
To retrieve the variants associated with a specific product, use the Filter Product Variants endpoint:
GET https://api2.saleslayer.com/catalog/Products({productIdentifier})/Variants?$select=frmt_ref&$top=20Replace {productIdentifier} with the product identifier. You can use the supported query parameters on that endpoint, such as $select, $filter, $orderby, $top, $skip, and $skipToken, to shape and paginate the returned Variant collection.
Supported expansions depend on the resource and endpoint. Check the OpenAPI reference for each operation before using $expand.
Currently, the documented value is Variants, which indicates that the response should include the Variants count when supported.
Variantsis optional. If$expand=Variantsis omitted, the Variants count is not requested.$expand=Variantsrequests the count only. It does not include the full Variants collection.- Combine
$expandwith$selectand pagination where appropriate.