Hi,
Thanks for your reply and help on the syntax.
We don't use categories and I see you use categories in your examples. (we will use categories in the future but they will be used to group product offerings by affinity, e.g. hardware, TV etc).
In your examples, I don't see the product offering Id (123), so I suspect your call may return multiple product offerings.
The starting point is that the distributor already knows:
- the product name/id
- the catalogue name/id
- the place name/id
- the Party name/id
Can we just send parameters like:
GET /productOffering/123?Filter=place[{@name=='North West'}]&Filter=Catalog[{@name=='Retail Store'}]&Filter=Party[{@name=='ElectroButtik'}]and let our server-side code do its magic (since our Product catalogue datamodel is different from the API resource model)
Would that break any "compliance" with the TMF API?
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
------------------------------
Original Message:
Sent: Oct 20, 2022 01:44
From: Vance Shipley
Subject: filter on sub-resources
On Oct 19, 2022 07:45 @Matthieu Hattab wrote:
| how can I add extra parameters in my request to tell my Product Catalogue component to only prices data related to:
| Party = ElectroButtik
| Place = North West
In your diagram you show a relationship between productOfferingPrice and ProductCatalog. We'll have to assume this means that you have a collection of catalogs"
GET /catalog
[
{
"name": "Retail Store",
"relatedParty": [
{
"name": "ElectroButtik",
...
}
].
"category": [
{
"name": "ElectroButtik Retail Store",
...
}
],
...
},
{
"name": "Web Store".
...
}
]
You would start your query using the appropriate Catalog which limits it to Product Offerings available in the ElectroButtik retail store.
GET /productOffering?filter=category[?{@.name=='ElectroButtik Retail Store'}]
To narrow it down the North West location add another filter:
GET /productOffering?filter=category[?{@.name=='ElectroButtik Retail Store'}]&filter=place[{@name=='North West'}]
To return just the productOfferingPrices add fields:
GET /productOffering?filter=category[?{@.name=='ElectroButtik Retail Store'}]&filter=place[{@name=='North West'}]&fields=productOfferingPrice
------------------------------
Vance Shipley
SigScale
Original Message:
Sent: Oct 19, 2022 07:45
From: Matthieu Hattab
Subject: filter on sub-resources
Hi,
I read TMF630 but I didn't quite understand how I can add additional parameters to do some "filtering" on sub-resource.
example: Party "ElectroButtik" (one of our distributors) wants to know applicable prices for a product.
Our product catalogue has these data (snapshot)
how can I add extra parameters in my request to tell my Product Catalogue component to only prices data related to:
Party = ElectroButtik
Place = North West
GET .../productCatalogManagement/v4/productOffering/123*****Party.name = ElectroButtik*****Place.name = North West
What would be the correct syntaxt?
I expect this response:
id = 123
name = Wireless Broadband 100GB
...
"productOfferingPrice": [
{
id = POP1
name = setup charge
},
{
id = POP10
name = monthly charge
}
]
...
The most important aspect is that we need to keep fully compliance with TMF620 resource models.
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
------------------------------