Product Tailoring

Elevate, May 20-22-2025, Miami Beach, Florida

Product Tailoring lets you manage market-specific Product data.

With Product Tailoring, you can adapt your Product information to different brands or regions, based on your business requirements. By adapting Product information to different markets, businesses can increase their visibility, customer loyalty, and number of orders.

You can only create one Product Tailoring for each combination of a Product and a Store. It is not possible to share a Product Tailoring between Stores. To assign the same tailored values to a given Product in different Stores, you need to create a separate Product Tailoring for each Store.

Loading...

A maximum number of 100 000 000 Product Tailoring over all Products and Stores can be created per Project. Learn more about this limit here.

A Product Tailoring lets you control what Product data is available in the storefront.

Product Tailoring is not a replacement for Localization but an additional option when using Stores. With this, you can control the tailoring of your Product data for each locale individually.

To ensure a consistent user experience for your Customers, Composable Commerce carries forward the tailored data to all entities involved in the buying process, such as Shopping Lists, Carts, and Orders.

Do not change the Product key of your tailored Products. If you were to change the Product key, you would lose all tailoring associated with that Product.

Product data available in Store

Retrieving tailored data is not supported by the Storefront Search APIs.

The intended approach to populate your storefront is to retrieve the products through the Get ProductProjection in Store methods, or through the Query ProductProjections endpoint in combination with the storeProjection parameter.

With a Product Tailoring for a Product and a Store, you control whether the original Product data or the tailored data is contained in the Product Projection retrieved through those endpoints.

For each data you want to tailor for the Store, add the tailored data field to the ProductTailoringData object. For data fields you don't add to this data object, Composable Commerce projects the corresponding original data from the Product (from its ProductData object) to the Store-specific Product. In the following example, you see a Product Tailoring for the fields name and description of a Product, but not for its slug. For the slug field, the ProductProjection takes the original value from the ProductData.

Data fieldProductDataProductTailoringDataProductProjection in Store
name"en: original name""en: tailored name""en: tailored name"
description"en: original desc""en: tailored desc""en: tailored desc"
slug"en: original_slug""en: original_slug"

The fallback to the original data gives you the flexibility to tailor only those data that need to be adapted for your Store, the other fields still provide the original data for the ProductProjection in Store. You don't need to tailor the entire product data at once, you can prepare the tailored fields in a staged version of the ProductTailoringData and when you want to release them to production, you can publish the tailoring at once.

The published flag on the ProductTailoring indicates the publication status of the tailoring as a whole. When true, you'll find only the fields in the current ProductTailoringData object in the related current ProductProjection in Store. With the unpublish action you can set this flag to false which leads to all fields falling back to their original values from ProductData regardless of what is stored in the current version of the ProductTailoringData.

The hasStagedChanges field is true whenever someone modified tailored data in the staged tailoring data, that are not yet reflected in the current tailoring data. This can give your team some indication to review the staged changes before publishing them, but your reviewer needs to find out which fields have changed. If you are interested in changes on particular fields of the ProductTailoring, we recommend subscribing to Product Tailoring Messages.

The publishing status of the Product Tailoring is independent of the publishing status of a Product itself. The Product's published field on the ProductCatalogData determines whether the current Product Projection in Store is available at all or not. The following table summarizes the effect the different publishing statuses have on the availability of Product Projections and their tailored data:

ProductProduct TailoringStaged Product Projection in StoreCurrent Product Projection in Store
unpublishedunpublisheddefault Product datanot available
unpublishedpublishedtailored Product datanot available
publishedunpublishedtailored Product datadefault Product data
publishedpublishedtailored Product datatailored Product data

When using Product Selections in addition to Product Tailoring, more criteria determine whether a Product is available in Store or not.

Attribute Constraints are validated on Tailoring creation, update, and publishing, but their consistency is not guaranteed with respect to changes on the corresponding Product side.

Representations

ProductTailoring

A single ProductTailoring representation contains the current and the staged representation of its product data tailored per Store.

id​
String​

Unique identifier of the ProductTailoring.

version​
Int​

Current version of the ProductTailoring.

key​
String​

User-defined unique identifier of the ProductTailoring.

store​

The Store to which the ProductTailoring belongs.

product​

Reference to the Product the ProductTailoring belongs to.

published​
Boolean​

true if the ProductTailoring is published.

current​

Current (published) data of the ProductTailoring.

staged​

Staged (unpublished) data of the ProductTailoring.

hasStagedChanges​
Boolean​

true if the staged data is different from the current data.

createdAt​
DateTime​

Date and time (UTC) the ProductTailoring was initially created.

createdBy​BETA
CreatedBy​

IDs and references that created the ProductTailoring.

lastModifiedAt​
DateTime​

Date and time (UTC) the ProductTailoring was last updated.

lastModifiedBy​BETA

IDs and references that last modified the ProductTailoring.

warnings​
Array of WarningObject​

Warnings about processing of a request. Appears in response to requests with response status code 202 Accepted.

