Open APIs

Expand all | Collapse all

TMF637: product summary operation?

  • 1.  TMF637: product summary operation?

    TM Forum Member
    Posted Sep 06, 2021 11:35
    Hi,

    In our company we need to provide API users with a response that shows how many instances of each product that a customer (party) has. The listProduct operation in TMF637 does not quite fit our needs, because the response as specified only contains an array of fully-specified product objects; there is no property in which to supply aggregate counts.

    Current plans involve extending our implementation of the TMF637 Product Inventory Management API with a non-standard endpoint that provides a map of productOfferingRefs together with integer counts. The response would be structured something like this:
    [
    {
    "productOffering": {
    "id": "MOBILE_10",
    "name": "Mobile 10 GB",
    "href": "https://example.com/api/products/MOBILE_10"
    },
    "count": 62
    },
    {
    "productOffering": {
    "id": "MOBILE_50",
    "name": "Mobile 50 GB",
    "href": "https://example.com/api/products/MOBILE_50"
    },
    "count": 3
    }
    ]

    We would of course prefer using standard TMForum operations and response schemas wherever possible. Are there ways to express this kind of information using only the published TMForum specifications?

    ------------------------------
    Arnt Richard Johansen
    Telia Company
    ------------------------------


  • 2.  RE: TMF637: product summary operation?

    TM Forum Member
    Posted Sep 07, 2021 03:59
    Hi Arnt,

    The TMF630 Part 1 chapter 1.9 provides a custom header that returns the count:

    Content-Type: application/json
    X-Total-Count: 200

    Obviously that means you have to do one call per productOffering, but I don't think there is a currently specified model that comes closer to your need.


    Regards

    ------------------------------
    Koen Peeters
    Ciminko Luxembourg
    ------------------------------