We are pleased to announce the release of Product Service v2 which introduces new functionality and improvements.

For this release, we have introduced features that allow you to use our service for more general and simpler purposes.

New Features and Functionality

Our most important goal for this release was simplifying the user experience. In doing so, we have introduced following improvements:

Media enhancements

Automatic media reorder when creating/updating your product's media.

Prior to this release, you were on your own with media ordering, for example, when you added media to the product in any other position than the last, you had to recalculate the position of all other media in this product. This made it difficult to use. In this release, when you are creating or updating media, you no longer have to manually manage its position in the media's collection. The service now automatically places it in the appropriate position and reorder the rest of your media respectively. For more information about this functionality, see Media Tutorial.

If you were previously managing your media collection's order manually, you will need to use (just once) our Migration service to migrate your media's order to the format used with the Product Service v2.

New media endpoint

To be compliant with Media Repository v2, we changed how to add media to products. This change was necessary because the Media Repository service v2 moved storage to an external service (AWS S3 Bucket). In addition, this change gives you the ability to define a 'Content-Type' header for the uploaded media. This value is respected when fetching media with the returned media's link (with the Product Service v1, you received 'binary/octet-stream' 'Content-Type' header). For more information about this change in the Product service, see Media Tutorial

Removing external media support.

For security reasons we have removed external media support. It will no longer fetch, create, or update the media, so all external media created is not visible. For more information about external media support, see Media Tutorial

Product management

Rename field 'sku' to 'code'.

The SKU (Stock Keeping Unit) is just one of many other product's identifier types, such as UPC, EAN, GTN, and so forth. Not all products have to be connected with inventory. We want you to be able to use the Product service for more than shops, for example, the YaaS Market or the YaaS blog. We were looking for another word for a user-managed identifier. We chose 'code' as it is more general than 'sku'. As of this release, every product must have a 'code' value and it must be unique for a single tenant. The code is not automatically generated for you, because one of the code considerations was human-readability.

Optimistic locking feature

To allow you to safely manage your products, we introduced an optimistic locking mechanism. Now with every update, you can provide the version metadata value that you received when you fetched that product. The service ensures that the version you provided matches the version stored in the database. If it does not match, someone has updated your product in the meantime. For more information about the optimistic locking feature, see the Optimistic Locking Tutorial

No strict validation for product's attributes.

In this release, additional attributes that are not supported by the Product service are simply ignored when provided instead of generating an error.

Partial put improvements.

We improved the partial update function to include the possibility to add or remove single elements of the product's collections. With the Product Service v1, you had to provide a full collection even if you wanted to simply add a new element to it. In this release, adding or removing additional translations in the localization map is simpler than ever before. For more information about partial update improvements, see the Partial Update Tutorial


Removing default language support

In the previous version of the Product service, if you did not provide 'Content-Language' or 'Accept-Language' headers, the service assumed that the content you were working on was in English. As we want you to be more aware of how your data are treated, we removed that assumption. Now, if you are providing data without localization, the service requires that you provide a 'Content-Language' header. If you're fetching data, and you provide 'hybris-languages' header or do not provide a 'Accept-Language' header, you will receive a full map of localization values. For more information about language support, see Localization Tutorial


'SKU' field's Migration (no action required)

We have added a field named 'code' to all your products with 'sku' as the value. In the previous release, the introduced the mapping mechanism that was updating both fields simultaneously. Now, using the Product service, you will notice that the values from your 'sku' field are now visible in the field 'code'.

Media reorder migration (possible action required)

In this release, we introduced a new tool called the Migration Service. The purpose of the tool is to migrate your media collection order. The tool reorders your media to the format supported by this release of the Product service, taking into consideration the media's position attribute and the main flag. Note that the main flag has the higher priority than any position value. If you were ordering your media with the Product Service v1 make sure you trigger it after you have finished using it and before you start using Product Service v2. For more information about the media reorder migration too, see Product Service v2 Media Migration Tutorial

  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.