# Product Selections

**Manage individual Store assortments through Product Selections.**

For what Product Selections are and how they behave, see [Product catalog overview](/api/product-catalog-overview.md#product-selection). For rules that apply across the Product catalog APIs, see [Product catalog APIs overview](/api/product-catalog-apis-overview.md).

Learn more about using Product Selections to build company-specific B2B catalogs in our self-paced [Design B2B catalogs](/learning-model-b2b-commerce/design-b2b-catalogs/company-specific-product-catalogs.md) module.

When a Product Selection is active in a Store, your shop frontend [queries only those Product Projections](/search.md?urn=ctp:api:endpoint:/{projectKey}/in-store/key={storeKey}/product-projections/{id}:GET) that are scoped to that Store.

To learn more, see the [Model assortments with Product Selections](/guides/product-selections.md) tutorial.

To find out which Products belong to a particular Product Selection, use the [Query Products assigned to a Product Selection](/api/projects/product-selections.md#query-products-assigned-to-a-productselection) endpoints. For the opposite case, meaning to find out the Product Selections a particular Product belongs to, use the [Query Product Selections for a Product](/search.md?urn=ctp:api:endpoint:/{projectKey}/products/{id}/product-selections:GET) endpoints.

## Get ProductSelection

### Get ProductSelection by ID

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/{id}:GET).

### Get ProductSelection by Key

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/key={key}:GET).

## Query ProductSelections

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections:GET).

## Query Products assigned to a ProductSelection

### by ProductSelection ID

> By default, the response does not include the `total` field.
> To get `total` included, pass the query parameter `withTotal` set to `true`.

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/{id}/products:GET).

### by ProductSelection Key

> By default, the response does not include the `total` field.
> To get `total` included, pass the query parameter `withTotal` set to `true`.

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/key={key}/products:GET).

## Query Products assigned to active ProductSelections in a Store

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/in-store/key={storeKey}/product-selection-assignments:GET).

## Check if ProductSelection exists

### Check if ProductSelection exists by ID

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/{id}:HEAD).

### Check if ProductSelection exists by Key

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/key={key}:HEAD).

### Check if ProductSelection exists by Query Predicate

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections:HEAD).

## Create ProductSelection

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections:POST).

## Update ProductSelection

### Update ProductSelection by ID

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/{id}:POST).

### Update ProductSelection by Key

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/key={key}:POST).

## Update actions

#### Add Product

