Create items in the default locale of a site

In an environment with multiple Oracle Commerce sites, you can configure Commerce to allow merchandisers and developers to create new products, collections, and promotions in any site's default language.

By default, when you to use the administration interface or the API endpoints to create products, collections, and promotions, the requests include validation that makes sure the new items are being created in the default locale of the default site. You must then manually translate these items to other supported languages.

You can, however, use the Admin API saveAdminConfiguration endpoint to configure Commerce so that it bypasses this validation, allowing the creation of products, collections, and promotions in the default language of a site instead. The endpoint's overrideDefaultLocaleValidation property is an array that contains one or more of the following strings: createProduct, createCollection, and createPromotion.

The following sample request configures Commerce to allow collections and products to be created in the default language of any site:

PUT /ccadmin/v1/merchant/adminConfiguration  HTTP/1.1
Authorization: Bearer <access_token>
x-ccasset-language: en

{
"overrideDefaultLocaleValidation": ["createCollection", "createProduct"]
}