Class ByProjectKeyProductProjectionsByIDVariantAttributesGet

All Implemented Interfaces:
Deprecatable200Trait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, ErrorableTrait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, LocaleprojectingTrait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, ProjectionselectingTrait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, SupplychannelfilteringTrait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, VariantattributefilteringTrait<ByProjectKeyProductProjectionsByIDVariantAttributesGet>, ClientRequestCommand<VariantAttributes>, CreateHttpRequestCommand, HttpRequestCommand<VariantAttributes>, RequestCommand<VariantAttributes>

Returns a lightweight representation of all Variants for a Product, including only the requested variant-level Attributes and minimal availability data.

Designed for building attribute selectors on product detail pages (PDPs) with large numbers of variants. Only available for Projects with productCatalogModel set to Modular.

Product-level Attributes are omitted from the response.

Required access scopes:

  • To retrieve the current representation of published Products (published data), the view_published_products:{projectKey} or view_products:{projectKey} scope is required.
  • To retrieve the staged representation of Products (draft data), the API Client must have the view_products:{projectKey} scope.


   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.variant_attributes.VariantAttributes>> result = apiRoot
            .withProjectKey("{projectKey}")
            .productProjections()
            .withId("{ID}")
            .variantAttributes()
            .get()
            .withFilterAttributes(filterAttributes)
            .execute()