# Products

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Products in the platform.**

## Queries

### Query Products

[fetch SDL for query products](#graphql-partial-sdls).

### Get Product

[fetch SDL for query product](#graphql-partial-sdls).

## Mutations

### Create Product

[fetch SDL for mutation createProduct](#graphql-partial-sdls).

### Update Product

[fetch SDL for mutation updateProduct](#graphql-partial-sdls).

### Delete Product

[fetch SDL for mutation deleteProduct](#graphql-partial-sdls).

## Output types

### Product

[fetch SDL for type Product](#graphql-partial-sdls).

### ProductQueryResult

[fetch SDL for type ProductQueryResult](#graphql-partial-sdls).

## Input types

### ProductDraft

[fetch SDL for type ProductDraft](#graphql-partial-sdls).

### SearchKeywordArgument

[fetch SDL for type SearchKeywordArgument](#graphql-partial-sdls).

### ProductUpdateAction

[fetch SDL for type ProductUpdateAction](#graphql-partial-sdls).

### Update actions

#### Move Image To Position

[fetch SDL for type MoveProductImageToPosition](#graphql-partial-sdls).

#### Set Search Keywords

[fetch SDL for type SetSearchKeywords](#graphql-partial-sdls).

#### Revert Staged Changes

[fetch SDL for type RevertStagedChanges](#graphql-partial-sdls).

#### Revert Staged Variant Changes

[fetch SDL for type RevertStagedVariantChanges](#graphql-partial-sdls).

#### Publish

[fetch SDL for type PublishProduct](#graphql-partial-sdls).

#### Set Product Attribute

[fetch SDL for type ProductLevelAttributeInput](#graphql-partial-sdls).

#### Unpublish

[fetch SDL for type UnpublishProduct](#graphql-partial-sdls).

#### Transition State

[fetch SDL for type TransitionProductState](#graphql-partial-sdls).

#### Remove Price

[fetch SDL for type RemoveProductPrice](#graphql-partial-sdls).

#### Add Asset

[fetch SDL for type AddProductAsset](#graphql-partial-sdls).

#### Add External Image

[fetch SDL for type AddProductExternalImage](#graphql-partial-sdls).

#### Add Price

[fetch SDL for type AddProductPrice](#graphql-partial-sdls).

#### Add To Category

[fetch SDL for type AddProductToCategory](#graphql-partial-sdls).

#### Add Variant

[fetch SDL for type AddProductVariant](#graphql-partial-sdls).

#### Change Asset Name

[fetch SDL for type ChangeProductAssetName](#graphql-partial-sdls).

#### Change Asset Order

[fetch SDL for type ChangeProductAssetOrder](#graphql-partial-sdls).

#### Change Master Variant

[fetch SDL for type ChangeProductMasterVariant](#graphql-partial-sdls).

#### Change Image Label

[fetch SDL for type ChangeProductImageLabel](#graphql-partial-sdls).

#### Change Name

[fetch SDL for type ChangeProductName](#graphql-partial-sdls).

#### Change Price

[fetch SDL for type ChangeProductPrice](#graphql-partial-sdls).

#### Change Slug

[fetch SDL for type ChangeProductSlug](#graphql-partial-sdls).

#### Remove Asset

[fetch SDL for type RemoveProductAsset](#graphql-partial-sdls).

#### Remove From Category

[fetch SDL for type RemoveProductFromCategory](#graphql-partial-sdls).

#### Remove Image

[fetch SDL for type RemoveProductImage](#graphql-partial-sdls).

#### Remove Variant

[fetch SDL for type RemoveProductVariant](#graphql-partial-sdls).

#### Set Asset Custom Field

[fetch SDL for type SetProductAssetCustomField](#graphql-partial-sdls).

#### Set Asset Custom Type

[fetch SDL for type SetProductAssetCustomType](#graphql-partial-sdls).

#### Set Asset Description

[fetch SDL for type SetProductAssetDescription](#graphql-partial-sdls).

#### Set Asset Key

[fetch SDL for type SetProductAssetKey](#graphql-partial-sdls).

#### Set Asset Sources

[fetch SDL for type SetProductAssetSources](#graphql-partial-sdls).

#### Set Asset Tags

[fetch SDL for type SetProductAssetTags](#graphql-partial-sdls).

#### Set Category Order Hint

[fetch SDL for type SetProductCategoryOrderHint](#graphql-partial-sdls).

#### Set Default Variant

[fetch SDL for type SetProductDefaultVariant](#graphql-partial-sdls).

#### Set Discounted Price

[fetch SDL for type SetProductDiscountedPrice](#graphql-partial-sdls).

#### Set Attribute

[fetch SDL for type SetProductAttribute](#graphql-partial-sdls).

#### Set Attribute In All Variants

[fetch SDL for type SetProductAttributeInAllVariants](#graphql-partial-sdls).

#### Set Description

[fetch SDL for type SetProductDescription](#graphql-partial-sdls).

#### Set Image Label

[fetch SDL for type SetProductImageLabel](#graphql-partial-sdls).

#### Set Key

[fetch SDL for type SetProductKey](#graphql-partial-sdls).

#### Set Meta Attributes

[fetch SDL for type SetProductMetaAttributes](#graphql-partial-sdls).

#### Set Meta Description

[fetch SDL for type SetProductMetaDescription](#graphql-partial-sdls).

#### Set Meta Keywords

[fetch SDL for type SetProductMetaKeywords](#graphql-partial-sdls).

#### Set Meta Title

[fetch SDL for type SetProductMetaTitle](#graphql-partial-sdls).

#### Set Product Price Custom Field

[fetch SDL for type SetProductPriceCustomField](#graphql-partial-sdls).

#### Set Product Price Custom Type

[fetch SDL for type SetProductPriceCustomType](#graphql-partial-sdls).

#### Set Price Key

[fetch SDL for type SetProductPriceKey](#graphql-partial-sdls).

#### Set Price Mode

[fetch SDL for type SetProductPriceMode](#graphql-partial-sdls).

#### Set Prices

[fetch SDL for type SetProductPrices](#graphql-partial-sdls).

#### Set SKU

[fetch SDL for type SetProductSku](#graphql-partial-sdls).

#### Set Tax Category

[fetch SDL for type SetProductTaxCategory](#graphql-partial-sdls).

#### Set Product Variant Key

[fetch SDL for type SetProductVariantKey](#graphql-partial-sdls).

## Related pages

- [Search documentation and API specs](/search.md)