Example: json
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

ProductTailoringData

Contains all the tailored data of a Product.

name​

Tailored name of the Product.

description​

Tailored description of the Product.

metaTitle​

Tailored title of the Product that is used by search engines.

metaDescription​

Tailored description of the Product that is used by search engines.

metaKeywords​

Tailored keywords related to the Product that are used by search engines.

slug​

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_-]{2,256}.

variants​
Array of ProductVariantTailoring​

Tailored Variants of the Product.

ProductVariantTailoring

The tailoring of a ProductVariant.

id​
Int​

The id of the tailored ProductVariant.

images​
Array of Image​

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

assets​
Array of Asset​

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

attributes​
Array of ProductTailoringAttribute​

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • otherwise the Attribute and its value are added to the ProductVariant.

ProductTailoringDraft

Contains all the tailored data of a Product.

key​
String​

User-defined unique identifier of the ProductTailoring.

store​

The Store to which the ProductTailoring belongs.

product​

ResourceIdentifier of the Product the ProductTailoring belongs to.

name​

Tailored name of the Product.

description​

Tailored description of the Product.

metaTitle​

Tailored title of the Product that is used by search engines.

metaDescription​

Tailored description of the Product that is used by search engines.

metaKeywords​

Tailored keywords related to the Product that are used by search engines.

slug​

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_-]{2,256}.

publish​
Boolean​

If true, the ProductTailoring is published immediately.

variants​

Tailored Variants of the Product.

ProductVariantTailoringDraft

Either id or sku is required to reference a ProductVariant that exists.

id​
Int​

The id of the ProductVariant to be tailored.

sku​
String​

The sku of the ProductVariant to be tailored.

images​
Array of Image​

Images of the tailored Product Variant.

assets​
Array of Asset​

Media assets of the tailored Product Variant.

attributes​
Array of ProductTailoringAttribute​

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • otherwise the Attribute and its value are added to the ProductVariant.

ProductTailoringInStoreDraft

Contains all the tailored data of a Product for a specific Store.

key​
String​

User-defined unique identifier of the ProductTailoring.

product​

ResourceIdentifier of the Product the ProductTailoring belongs to.

name​

Tailored name of the Product.

description​

Tailored description of the Product.

metaTitle​

Tailored title of the Product that is used by search engines.

metaDescription​

Tailored description of the Product that is used in search engine.

metaKeywords​

Tailored keywords related to the Product that are used by search engines.

slug​

User-defined identifier used in a deep-link URL for the ProductTailoring. Matches the pattern [a-zA-Z0-9_-]{2,256}.

publish​
Boolean​

If true, the ProductTailoring is published immediately.

variants​

Tailored Variants of the Product.

ProductTailoringPagedQueryResponse

PagedQueryResult with results containing an array of ProductTailoring.

limit​
Int​

Number of results requested.

Default: 20​Minimum: 0​Maximum: 500​
offset​
Int​

Number of elements skipped.

Default: 0​Maximum: 10000​
count​
Int​

Actual number of results returned.

total​
Int​

Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter withTotal=false. When the results are filtered with a Query Predicate, total is subject to a limit.

results​
Array of ProductTailoring​

ProductTailoring list matching the query.

Example: json
{
  "limit": 20,
  "offset": 0,
  "count": 2,
  "results": [
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
      "version": 2,
      "createdAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-key"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "tailored name"
        },
        "description": {
          "en": "tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug"
        },
        "variants": [
          {
            "id": 1,
            "images": [
              {
                "url": "//myimage.jpg",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          },
          {
            "id": 2,
            "images": [
              {
                "url": "//myimage-2.png",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          }
        ]
      },
      "published": false,
      "hasStagedChanges": true
    },
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbecc",
      "version": 2,
      "createdAt": "2023-09-01T13:27:10.475Z",
      "lastModifiedAt": "2023-09-01T14:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-two"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "Second store tailored name"
        },
        "description": {
          "en": "This is a tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug-two"
        },
        "variants": []
      },
      "published": false,
      "hasStagedChanges": true
    }
  ]
}

ProductTailoringReference

id​
String​

Unique identifier of the referenced ProductTailoring.

typeId​
product-tailoring

Type of referenced resource.

obj​

Contains the representation of the expanded ProductTailoring. Only present in responses to requests with Reference Expansion for ProductTailoring.

ProductTailoringResourceIdentifier

id​
String​

Unique identifier of the referenced ProductTailoring. Either id or key is required.

key​
String​

User-defined unique identifier of the referenced ProductTailoring. Either id or key is required.

typeId​
product-tailoring

Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

ProductTailoringAttribute

When using attributes with GraphQL API mutations, you must escape any strings in the value field: "value" : "\"A value\"".

The same rules for name and value apply as for Attribute in Product Variants.

name​
String​

Name of the Attribute.

(elementIdentifier)​
value​
Any​

The AttributeType determines the format of the Attribute value to be provided:

Tailoring of Nested Type Attributes is not supported.

