Open APIs

  • 1.  TMF622 PATCH Product Order API

    TM Forum Member
    Posted 23 days ago

    Hi All,

    In Patch product order defined in TMF622 Product Ordering API REST Specification, It is mentioned that "orderTotalPrice" is a patchable attribute .But there is no unique identifier in orderTotalPrice. Also, I can find some other attributes without unique identifier in update request payload .What is the expectation for update over these attributes.


    Please share your inputs. Thank you in Advance



    ------------------------------
    Ashika Methal
    Six DEE Telecom Solutions Pvt Ltd
    ------------------------------


  • 2.  RE: TMF622 PATCH Product Order API

    TM Forum Member
    Posted 22 days ago
    It's a good question, @Ashika Methal.
    Without having some index in the array​, you would have to replace the entire array contents using PATCH Merge.
    If there was something identifiable, you could use the JSON Patch semantics, but without a reliable index it is probably not a good idea.
    If this is important, we could open a CR I suppose, @Ludovic Robert what do you think?​​

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 3.  RE: TMF622 PATCH Product Order API

    TM Forum Member
    Posted 21 days ago

    Hi community,

    This is a very good point. During our implementation of these APIs, more concretely the order management APIs, we missed a way to manage sub-resources in the standard. Let's see with an example: in our product, service and resource order management implementations we use the notes to register things that we consider interesting for the user regarding the order execution. In complex orders, this list might grow a lot. In this situation, each time we wanted to add a new note we had to get the whole list, add the new note, and patch everything again, with the consequent loss of performance. The same thing happens with any other list of sub-resources in all the APIs.

    To solve this, we expanded the API to allow specific treatment for sub-resources. This way, to add a new note to an order the request would look like this:

                   POST /serviceOrder/123/note

    To remove a note, something like DELETE /serviceOrder/123/note/5.

    And so on. In order management, this is especially relevant with order items. With the standard as it is, to change the status of an order item, we have to get the whole list of order items, search the order item that we want to change, modify the status and path again the whole list. In complex orders with long lists of order items this is crazy in terms of performance. With this new approach this operation would be something like:

     

                   PATCH /serviceOrder/123/orderItem/3

                   {

                                  state='new status'

                   }

     

    Quite simpler, right?

    Could it be interesting to add these capabilities to the standard?

    Best regards,

    ------------------------------
    Abel Ruiz Huerta
    SATEC GROUP
    ------------------------------



  • 4.  RE: TMF622 PATCH Product Order API

    TM Forum Member
    Posted 21 days ago
    Hello Jonathan, Ashika
    Yes, this is definitively a good topic for discussion, and a CR will help from a governance perspective to trigger this. In fact for all array without an id (index), I guess, we can have this issue for JSON patch.  Precisely in this OrderTotalPrice perhaps the attribute name could be use as a 'key' but this is not as reliable as a  'real' index.

    Thanks,
    Ludovic

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