# Product Tailoring Product Tailoring lets you manage market-specific Product information. Product Tailoring allows you to customize your product information for different brands or regions based on your business needs. By tailoring product information to different markets, you can increase visibility, customer loyalty, and number of orders. With Product Tailoring you control what [product information is displayed in the storefront](https://docs.commercetools.com/api/projects/product-tailoring.md#product-information-retrievable-in-store). To control the availability of your Products for specific Stores, we recommend using [Product Selections](https://docs.commercetools.com/api/projects/product-selections.md) instead. Product Tailoring is not a replacement for [Localization](https://docs.commercetools.com/api/types.md#localization) but an additional option when using Stores. It allows you to control the tailoring of your Product information for each locale individually. To ensure a consistent user experience for your Customers, the API passes the tailored information to all entities involved in the buying process, such as [Shopping Lists](https://docs.commercetools.com/api/projects/shoppingLists.md), [Carts](https://docs.commercetools.com/api/projects/carts.md), and [Orders](https://docs.commercetools.com/api/projects/orders.md). You can create only one Product Tailoring for each combination of a [Product](https://docs.commercetools.com/api/projects/products.md) and a [Store](https://docs.commercetools.com/api/projects/stores.md). 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 must create a separate Product Tailoring for each Store. Deleting a Store permanently removes all associated Product Tailoring data. ```mermaid classDiagram ProductTailoring *-- "1" Product ProductTailoring *-- "1" Store class Product { } class Store { } ``` A maximum number of 100000000 [Product Tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md) across all Products and Stores can be created per Project. This is a soft limit that can be increased per Project after a performance impact review. See [Limit increase guidance](https://docs.commercetools.com/api/limit-increase-guidance.md#product-and-pricing-model-limits). Tailored data is associated with a Product via the Product's `key`. Deleting a Product, or changing the Product `key`, will delete all associated tailored data. ## Tailor product information For each piece of product information you want to tailor for the Store, add the appropriate Product field with the tailored value to the [ProductTailoringData](https://docs.commercetools.com/api/projects/product-tailoring.md#producttailoringdata) object. For fields that you don't add to this object, the API returns the corresponding original value from the Product's [ProductData](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductData) object when [retrieving the ProductProjection in Store](https://docs.commercetools.com/api/projects/product-tailoring.md#retrieve-product-projection-with-tailored-information). ```mermaid flowchart LR P[ProductData]--> PTA[ProductTailoringData] PTA-->|tailored| PPA[ProductProjection in Store] P-->|original| PPA ``` The following example shows a Product Tailoring for the `name` and `description` fields of a Product, but not for its slug. For the `slug` field, the ProductProjection takes the original value from the ProductData. (a CSV formatted table follows. The first line are the column names.) Field name,Field value on ProductData,Field value on ProductTailoringData,Field value on ProductProjection 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"` Fallback to the original piece of product information gives you the flexibility to customize only the information that needs to be tailored for your Store, while not repeating the information that is identical to the original product information. ### Tailor Product Variant information The API allows you to customize [Images](https://docs.commercetools.com/api/projects/products.md#image) and [Assets](https://docs.commercetools.com/api/types.md#asset) per Store by tailoring existing [ProductVariants](https://docs.commercetools.com/api/projects/products.md#productvariant) or [Variants](https://docs.commercetools.com/api/projects/variants.md) . To assign Store-specific Product Variant information, add the tailored Image or Asset to the corresponding [ProductVariantTailoring](https://docs.commercetools.com/api/projects/product-tailoring.md#productvarianttailoring) object. For Images and Assets that you don't add to this object, the API returns the corresponding original Images and Assets from the ProductVariant or Variant when [retrieving the ProductProjection in Store](https://docs.commercetools.com/api/projects/product-tailoring.md#retrieve-product-projection-with-tailored-information). ```mermaid flowchart LR PV[ProductVariant]--> PVT[ProductVariantTailoring] PVT-->|tailored| PVS[ProductVariant in Store] PV-->|original| PVS ``` The following example shows a ProductVariantTailoring for the UK Store, but no tailoring for the ES Store. The API retrieves the Images for ProductVariant in UK Store from the Images given in the ProductVariantTailoring UK ignoring the Images in the ProductVariant: ```mermaid flowchart LR PV[ProductVariant]--> PVTUK[ProductVariantTailoring UK] PVTUK-->|tailored| PVSUK[ProductVariant in UK Store] PV-->|original| PVSES[ProductVariant in ES Store] ``` The images for ProductVariant in ES Store are retrieved from the original Images in the ProductVariant because no ProductVariantTailoring is defined for the ES Store. ### Stage and publish tailored product information Similar to the Product's [ProductCatalogData](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductCatalogData), where you can prepare your original product information in the `staged` version of [ProductData](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductData), you can prepare the tailored product information in a `staged` version of the [ProductTailoringData](https://docs.commercetools.com/api/projects/product-tailoring.md#producttailoringdata), before you [publish](https://docs.commercetools.com/api/projects/product-tailoring.md#publish) the [ProductTailoring](https://docs.commercetools.com/api/projects/product-tailoring.md#producttailoring) to `current`. 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](https://docs.commercetools.com/api/projects/product-tailoring.md#unpublish) action you can set `published` 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 information in the `staged` tailoring information, that are not yet reflected in the `current` tailoring information. 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](https://docs.commercetools.com/api/projects/messages/product-catalog-messages.md#product-tailoring-messages). ## Product information retrievable in Store The published status of the Product Tailoring is independent of the published status of a Product itself. The Product's `published` field on [ProductCatalogData](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductCatalogData) determines whether the current [Product Projection in Store](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproduct-projections%2F%7Bid%7D%3AGET) is retrievable or not. The following table summarizes the effect the different published statuses have on the availability of Product Projections and their tailored information: (a CSV formatted table follows. The first line are the column names.) Product,Product Tailoring,Staged Product Projection in Store,Current Product Projection in Store unpublished,unpublished,original Product information,not retrievable unpublished,published,tailored Product information,not retrievable published,unpublished,tailored Product information,original Product information published,published,tailored Product information,tailored Product information ### Retrieve Product Projection with tailored information Tailored information is not indexed for the [Storefront Search APIs](https://docs.commercetools.com/api/storefront-search-overview.md). Tailored information cannot be used in [Query Predicates](https://docs.commercetools.com/api/predicates/query.md) for the [Query ProductProjections](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-projections%3AGET) endpoint. The `storeProjection` query parameter does scope the query to the specified Store, but only for projecting original product information on [locales](https://docs.commercetools.com/api/projects/productProjections.md#locales), [prices](https://docs.commercetools.com/api/projects/productProjections.md#prices), and [inventory entries](https://docs.commercetools.com/api/projects/productProjections.md#inventory-entries). The intended approach to populate your storefront is to retrieve the products through the [Get ProductProjection in Store](https://docs.commercetools.com/api/projects/productProjections.md#get-productprojection-in-store) methods. With a Product Tailoring for a Product and a Store, you control whether the original Product information or the tailored information is contained in the Product Projection retrieved through those endpoints. Based on this logic, set the `staged` query parameter and the `published` flag on ProductTailoring as well as on ProductCatalogData in the following way when retrieving Product Projections for the Store: (a CSV formatted table follows. The first line are the column names.) Response,`staged` query parameter,`published` on ProductCatalogData,`published` on ProductTailoring current original Product information,`false` or absent,`true`,`false` current tailored Product information,`false` or absent,`true`,`true` staged original Product information,`true`,`false`,`false` staged tailored Product information,`true`,`true`,`true` or `false` staged tailored Product information,`true`,`true` or `false`,`true` When using [Product Selections](https://docs.commercetools.com/api/projects/product-selections.md) also, the tailored Product must be [available in Store](https://docs.commercetools.com/api/project-configuration-overview.md#products-available-in-store). 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 See API type definition [ProductTailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoring). #### ProductTailoringData See API type definition [ProductTailoringData](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringData). #### ProductVariantTailoring See API type definition [ProductVariantTailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductVariantTailoring). #### ProductTailoringDraft See API type definition [ProductTailoringDraft](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringDraft). #### ProductVariantTailoringDraft See API type definition [ProductVariantTailoringDraft](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductVariantTailoringDraft). #### ProductTailoringInStoreDraft See API type definition [ProductTailoringInStoreDraft](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringInStoreDraft). #### ProductTailoringPagedQueryResponse See API type definition [ProductTailoringPagedQueryResponse](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringPagedQueryResponse). #### ProductTailoringReference See API type definition [ProductTailoringReference](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringReference). #### ProductTailoringResourceIdentifier See API type definition [ProductTailoringResourceIdentifier](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringResourceIdentifier). #### ProductTailoringAttribute When using attributes with [GraphQL API](https://docs.commercetools.com/api/graphql.md) mutations, you must escape any strings in the `value` field: `"value" : "\"A value\""`. See API type definition [ProductTailoringAttribute](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringAttribute). ## Get ProductTailoring ### Get ProductTailoring by ID See API endpoint definition [GET /\{projectKey}/product-tailoring/\{id}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2F%7Bid%7D%3AGET). ### Get ProductTailoring by Key See API endpoint definition [GET /\{projectKey}/product-tailoring/key=\{key}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2Fkey%3D%7Bkey%7D%3AGET). ## Get ProductTailoring assigned to Product in Store ### Get ProductTailoring assigned to Product in Store by Product ID See API endpoint definition [GET /\{projectKey}/in-store/key=\{storeKey}/products/\{productID}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2F%7BproductID%7D%2Fproduct-tailoring%3AGET). ### Get ProductTailoring assigned to Product in Store by Product Key See API endpoint definition [GET /\{projectKey}/in-store/key=\{storeKey}/products/key=\{productKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2Fkey%3D%7BproductKey%7D%2Fproduct-tailoring%3AGET). ## Query ProductTailoring See API endpoint definition [GET /\{projectKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%3AGET). ## Query ProductTailoring in Store See API endpoint definition [GET /\{projectKey}/in-store/key=\{storeKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproduct-tailoring%3AGET). ## Check if ProductTailoring exists by Query Predicate See API endpoint definition [HEAD /\{projectKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%3AHEAD). ## Create ProductTailoring See API endpoint definition [POST /\{projectKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%3APOST). ## Create ProductTailoring in Store See API endpoint definition [POST /\{projectKey}/in-store/key=\{storeKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproduct-tailoring%3APOST). ## Update ProductTailoring ### Update ProductTailoring by ID See API endpoint definition [POST /\{projectKey}/product-tailoring/\{id}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2F%7Bid%7D%3APOST). ### Update ProductTailoring by Key See API endpoint definition [POST /\{projectKey}/product-tailoring/key=\{key}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2Fkey%3D%7Bkey%7D%3APOST). ## 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 See API endpoint definition [POST /\{projectKey}/in-store/key=\{storeKey}/products/\{productID}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2F%7BproductID%7D%2Fproduct-tailoring%3APOST). ### Update ProductTailoring assigned to Product in Store by Product Key See API endpoint definition [POST /\{projectKey}/in-store/key=\{storeKey}/products/key=\{productKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2Fkey%3D%7BproductKey%7D%2Fproduct-tailoring%3APOST). ## Update actions #### on ProductTailoring ##### Set Key See API type definition [ProductTailoringSetKeyAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetKeyAction). ##### Set Name See API type definition [ProductTailoringSetNameAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetNameAction). ##### Set Description See API type definition [ProductTailoringSetDescriptionAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetDescriptionAction). ##### Set Slug See API type definition [ProductTailoringSetSlugAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetSlugAction). ##### Set Meta Attributes See API type definition [ProductTailoringSetMetaAttributesAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetMetaAttributesAction). ##### Set Meta Title See API type definition [ProductTailoringSetMetaTitleAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetMetaTitleAction). ##### Set Meta Keywords See API type definition [ProductTailoringSetMetaKeywordsAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetMetaKeywordsAction). ##### Set Meta Description See API type definition [ProductTailoringSetMetaDescriptionAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetMetaDescriptionAction). ##### Publish See API type definition [ProductTailoringPublishAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringPublishAction). ##### Unpublish See API type definition [ProductTailoringUnpublishAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringUnpublishAction). #### on ProductVariantTailoring ##### Add Variant See API type definition [ProductTailoringAddVariantAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringAddVariantAction). ##### Remove Variant If the Product Variant Tailoring contains `images` that have been [uploaded to our CDN](https://docs.commercetools.com/api/projects/product-tailoring.md#upload-product-tailoring-image) and that are also used on other Product Variant Tailorings, then removing the Product Variant will make the images unavailable wherever they are shared. See API type definition [ProductTailoringRemoveVariantAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringRemoveVariantAction). ##### Add External Image See API type definition [ProductTailoringAddExternalImageAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringAddExternalImageAction). ##### Move Image To Position See API type definition [ProductTailoringMoveImageToPositionAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringMoveImageToPositionAction). ##### Remove Image If the image that you want to delete has been [uploaded to our CDN](https://docs.commercetools.com/api/projects/product-tailoring.md#upload-product-tailoring-image) and its `imageUrl` is also used on other Product Variant Tailorings, then removing the image will make it unavailable wherever it is shared. See API type definition [ProductTailoringRemoveImageAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringRemoveImageAction). ##### Set Images See API type definition [ProductTailoringSetExternalImagesAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetExternalImagesAction). ##### Set Image Label See API type definition [ProductTailoringSetImageLabelAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetImageLabelAction). ##### Add Asset See API type definition [ProductTailoringAddAssetAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringAddAssetAction). ##### Remove Asset See API type definition [ProductTailoringRemoveAssetAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringRemoveAssetAction). #### on Assets ##### Set Asset Key See API type definition [ProductTailoringSetAssetKeyAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetKeyAction). ##### Change Asset Order See API type definition [ProductTailoringChangeAssetOrderAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringChangeAssetOrderAction). ##### Change Asset Name See API type definition [ProductTailoringChangeAssetNameAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringChangeAssetNameAction). ##### Set Asset Description See API type definition [ProductTailoringSetAssetDescriptionAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetDescriptionAction). ##### Set Asset Tags See API type definition [ProductTailoringSetAssetTagsAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetTagsAction). ##### Set Asset Sources See API type definition [ProductTailoringSetAssetSourcesAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetSourcesAction). ##### Set Asset Custom Type See API type definition [ProductTailoringSetAssetCustomTypeAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetCustomTypeAction). ##### Set Asset CustomField See API type definition [ProductTailoringSetAssetCustomFieldAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAssetCustomFieldAction). #### on Attributes ##### Set Attribute See API type definition [ProductTailoringSetAttributeAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAttributeAction). ##### Set Attribute In All Variants See API type definition [ProductTailoringSetAttributeInAllVariantsAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetAttributeInAllVariantsAction). ##### Set Product Attribute See API type definition [ProductTailoringSetProductAttributeAction](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Atype%3AProductTailoringSetProductAttributeAction). ## Upload Product Tailoring image Learn more about images in our self-paced Images and Assets module. Uploads a binary image file to a given [ProductVariantTailoring](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AProductVariantTailoring). After upload, the system converts the original image to several [sizes](https://docs.commercetools.com/api/projects/products.md#image) that are retrievable from 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](https://www.adobe.com/digitalimag/adobergb.html), the API returns a [400 Bad Request Error](https://docs.commercetools.com/api/errors.md#400-bad-request-1) with code `InvalidInput` and the message `Unsupported image data. Not able to identify the color model of your image.` The [Image](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AImage) 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](https://docs.commercetools.com/api/projects/products.md#image) 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 See API endpoint definition [POST /\{projectKey}/in-store/key=\{storeKey}/products/\{productID}/product-tailoring/images](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2F%7BproductID%7D%2Fproduct-tailoring%2Fimages%3APOST). ### by Product Key See API endpoint definition [POST /\{projectKey}/in-store/key=\{storeKey}/products/key=\{productKey}/product-tailoring/images](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2Fkey%3D%7BproductKey%7D%2Fproduct-tailoring%2Fimages%3APOST). The cURL example below adds an [Image](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3AImage) to tailor the ProductVariant with `id` = `2`, in the Product with specified `{productID}` and the Store specified in `{storeKey}`: ```bash 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](https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2) is currently not supported. ## Delete ProductTailoring ### Delete ProductTailoring by ID See API endpoint definition [DELETE /\{projectKey}/product-tailoring/\{id}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2F%7Bid%7D%3ADELETE). ### Delete ProductTailoring by Key See API endpoint definition [DELETE /\{projectKey}/product-tailoring/key=\{key}](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fproduct-tailoring%2Fkey%3D%7Bkey%7D%3ADELETE). ## Delete ProductTailoring assigned to Product in Store ### Delete ProductTailoring assigned to Product in Store by Product ID See API endpoint definition [DELETE /\{projectKey}/in-store/key=\{storeKey}/products/\{productID}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2F%7BproductID%7D%2Fproduct-tailoring%3ADELETE). ### Delete ProductTailoring assigned to Product in Store by Product Key See API endpoint definition [DELETE /\{projectKey}/in-store/key=\{storeKey}/products/key=\{productKey}/product-tailoring](https://docs.commercetools.com/api/projects/product-tailoring.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fin-store%2Fkey%3D%7BstoreKey%7D%2Fproducts%2Fkey%3D%7BproductKey%7D%2Fproduct-tailoring%3ADELETE). ## Related pages - [Section overview page](https://docs.commercetools.com/api.md) - [Previous page: Product Selections](https://docs.commercetools.com/api/projects/product-selections.md) - [Next page: Categories](https://docs.commercetools.com/api/projects/categories.md)