> This action is available only for Product Selections with `Individual` [ProductSelectionMode](/api/projects/product-selections.md#productselectionmode).

[type definition](/search.md?urn=ctp:api:type:ProductSelectionAddProductAction).

#### Exclude Product

> This action is available only for Product Selections with `IndividualExclusion` [ProductSelectionMode](/api/projects/product-selections.md#productselectionmode).

[type definition](/search.md?urn=ctp:api:type:ProductSelectionExcludeProductAction).

#### Set Variant Selection

> This action is available only for Product Selections with `Individual` [ProductSelectionMode](/api/projects/product-selections.md#productselectionmode).

[type definition](/search.md?urn=ctp:api:type:ProductSelectionSetVariantSelectionAction).

#### Set Variant Exclusion

> This action is available only for Product Selections with `IndividualExclusion` [ProductSelectionMode](/api/projects/product-selections.md#productselectionmode).

[type definition](/search.md?urn=ctp:api:type:ProductSelectionSetVariantExclusionAction).

#### Remove Product

[type definition](/search.md?urn=ctp:api:type:ProductSelectionRemoveProductAction).

#### Set Key

[type definition](/search.md?urn=ctp:api:type:ProductSelectionSetKeyAction).

#### Change Name

[type definition](/search.md?urn=ctp:api:type:ProductSelectionChangeNameAction).

#### Set Custom Type

[type definition](/search.md?urn=ctp:api:type:ProductSelectionSetCustomTypeAction).

#### Set CustomField

[type definition](/search.md?urn=ctp:api:type:ProductSelectionSetCustomFieldAction).

## Delete ProductSelection

### Delete ProductSelection by ID

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/{id}:DELETE).

### Delete ProductSelection by Key

[endpoint definition](/search.md?urn=ctp:api:endpoint:/{projectKey}/product-selections/key={key}:DELETE).

## Representations

#### ProductSelection

[type definition](/search.md?urn=ctp:api:type:ProductSelection).

#### ProductSelectionDraft

[type definition](/search.md?urn=ctp:api:type:ProductSelectionDraft).

#### ProductSelectionPagedQueryResponse

[type definition](/search.md?urn=ctp:api:type:ProductSelectionPagedQueryResponse).

#### ProductSelectionReference

[type definition](/search.md?urn=ctp:api:type:ProductSelectionReference).

#### ProductSelectionResourceIdentifier

[type definition](/search.md?urn=ctp:api:type:ProductSelectionResourceIdentifier).

#### ProductSelectionMode

[type definition](/search.md?urn=ctp:api:type:ProductSelectionMode).

#### ProductSelectionProductPagedQueryResponse

[type definition](/search.md?urn=ctp:api:type:ProductSelectionProductPagedQueryResponse).

#### ProductsInStorePagedQueryResponse

[type definition](/search.md?urn=ctp:api:type:ProductsInStorePagedQueryResponse).

#### ProductSelectionAssignment

Specifies which Product is assigned to which ProductSelection.

> **Warning:** The entire [ProductSelectionAssignment](/api/projects/product-selections.md#productselectionassignment) is deleted automatically with [eventual consistency](/api/general-concepts.md#eventual-consistency) if all of the [SKUs have been removed](/api/projects/products.md#set-sku) from a [ProductVariantSelection IncludeOnly](/api/projects/product-selections.md#productvariantselection-includeonly) or from a [ProductVariantExclusion](/api/projects/product-selections.md#productvariantexclusion).
>
> For [ProductVariantSelection IncludeAllExcept](/api/projects/product-selections.md#productvariantselection-includeallexcept) only the `variantSelection` of the ProductSelectionAssignment is deleted in such case, meaning that all SKUs of the respective Product are included then.
>
> The above also applies if the Product Variants with the corresponding SKUs have been [removed from their Product](/api/projects/products.md#remove-productvariant).

[type definition](/search.md?urn=ctp:api:type:ProductSelectionAssignment).

#### AssignedProductSelection

[type definition](/search.md?urn=ctp:api:type:AssignedProductSelection).

#### AssignedProductSelectionPagedQueryResponse

[type definition](/search.md?urn=ctp:api:type:AssignedProductSelectionPagedQueryResponse).

#### AssignedProductReference

[type definition](/search.md?urn=ctp:api:type:AssignedProductReference).

#### ProductVariantSelection

Polymorphic base type that determines if a Product Selection can [include only](/api/projects/product-selections.md#productvariantselection-includeonly) specified SKUs or [include all except](/api/projects/product-selections.md#productvariantselection-includeallexcept) specified SKUs.

> A background process takes care that SKUs changed or deleted on published Products are removed from the `skus` field of the ProductVariantSelection automatically, making sure no [ProductSelectionAssignment](/api/projects/product-selections.md#productselectionassignment) contains any outdated SKU. Staged changes to SKUs do not affect the ProductVariantSelection.

##### ProductVariantSelection IncludeOnly

[type definition](/search.md?urn=ctp:api:type:ProductVariantSelectionIncludeOnly).

##### ProductVariantSelection IncludeAllExcept

[type definition](/search.md?urn=ctp:api:type:ProductVariantSelectionIncludeAllExcept).

#### ProductVariantExclusion

[type definition](/search.md?urn=ctp:api:type:ProductVariantExclusion).

## Related pages

- [Area overview page with navigation](/api.md)
- [Previous page: Product Projections](/api/projects/productProjections.md)
- [Next page: Product Tailoring](/api/projects/product-tailoring.md)
- [Search documentation and API specs](/search.md)