# Product Tailoring

## 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 Product Tailoring in the platform.**

## Queries

### Query Product Tailoring

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

### Get Product Tailoring

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

## Mutations

### Create Product Tailoring

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

### Update Product Tailoring

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

### Delete Product Tailoring

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

## Output types

### ProductTailoring

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

### ProductTailoringQueryResult

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

## Input types

### ProductTailoringDraft

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

### ProductTailoringUpdateAction

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

### Update actions

#### Move Image To Position

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

#### Add Variant

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

#### Remove Variant

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

#### Publish

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

#### Unpublish

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

#### Set Product Attribute

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

#### Add Asset

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

#### Add External Image

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

#### Change Asset Name

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

#### Change Asset Order

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

#### Remove Asset

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

#### Remove Image

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

#### Set Asset Custom Field

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

#### Set Asset Custom Type

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

#### Set Asset Description

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

#### Set Asset Key

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

#### Set Asset Sources

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

#### Set Asset Tags

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

#### Set Images

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

#### Set Attribute

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

#### Set Attribute In All Variants

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

#### Set Description

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

#### Set Image Label

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

#### Set Key

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

#### Set Meta Attributes

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

#### Set Meta Description

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

#### Set Meta Keywords

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

#### Set Meta Title

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

#### Set Name

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

#### Set Slug

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

## Related pages

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