(expandable)​

Get ProductTailoring

Get ProductTailoring by ID

GET
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id}
OAuth 2.0 Scopes:
view_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

id
​
String
​

id of the ProductTailoring.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Get ProductTailoring by Key

GET
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key}
OAuth 2.0 Scopes:
view_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

key
​
String
​

key of the ProductTailoring.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Get ProductTailoring assigned to Product in Store

Get ProductTailoring assigned to Product in Store by Product ID

GET
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring

Gets the current or staged representation of a Product Tailoring by its Product ID in the specified Store.

OAuth 2.0 Scopes:
view_products:{projectKey}view_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productID
​
String
​

id of the Product.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Get ProductTailoring assigned to Product in Store by Product Key

GET
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring

Gets the current or staged representation of a Product Tailoring by its Product key in the specified Store.

OAuth 2.0 Scopes:
view_products:{projectKey}view_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productKey
​
String
​

key of the Product.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Query ProductTailoring

GET
https://api.{region}.commercetools.com/{projectKey}/product-tailoring
OAuth 2.0 Scopes:
view_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

Query parameters:
where
​​
The parameter can be passed multiple times.
sort
​​
The parameter can be passed multiple times.
expand
​​
The parameter can be passed multiple times.
limit
​
Int
​

Number of results requested.

Default: 20​
offset
​
Int
​

Number of elements skipped.

Default: 0​
withTotal
​
Boolean
​

Controls the calculation of the total number of query results. Set to false to improve query performance when the total is not needed.

Default: true​
var.<varName>
​
String
​

Predicate parameter values.

The parameter can be passed multiple times.
Response:
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringPagedQueryResponsejson
{
  "limit": 20,
  "offset": 0,
  "count": 2,
  "results": [
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
      "version": 2,
      "createdAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-key"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "tailored name"
        },
        "description": {
          "en": "tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug"
        },
        "variants": [
          {
            "id": 1,
            "images": [
              {
                "url": "//myimage.jpg",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          },
          {
            "id": 2,
            "images": [
              {
                "url": "//myimage-2.png",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          }
        ]
      },
      "published": false,
      "hasStagedChanges": true
    },
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbecc",
      "version": 2,
      "createdAt": "2023-09-01T13:27:10.475Z",
      "lastModifiedAt": "2023-09-01T14:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-two"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "Second store tailored name"
        },
        "description": {
          "en": "This is a tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug-two"
        },
        "variants": []
      },
      "published": false,
      "hasStagedChanges": true
    }
  ]
}

Query ProductTailoring in Store

GET
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/product-tailoring

Queries Product Tailoring in a specific Store.

OAuth 2.0 Scopes:
view_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

Query parameters:
where
​​
The parameter can be passed multiple times.
sort
​​
The parameter can be passed multiple times.
expand
​​
The parameter can be passed multiple times.
limit
​
Int
​

Number of results requested.

Default: 20​
offset
​
Int
​

Number of elements skipped.

Default: 0​
withTotal
​
Boolean
​

By default, the response does not include the total field. Set to true to get the total number of query results included.

Default: true​
var.<varName>
​
String
​

Predicate parameter values.

The parameter can be passed multiple times.
Response:
Request Example:cURL
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 
200 Response Example: ProductTailoringPagedQueryResponsejson
{
  "limit": 20,
  "offset": 0,
  "count": 2,
  "results": [
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
      "version": 2,
      "createdAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedAt": "2023-09-01T13:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-key"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "tailored name"
        },
        "description": {
          "en": "tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug"
        },
        "variants": [
          {
            "id": 1,
            "images": [
              {
                "url": "//myimage.jpg",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          },
          {
            "id": 2,
            "images": [
              {
                "url": "//myimage-2.png",
                "dimensions": {
                  "w": 400,
                  "h": 300
                }
              }
            ],
            "assets": [],
            "attributes": []
          }
        ]
      },
      "published": false,
      "hasStagedChanges": true
    },
    {
      "id": "207ee692-6002-4570-a78c-d15e7adbecc",
      "version": 2,
      "createdAt": "2023-09-01T13:27:10.475Z",
      "lastModifiedAt": "2023-09-01T14:26:10.475Z",
      "lastModifiedBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "createdBy": {
        "clientId": "ywjliB_u26xzmcJNKznjbJp4",
        "isPlatformClient": false
      },
      "product": {
        "typeId": "product",
        "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
      },
      "store": {
        "typeId": "store",
        "key": "store-two"
      },
      "current": {
        "variants": []
      },
      "staged": {
        "name": {
          "en": "Second store tailored name"
        },
        "description": {
          "en": "This is a tailored description"
        },
        "metaTitle": {
          "en": "tailored meta title"
        },
        "metaDescription": {
          "en": "tailored meta description"
        },
        "metaKeywords": {
          "en": "tailored meta keywords"
        },
        "slug": {
          "en": "tailored-slug-two"
        },
        "variants": []
      },
      "published": false,
      "hasStagedChanges": true
    }
  ]
}

