It is true that ProductPrice is an instantiation in the inventory of the ProductOfferingPrice in the catalog. In the catalog POP is a stand-alone managed entity (and the same can be re-used in multiple ProductOfferings). But in the inventory the ProductPrice is a sub-entity of Product and would not be managed independently.
The API model should of course be implementation-independent, but we can imagine that in an implementation based on document database persistence, each Product would be a document (indexed on ID), and the characteristics, prices, etc. would be contained within the parent Product document. Even in a relational database implementation, where Product and ProductPrice might be in separate tables with foreign keys, this is an implementation detail that is not important for the API exposure.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
------------------------------
Original Message:
Sent: May 29, 2019 12:22
From: Suman Bagde
Subject: ProductPrice sub-resource
Hi Jonathan, Ludovic,
Wouldn't the productPrice be an instance of the offering price and thereby have an instance id? Same lines as product and product offering?
------------------------------
Suman Bagde
Infosys Ltd.
Original Message:
Sent: May 29, 2019 09:55
From: Jonathan Goldberg
Subject: ProductPrice sub-resource
Hi Suman
ProductPrice is not an independent resource and it is not logical that it should have an ID. It is definitely very important however to understand the source in the catalog for the price, and for this reason an ID was placed in the resource. However the API team has concluded that this is a confusing use of the ID attribute (and also is not the way that we manage references to other resources), so in R19.0 this ID is being replaced by a proper reference with ProductOfferingPriceRef. Other parallel resources (e.g. OrderPrice, CartPrice) are being updated in the same way to keep a consistent model.
@Ludovic Robert "owns" Product Inventory API and can give you additional details of this update.
If you have a specific use case where you need to identify a specific ProductPrice within its containing entity you can of course extend the model in your implementation.
Hope it helps
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Original Message:
Sent: May 29, 2019 02:30
From: Suman Bagde
Subject: ProductPrice sub-resource
Hi,
In the Inventory management API, we have ProductPrice sub-resource. The id mentioned in this resource states it is the Id of offering price.
Where will the Id for the product price be added?
Thank you
------------------------------
Suman Bagde
Infosys Ltd.
------------------------------