New YRN identifiers
The Price service now allows for creation of prices based on the YaaS Global Resource Name (YRN), in addition to the current support of the productId. The YRN concept is described as a best practice in the YaaS DevPortal (https://devportal.yaas.io/tools/apibestpractices/index.html#ResourceIdentifier).
A new attribute itemYrn is now supported in the price creation request to identify the resource for which a price needs to be created. This attribute is generic, in the form of an URN value, and can be used for a product, book, or any resource that needs a price.
For backwards compatibility, you can create a price using either productId or itemYrn. Do not include both productId and itemYrn in the request; use only one. In addition, the YRN for the newly-created price (along with currently supported price id) is returned in the response to the price creation request, in the attribute yrn.
Please review the following sections in the Basics tutorial for further details.
- Set the price for a product.
- Retrieve a product's price using its ID.
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.