Check if ProductTailoring exists by Query Predicate

HEAD
https://api.{region}.commercetools.com/{projectKey}/product-tailoring

Checks if a ProductTailoring exists for a given Query Predicate. Returns a 200 OK status if any ProductTailoring match the Query Predicate or a 404 Not Found otherwise.

OAuth 2.0 Scopes:
view_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

Query parameters:
where
​​
The parameter can be passed multiple times.
Response:
200
Request Example:cURL
curl --head https://api.{region}.commercetools.com/{projectKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" 

Create ProductTailoring

POST
https://api.{region}.commercetools.com/{projectKey}/product-tailoring

Generates the ProductTailoringCreated Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringDraftasapplication/json
Response:
201

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "product" : {
    "typeId" : "product",
    "id" : "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store" : {
    "key" : "store-key"
  },
  "name" : {
    "en" : "tailored name"
  },
  "metaTitle" : {
    "en" : "tailored meta title"
  },
  "metaDescription" : {
    "en" : "tailored meta description"
  },
  "metaKeywords" : {
    "en" : "tailored meta keywords"
  },
  "slug" : {
    "en" : "tailored-slug"
  },
  "description" : {
    "en" : "tailored description"
  },
  "variants" : [ {
    "id" : 1,
    "images" : [ {
      "url" : "//myimage.jpg",
      "dimensions" : {
        "w" : 400,
        "h" : 300
      }
    } ],
    "attributes" : [ {
      "name" : "my-attribute",
      "value" : "attribute-1"
    } ]
  }, {
    "sku" : "sku-1",
    "images" : [ {
      "url" : "//myimage-2.png",
      "dimensions" : {
        "w" : 400,
        "h" : 300
      }
    } ],
    "attributes" : [ {
      "name" : "my-attribute",
      "value" : "attribute-2"
    } ]
  } ],
  "publish" : false
}
DATA
201 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Create ProductTailoring in Store

POST
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/product-tailoring

Creates a ProductTailoring in the Store specified by storeKey. When using this endpoint the ProductTailoring's store field is always set to the Store specified in the path parameter.

Generates the ProductTailoringCreated Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}manage_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringInStoreDraftasapplication/json
Response:
201

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "product" : {
    "typeId" : "product",
    "id" : "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "name" : {
    "en" : "tailored name"
  },
  "metaTitle" : {
    "en" : "tailored meta title"
  },
  "metaDescription" : {
    "en" : "tailored meta description"
  },
  "metaKeywords" : {
    "en" : "tailored meta keywords"
  },
  "slug" : {
    "en" : "tailored-slug"
  },
  "description" : {
    "en" : "tailored description"
  },
  "variants" : [ {
    "id" : 1,
    "images" : [ {
      "url" : "//myimage.jpg",
      "dimensions" : {
        "w" : 400,
        "h" : 300
      }
    } ],
    "attributes" : [ {
      "name" : "my-attribute",
      "value" : "attribute-1"
    } ]
  }, {
    "sku" : "sku-1",
    "images" : [ {
      "url" : "//myimage-2.png",
      "dimensions" : {
        "w" : 400,
        "h" : 300
      }
    } ],
    "attributes" : [ {
      "name" : "my-attribute",
      "value" : "attribute-2"
    } ]
  } ],
  "publish" : false
}
DATA
201 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Update ProductTailoring

Update ProductTailoring by ID

POST
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id}
OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

id
​
String
​

id of the ProductTailoring.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringUpdateasapplication/json
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "setDescription",
    "description" : {
      "en" : "A description"
    },
    "staged" : true
  } ]
}
DATA
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "A description"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": []
  },
  "published": false,
  "hasStagedChanges": true
}

Update ProductTailoring by Key

POST
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key}
OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

key
​
String
​

key of the ProductTailoring.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringUpdateasapplication/json
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "setDescription",
    "description" : {
      "en" : "A description"
    },
    "staged" : true
  } ]
}
DATA
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "A description"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": []
  },
  "published": false,
  "hasStagedChanges": true
}

Update ProductTailoring assigned to Product in Store

Use these update methods in case you know the Product ID or key rather than the ID or key of the ProductTailoring.

Update ProductTailoring assigned to Product in Store by Product ID

POST
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring

Updates the current or staged representation of a Product Tailoring by its Product ID in the specified Store.

OAuth 2.0 Scopes:
manage_products:{projectKey}manage_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productID
​
String
​

id of the Product.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringUpdateasapplication/json
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "setDescription",
    "description" : {
      "en" : "A description"
    },
    "staged" : true
  } ]
}
DATA
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "A description"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": []
  },
  "published": false,
  "hasStagedChanges": true
}

Update ProductTailoring assigned to Product in Store by Product Key

POST
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring

Updates the current or staged representation of a Product Tailoring by its Product key in the specified Store.

OAuth 2.0 Scopes:
manage_products:{projectKey}manage_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productKey
​
String
​

