Open APIs

 View Only
Expand all | Collapse all

TMF687 - Stock Management - adjustProductStockItem POST id mandatory

  • 1.  TMF687 - Stock Management - adjustProductStockItem POST id mandatory

    Posted Dec 20, 2023 09:03

    Hello,

    I'm fairly new to the TMF OpenAPIs so maybe this question is very low level but I didn't found any answer in the documentation. 

    Inside the POST of adjustProductStock endpoint we don't have the ID on root level, which seems clear to me because we are creating a new one. But in the adjustProductStockItem there is the ID again mandatory which I don't fully understand. Inside the productStockTarget it seems clear to me again that we have the ID because it's the ID of the product stock we want to change. But why we need a ID inside the adjustProductStockItem, how the source systems should know which ID has to be created here when the endpoint could be requested by different source applications ? 

    Thanks in advance 

    Mario 



    ------------------------------
    Mario Roßhirt
    TO BE VERIFIED
    ------------------------------


  • 2.  RE: TMF687 - Stock Management - adjustProductStockItem POST id mandatory

    Posted Dec 23, 2023 15:07

    Hi Mario

    The Open APIs have a standard pattern for array entities contained within another entity. such as in your example of stock item. The contained entities need a locally-unique ID (perhaps index would have been a better term). This allows unambiguous access to each array element without relying on position within the array. Hence the ID is mandatory for the array element.

    Hope it helps.



    ------------------------------
    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.
    ------------------------------