Product Tailoring
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.
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
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 field | ProductData | ProductTailoringData | 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" |
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:
Product | Product Tailoring | Staged Product Projection in Store | Current Product Projection in Store |
---|---|---|---|
unpublished | unpublished | default Product data | not available |
unpublished | published | tailored Product data | not available |
published | unpublished | default Product data | default Product data |
published | published | tailored Product data | tailored Product data |
When using Product Selections in addition to Product Tailoring, more criteria determine whether a Product is available in Store or not.
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 |
|
current | Current (published) data of the ProductTailoring. |
staged | Staged (unpublished) data of the ProductTailoring. |
hasStagedChanges Boolean |
|
createdAt | Date and time (UTC) the ProductTailoring was initially created. |
createdBy BETA | IDs and references that created the ProductTailoring. |
lastModifiedAt | Date and time (UTC) the ProductTailoring was last updated. |
lastModifiedBy BETA | IDs and references that last modified the ProductTailoring. |
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"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 used by external search engines for improved search engine performance. |
metaDescription | Tailored description of the Product used by external search engines for improved search engine performance. |
metaKeywords | Tailored keywords related to the Product used by external search engines for improved search engine performance. |
slug | User-defined identifier used in a deep-link URL for the ProductTailoring.
Matches the pattern |
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 used by external search engines for improved search engine performance. |
metaDescription | Tailored description of the Product used by external search engines for improved search engine performance. |
metaKeywords | Tailored keywords related to the Product used by external search engines for improved search engine performance. |
slug | User-defined identifier used in a deep-link URL for the ProductTailoring.
Matches the pattern |
publish Boolean | If false |
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 used by external search engines for improved search engine performance. |
metaDescription | Tailored description of the Product used by external search engines for improved search engine performance. |
metaKeywords | Tailored keywords related to the Product used by external search engines for improved search engine performance. |
slug | User-defined identifier used in a deep-link URL for the ProductTailoring.
Matches the pattern |
publish Boolean | If false |
ProductTailoringPagedQueryResponse
PagedQueryResult with results containing an array of ProductTailoring.
limit Int | Number of results requested. |
offset Int | Number of elements skipped. |
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 |
results Array of ProductTailoring | ProductTailoring list matching the query. |
{"limit": 20,"offset": 0,"count": 2,"results": [{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true},{"id": "207ee692-6002-4570-a78c-d15e7adbecc","version": 2,"versionModifiedAt": "2023-09-01T13:42:50.662Z","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
Reference to a ProductTailoring.
id String | Unique identifier of the referenced ProductTailoring. |
typeId String | "product-tailoring" References a ProductTailoring. |
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 |
key String | User-defined unique identifier of the referenced ProductTailoring. Either |
typeId String | "product-tailoring" References a ProductTailoring. |
Get ProductTailoring
Get ProductTailoring by ID
view_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
id String |
|
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Get ProductTailoring by Key
view_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
key String |
|
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Get ProductTailoring assigned to Product in Store
Get ProductTailoring assigned to Product in Store by Product ID
Gets the current or staged representation of a Product Tailoring by its Product ID in the specified Store.
view_products:{projectKey} ,
view_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productID String |
|
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Get ProductTailoring assigned to Product in Store by Product Key
Gets the current or staged representation of a Product Tailoring by its Product key in the specified Store.
view_products:{projectKey} ,
view_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productKey String |
|
expand | The parameter can be passed multiple times. |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Query ProductTailoring
view_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
where | The parameter can be passed multiple times. |
/^var[.][a-zA-Z0-9]+$/ Any string parameter matching this regular expression | Predicate parameter values. 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. |
offset Int | Number of elements skipped. |
withTotal Boolean | Controls the calculation of the total number of query results. Set to |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/product-tailoring -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"limit": 20,"offset": 0,"count": 2,"results": [{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true},{"id": "207ee692-6002-4570-a78c-d15e7adbecc","version": 2,"versionModifiedAt": "2023-09-01T13:42:50.662Z","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
Queries Product Tailoring in a specific Store.
view_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
where | The parameter can be passed multiple times. |
/^var[.][a-zA-Z0-9]+$/ Any string parameter matching this regular expression | Predicate parameter values. 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. |
offset Int | Number of elements skipped. |
withTotal Boolean | By default, the response does not include the |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/product-tailoring -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"limit": 20,"offset": 0,"count": 2,"results": [{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true},{"id": "207ee692-6002-4570-a78c-d15e7adbecc","version": 2,"versionModifiedAt": "2023-09-01T13:42:50.662Z","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}]}
Create ProductTailoring
Generates the ProductTailoringCreated Message.
manage_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
expand | The parameter can be passed multiple times. |
application/json
application/json
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"},"publish" : false}DATA
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Create ProductTailoring in Store
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.
manage_products:{projectKey} ,
manage_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
expand | The parameter can be passed multiple times. |
application/json
application/json
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"},"publish" : false}DATA
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Update ProductTailoring
Update ProductTailoring by ID
manage_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
id String |
|
expand | The parameter can be passed multiple times. |
application/json
version Int | Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned. |
actions Array of ProductTailoringUpdateAction | Update actions to be performed on the ProductTailoring. |
application/json
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
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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
manage_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
key String |
|
expand | The parameter can be passed multiple times. |
application/json
version Int | Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned. |
actions Array of ProductTailoringUpdateAction | Update actions to be performed on the ProductTailoring. |
application/json
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
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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
Updates the current or staged representation of a Product Tailoring by its Product ID in the specified Store.
manage_products:{projectKey} ,
manage_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productID String |
|
expand | The parameter can be passed multiple times. |
application/json
version Int | Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned. |
actions Array of ProductTailoringUpdateAction | Update actions to be performed on the ProductTailoring. |
application/json
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
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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
Updates the current or staged representation of a Product Tailoring by its Product key in the specified Store.
manage_products:{projectKey} ,
manage_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productKey String |
|
expand | The parameter can be passed multiple times. |
application/json
version Int | Expected version of the ProductTailoring on which the changes apply. If the expected version does not match the actual version, a 409 Conflict is returned. |
actions Array of ProductTailoringUpdateAction | Update actions to be performed on the ProductTailoring. |
application/json
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
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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
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 |
{"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 |
{"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 |
{"action": "setSlug","slug": {"en": "a-slug"},"staged": true}
Set Meta Title
action String | "setMetaTitle" |
metaTitle | Value to set. If empty, any existing value will be removed. |
staged Boolean | If true |
{"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 |
{"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 |
{"action": "setMetaDescription","metaDescription": {"en": "A Meta Description"},"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 |
{"action": "setMetaAttributes","metaTitle": {"en": "A Meta Title"},"metaDescription": {"en": "A Meta Description"},"metaKeywords": {"en": "Meta Keywords"},"staged": true}
Publish
Publishes the staged
data of the ProductTailoring to current
. Sets hasStagedChanges
to false
.
Generates the ProductTailoringPublished Message.
action String | "publish" |
{"action": "publish"}
Unpublish
Unpublishes the current
data of the ProductTailoring. Sets the published
field to false
.
Generates the ProductTailoringUnpublished Message.
action String | "unpublish" |
{"action": "unpublish"}
Delete ProductTailoring
Delete ProductTailoring by ID
Generates the ProductTailoringDeleted Message.
manage_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
id String |
|
version Int | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/product-tailoring/{id}?version={version} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Delete ProductTailoring by Key
Generates the ProductTailoringDeleted Message.
manage_products:{projectKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
key String |
|
version Int | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/product-tailoring/key={key}?version={version} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Delete ProductTailoring assigned to Product in Store
Delete ProductTailoring assigned to Product in Store by Product ID
Generates the ProductTailoringDeleted Message.
manage_products:{projectKey} ,
manage_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productID String |
|
version Int | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
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}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}
Delete ProductTailoring assigned to Product in Store by Product Key
Generates the ProductTailoringDeleted Message.
manage_products:{projectKey} ,
manage_products:{projectKey}:{storeKey}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
productKey String |
|
version Int | Last seen version of the resource. |
expand | The parameter can be passed multiple times. |
application/json
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}'
{"id": "207ee692-6002-4570-a78c-d15e7adbebbb","version": 2,"versionModifiedAt": "2023-09-01T13:41:50.662Z","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": []},"published": false,"hasStagedChanges": true}