key of the Product.

Query parameters:
expand
​​
The parameter can be passed multiple times.
Request Body:ProductTailoringUpdateasapplication/json
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring -i \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary @- << DATA 
{
  "version" : 1,
  "actions" : [ {
    "action" : "setDescription",
    "description" : {
      "en" : "A description"
    },
    "staged" : true
  } ]
}
DATA
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "A description"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": []
  },
  "published": false,
  "hasStagedChanges": true
}

Update actions

on ProductTailoring

Set Name

Generates the ProductTailoringNameSet Message.

action​
String​
"setName"
name​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged name is updated. If false, both the current and staged name are updated.

Default​
Example: json
{
  "action": "setName",
  "name": {
    "en": "A name"
  },
  "staged": true
}

Set Description

Generates the ProductTailoringDescriptionSet Message.

action​
String​
"setDescription"
description​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged description is updated. If false, both the current and staged description are updated.

Default​
Example: json
{
  "action": "setDescription",
  "description": {
    "en": "A description"
  },
  "staged": true
}

Set Slug

Generates the ProductTailoringSlugSet Message.

action​
String​
"setSlug"
slug​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged slug is updated. If false, both the current and staged slug are updated.

Default​
Example: json
{
  "action": "setSlug",
  "slug": {
    "en": "a-slug"
  },
  "staged": true
}

Set Meta Attributes

Updates all meta attributes at the same time.

action​
String​
"setMetaAttributes"
metaTitle​

Value to set. If empty, any existing value will be removed.

metaDescription​

Value to set. If empty, any existing value will be removed.

metaKeywords​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged attributes are updated. If false, both the current and staged attributes are updated.

Default​
Example: json
{
  "action": "setMetaAttributes",
  "metaTitle": {
    "en": "A Meta Title"
  },
  "metaDescription": {
    "en": "A Meta Description"
  },
  "metaKeywords": {
    "en": "Meta Keywords"
  },
  "staged": true
}

Set Meta Title

action​
String​
"setMetaTitle"
metaTitle​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged metaTitle is updated. If false, both the current and staged metaTitle are updated.

Default​
Example: json
{
  "action": "setMetaTitle",
  "metaTitle": {
    "en": "A Meta Title"
  },
  "staged": true
}

Set Meta Keywords

action​
String​
"setMetaKeywords"
metaKeywords​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged metaKeywords is updated. If false, both the current and staged metaKeywords are updated.

Default​
Example: json
{
  "action": "setMetaKeywords",
  "metaKeywords": {
    "en": "Meta Keywords"
  },
  "staged": true
}

Set Meta Description

action​
String​
"setMetaDescription"
metaDescription​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged metaDescription is updated. If false, both the current and staged metaDescription are updated.

Default​
Example: json
{
  "action": "setMetaDescription",
  "metaDescription": {
    "en": "A Meta Description"
  },
  "staged": true
}

Publish

Publishes the staged data of the ProductTailoring to current. Sets hasStagedChanges to false. Generates the ProductTailoringPublished Message.

action​
String​
"publish"
Example: json
{
  "action": "publish"
}

Unpublish

Unpublishes the current data of the ProductTailoring. Sets the published field to false. Generates the ProductTailoringUnpublished Message.

action​
String​
"unpublish"
Example: json
{
  "action": "unpublish"
}

on ProductVariantTailoring

Add Variant

Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.

id​
Int​

The id of the tailored ProductVariant to update.

action​
String​
"addVariant"
sku​
String​

The sku of the tailored ProductVariant to update.

images​
Array of Image​

Images for the Product Variant Tailoring.

assets​
Array of AssetDraft​

Media assets for the Product Variant Tailoring.

attributes​
Array of ProductTailoringAttribute​

Attributes for the Product Variant Tailoring.

staged​
Boolean​

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

Default​
Example: json
{
  "action": "addVariant",
  "id": 2,
  "sku": "VariantSKU"
}

Remove Variant

If the Product Variant Tailoring contains images that have been uploaded to our CDN and that are also used on other Product Variant Tailorings, then removing the Product Variant will make the images unavailable wherever they are shared.

Either id or sku is required. Produces the ProductVariantTailoringDeleted Message.

id​
Int​

The id of the ProductVariant to remove from the Tailoring.

action​
String​
"removeVariant"
sku​
String​

The sku of the ProductVariant to remove from the Tailoring.

staged​
Boolean​

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

Default​
Example: json
{
  "action": "removeVariant",
  "id": 2
}

Add External Image

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImageAdded Message.

action​
String​
"addExternalImage"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

image​
Image​

Value to add to images.

staged​
Boolean​

If true, only the staged images is updated. If false, both the current and staged images is updated.

Default​
Example: json
{
  "action": "addExternalImage",
  "variantId": 1,
  "image": {
    "url": "//myimage.jpg",
    "dimensions": {
      "w": 1400,
      "h": 1400
    },
    "label": "myImage"
  }
}

