Open APIs

 View Only
Expand all | Collapse all

How to change product status in Product Ordering REST API

  • 1.  How to change product status in Product Ordering REST API

    Posted May 18, 2021 08:49
    Dear colleagues!

    Please, check if I am right in my understanding of Product Ordering REST API.

    If I have some product in status "active" and I want to suspend it, I have to send to Product Ordering API something like this:

    {
        "id": "30001",
        "productOrderItem": [
            {
                "id": "100",
                "action": "modify",
                "product": {
                    "id": "4444"
                    "status": "suspended"
                }
            }
        ]
    }

    Question #1: Am I right?

    If yes, then I have the next question #2: what is the reason of the desicion to separate Product Item Actions (add/delete/modify/noChange) and Change Status Actions (suspend, unsuspend, etc.)? What would be wrong, if we have just one mixed type of action, so we can use it whenever we want to create or suspend our product? It could have add/delete/modify/noChange/suspend/unsuspend/add_suspended actions (etc.).

    The upper example could be like this:

    {
        "id": "30001",
        "productOrderItem": [
            {
                "id": "100",
                "action": "suspend",
                "product": {
                    "id": "4444"
                }
            }
        ]
    }

    Thank you!

    ------------------------------
    Konstantin Malyshev
    Bercut LLC
    ------------------------------


  • 2.  RE: How to change product status in Product Ordering REST API

    TM Forum Member
    Posted May 18, 2021 12:29
    Hello Konstantin

    For me, you're right on your question 1 :)
    This is a valid pattern and the modify action could be use to change characteristic value, relationship, status, etc...

    Your pattern 2 is a specialization - you can use in your implementation in particular if both the client and server sides are under your "control".  But let's imagine that you want to use a partner productOrder or receive productOrder from a partner.... in this case your partner will have to adjust to your 'specific' item action while first pattern should be "understood as out of the box".

    Hope it helps

    Ludovic

    ------------------------------
    Ludovic Robert
    Orange
    My answer are my own & don't represent necessarily my company or the TMF
    ------------------------------