Move Image To Position

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"moveImageToPosition"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

imageUrl​
String​

The URL of the image to update.

position​
Int​

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

staged​
Boolean​

If true, only the staged images is updated. If false, both the current and staged images is updated.

Default​
Example: json
{
  "action": "moveImageToPosition",
  "variantId": 1,
  "imageUrl": "//myimage2.jpg",
  "position": 1
}

Remove Image

If the image that you want to delete has been uploaded to our CDN and its imageUrl is also used on other Product Variant Tailorings, then removing the image will make it unavailable wherever it is shared.

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"removeImage"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

imageUrl​
String​

The URL of the image to remove.

staged​
Boolean​

If true, only the staged image is removed. If false, both the current and staged image is removed.

Default​
Example: json
{
  "action": "removeImage",
  "variantId": 1,
  "imageUrl": "//myimage2.jpg"
}

Set Images

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImagesSet Message.

action​
String​
"setImages"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

images​
Array of Image​

Images of the tailored ProductVariant.

Don't provide this field if you want to remove all images from the tailored Product Variant. Set to [] (empty) if you want to hide all images of the original ProductVariant on the tailored ProductVariant.

staged​
Boolean​

If true, only the staged images is updated. If false, both the current and staged images is updated.

Default​
Example: json
{
  "action": "setImages",
  "variantId": 1,
  "images": [
    {
      "url": "//myimage.jpg",
      "dimensions": {
        "w": 100,
        "h": 100
      }
    },
    {
      "url": "//myimage2.jpg",
      "dimensions": {
        "w": 100,
        "h": 100
      }
    }
  ]
}

Set Image Label

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"setImageLabel"
sku​
String​

The sku of the tailored ProductVariant to update.

variantId​
Int​

The id of the tailored ProductVariant to update.

imageUrl​
String​

The URL of the image to set the label.

label​
String​

Value to set. If empty, any existing value will be removed.

staged​
Boolean​

If true, only the staged image is updated. If false, both the current and staged image is updated.

Default​
Example: json
{
  "action": "setImageLabel",
  "variantId": 2,
  "imageUrl": "//image.png",
  "label": "labelString",
  "staged": true
}

Add Asset

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"addAsset"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

Default​
asset​
AssetDraft​

Value to append.

position​
Int​

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

Example: json
{
  "action": "addAsset",
  "variantId": 1,
  "asset": {
    "sources": [
      {
        "uri": "//asset.mp4"
      }
    ],
    "name": {
      "de": "FirstAssetDE",
      "en": "FirstassetEN"
    }
  }
}

Remove Asset

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to remove must be specified using either assetId or assetKey.

action​
String​
"removeAsset"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

Default​
assetId​
String​

The id of the Asset to remove.

assetKey​
String​

The key of the Asset to remove.

Example: json
{
  "action": "removeAsset",
  "variantId": 1,
  "assetId": "{{assetId}}"
}

on Assets

Set Asset Key

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"setAssetKey"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

Value to set. If empty, any existing value will be removed.

MinLength: 2​MaxLength: 256​Pattern: ^[A-Za-z0-9_-]+$​
Example: json
{
  "action": "setAssetKey",
  "variantId": 1,
  "assetId": "{{assetId}}",
  "assetKey": "assetKeyString"
}

Change Asset Order

Either variantId or sku is required to reference a ProductVariant that exists.

action​
String​
"changeAssetOrder"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

Default​
assetOrder​
Array of String​

All existing Asset ids of the ProductVariantTailoring in the desired new order.

Example: json
{
  "action": "changeAssetOrder",
  "variantId": 1,
  "assetOrder": [
    "{{assetId1}}",
    "{{assetId2}}"
  ]
}

Change Asset Name

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"changeAssetName"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

name​

New value to set. Must not be empty.

Example: json
{
  "action": "changeAssetName",
  "variantId": 1,
  "assetId": "{{assetId}}",
  "name": {
    "de": "Mein Asset",
    "en": "My asset"
  }
}

Set Asset Description

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"setAssetDescription"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

description​

Value to set. If empty, any existing value will be removed.

Example: json
{
  "action": "setAssetDescription",
  "assetId": "{{assetId}}",
  "variantId": 1,
  "description": {
    "de": "Dies ist eine Asset-Beschreibung",
    "en": "This is an asset description"
  }
}

Set Asset Tags

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"setAssetTags"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

tags​
Array of String​

Keywords for categorizing and organizing Assets.

Example: json
{
  "action": "setAssetTags",
  "variantId": 1,
  "assetId": "{{assetId}}",
  "tags": [
    "commercetools",
    "awesome"
  ]
}

Set Asset Sources

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"setAssetSources"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

sources​
Array of AssetSource​

Value to set.

MinItems: 1​
Example: json
{
  "action": "setAssetSources",
  "variantId": 1,
  "assetId": "{{assetId}}",
  "sources": [
    {
      "uri": "https://www.commercetools.de/ct-logo.svg",
      "key": "vector"
    }
  ]
}

Set Asset Custom Type

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"setAssetCustomType"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

type​

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

fields​

Sets the Custom Fields fields for the Asset.

Example: json
{
  "action": "setAssetCustomType",
  "variantId": 1,
  "assetId": "{{assetId}}",
  "type": {
    "id": "{{type-id}}",
    "typeId": "type"
  },
  "fields": {
    "exampleStringField": "TextString"
  }
}

Set Asset CustomField

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

action​
String​
"setAssetCustomField"
variantId​
Int​

The id of the tailored ProductVariant to update.

sku​
String​

The sku of the tailored ProductVariant to update.

staged​
Boolean​

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

Default​
assetId​
String​

The id of the Asset to update.

assetKey​
String​

The key of the Asset to update.

name​
String​

Name of the Custom Field.

value​

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

Example: json
{
  "action": "setAssetCustomField",
  "assetId": "{{assetId}}",
  "variantId": 1,
  "name": "exampleStringField",
  "value": "TextString"
}

on Attributes

Set Attribute

Either variantId or sku is required.

action​
String​
"setAttribute"
variantId​
Int​

The id of the ProductVariant to update. Required if sku is absent.

sku​
String​

The sku of the ProductVariant to update. Required if variantId is absent.

name​
String​

The name of the Attribute to set.

value​
Any​

Value to set for the Attribute. If empty, any existing value will be removed.

The AttributeType determines the format of the Attribute value to be provided:

Tailoring of Nested Type Attributes is not supported.

staged​
Boolean​

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

Default​
Example: json
{
  "action": "setAttribute",
  "variantId": 1,
  "name": "ExampleStringTypeAttribute",
  "value": "TextString"
}

Set Attribute In All Variants

Adds, removes, or changes a tailored Attribute in all Product Variants of a Product at the same time. This action is useful for setting tailored values for Attributes with the Constraint SameForAll.

action​
String​
"setAttributeInAllVariants"
name​
String​

The name of the Attribute to set.

value​
Any​

Value to set for the Attributes. If empty, any existing value will be removed.

The AttributeType determines the format of the Attribute value to be provided:

Tailoring of Nested Type Attributes is not supported.

staged​
Boolean​

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

Default​
Example: json
{
  "action": "setAttributeInAllVariants",
  "name": "ExampleStringTypeAttribute",
  "value": "TextString"
}

Upload Product Tailoring image

Uploads a binary image file to a given ProductVariantTailoring. After upload, the system converts the original image to several sizes that are available on the builtin Content Delivery Network (CDN). Supported image formats are JPEG, PNG, and GIF. The maximum file size of the image to upload is 10 MB.

Only images in sRGB color space are supported. When trying to upload images with other color spaces, like Adobe RGB, the API returns a 400 Bad Request Error with code InvalidInput and the message Unsupported image data. Not able to identify the color model of your image.

The Image uploaded to the CDN is publicly available and its url may be shared across different Products in the same Project or in other Projects. However, the Image itself is tied to the Product Variant Tailoring where it was originally uploaded.

If the Image is removed from any Product Variant Tailoring, then the Image will be deleted from the CDN and it will no longer be available wherever it is shared.

Depending on the size of the original image, the API returns different status codes that indicate the status of the image upload at the time the API responds. If the original image is small, the API responds with 200 OK, and if the image is larger, it responds with 202 Accepted.

  • A 200 OK response is returned when all sizes of the image have been successfully uploaded to the CDN.
  • A 202 Accepted response is returned when the small size of the image has been successfully uploaded to the CDN, but the upload of the other sizes is still ongoing. These other sizes will be available soon thereafter.

by Product ID

POST
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images

Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is 10MB. Either variant or sku is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.

The response status code depends on the size of the original image. If the image is small, the API responds with 200 OK, and if the image is larger, it responds with 202 Accepted. The Product returned with a 202 Accepted status code contains a warnings field with an ImageProcessingOngoing Warning.

Produces the ProductTailoringImageAdded Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productID
​
String
​

id of the Product.

Query parameters:
filename
​
String
​

URL-encoded filename of the image when stored in the Content Delivery Network (CDN). The filename is modified when uploaded to prevent filename conflicts. If not provided, a random filename is generated.

Default: img​
variant
​
Int
​

The id of the ProductVariantTailoring the image should be uploaded to. It must correspond to an existing ProductVariant in the Product.

sku
​
String
​

The sku of the ProductVariantTailoring the image should be uploaded to. It must correspond to an existing ProductVariant in the Product.

staged
​
Boolean
​

If true, only the staged ProductVariantTailoring is updated. If false, both the current and staged ProductVariantTailoring are updated.

Default: true​

Request headers:

Content-Type
​
String
​

One of image/jpeg, image/png, or image/gif.

Request Body:
image/jpeg
orimage/png
orimage/gif

.

The file to upload
Response:
200

ProductTailoring

asapplication/json
202

ProductTailoring

asapplication/json

Request headers:

Content-Type
​
String
​

One of image/jpeg, image/png, or image/gif.

by Product Key

POST
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images

Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is 10MB. Either variant or sku is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.

The response status code depends on the size of the original image. If the image is small, the API responds with 200 OK, and if the image is larger, it responds with 202 Accepted. The Product returned with a 202 Accepted status code contains a warnings field with an ImageProcessingOngoing Warning.

Produces the ProductTailoringImageAdded Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productKey
​
String
​

key of the Product.

Query parameters:
filename
​
String
​

URL-encoded filename of the image when stored in the Content Delivery Network (CDN). The filename is modified when uploaded to prevent filename conflicts. If not provided, a random filename is generated.

Default: img​
variant
​
Int
​

The id of the ProductVariantTailoring the image should be uploaded to. It must correspond to an existing ProductVariant in the Product.

sku
​
String
​

The sku of the ProductVariantTailoring the image should be uploaded to. It must correspond to an existing ProductVariant in the Product.

staged
​
Boolean
​

If true, only the staged ProductVariantTailoring is updated. If false, both the current and staged ProductVariantTailoring are updated.

Default: true​

Request headers:

Content-Type
​
String
​

One of image/jpeg, image/png, or image/gif.

Request Body:
image/jpeg
orimage/png
orimage/gif

.

The file to upload
Response:
200

ProductTailoring

asapplication/json
202

ProductTailoring

asapplication/json

Request headers:

Content-Type
​
String
​

One of image/jpeg, image/png, or image/gif.

The cURL example below adds an Image to tailor the ProductVariant with id = 2, in the Product with specified {productID} and the Store specified in {storeKey}:

  curl -X POST  \
   -H "Content-Type: image/jpeg"  \
   -H "Authorization: Bearer {token}" \
   --upload-file "detail.jpg" \
   "https://api.{region}.commercetools.com/{projectKey}/in-store/{storeKey}/products/{productID}/product-tailoring/images?variant=2&filename=detail.jpg"

As the filename parameter was included (filename=detail.jpg), an example URL of the uploaded image is https://{commercetools-cdn}/detail-6xAq4Efp.jpg.

File upload using Content-Type: multipart/form-data is currently not supported.

Delete ProductTailoring

Delete ProductTailoring by ID

DELETE
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id}

Generates the ProductTailoringDeleted Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

id
​
String
​

id of the ProductTailoring.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Delete ProductTailoring by Key

DELETE
https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key}

Generates the ProductTailoringDeleted Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

key
​
String
​

key of the ProductTailoring.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key}?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Delete ProductTailoring assigned to Product in Store

Delete ProductTailoring assigned to Product in Store by Product ID

DELETE
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring

Generates the ProductTailoringDeleted Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}manage_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productID
​
String
​

id of the Product.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}

Delete ProductTailoring assigned to Product in Store by Product Key

DELETE
https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring

Generates the ProductTailoringDeleted Message.

OAuth 2.0 Scopes:
manage_products:{projectKey}manage_products:{projectKey}:{storeKey}
Path parameters:
region
​
String
​

Region in which the Project is hosted.

projectKey
​
String
​

key of the Project.

storeKey
​
String
​

key of the Store.

productKey
​
String
​

key of the Product.

Query parameters:
version
​
Int
​

Last seen version of the resource.

expand
​​
The parameter can be passed multiple times.
Response:
200

ProductTailoring

asapplication/json
Request Example:cURL
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring?version={version} -i \
--header "Authorization: Bearer ${BEARER_TOKEN}"
200 Response Example: ProductTailoringjson
{
  "id": "207ee692-6002-4570-a78c-d15e7adbebbb",
  "version": 2,
  "createdAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedAt": "2023-09-01T13:26:10.475Z",
  "lastModifiedBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "createdBy": {
    "clientId": "ywjliB_u26xzmcJNKznjbJp4",
    "isPlatformClient": false
  },
  "product": {
    "typeId": "product",
    "id": "daf720e5-9e8e-4300-98db-3a3219327db9"
  },
  "store": {
    "typeId": "store",
    "key": "store-key"
  },
  "current": {
    "variants": []
  },
  "staged": {
    "name": {
      "en": "tailored name"
    },
    "description": {
      "en": "tailored description"
    },
    "metaTitle": {
      "en": "tailored meta title"
    },
    "metaDescription": {
      "en": "tailored meta description"
    },
    "metaKeywords": {
      "en": "tailored meta keywords"
    },
    "slug": {
      "en": "tailored-slug"
    },
    "variants": [
      {
        "id": 1,
        "images": [
          {
            "url": "//myimage.jpg",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      },
      {
        "id": 2,
        "images": [
          {
            "url": "//myimage-2.png",
            "dimensions": {
              "w": 400,
              "h": 300
            }
          }
        ],
        "assets": [],
        "attributes": []
      }
    ]
  },
  "published": false,
  "hasStagedChanges": true
}