Open APIs

 View Only
  • 1.  TMF-663 ShoppingCart - why is there an action in CartItem?

    TM Forum Member
    Posted Sep 15, 2022 14:23
    Hi,

    I wonder how why there is an action attribute with the CartItem type in the shopping cart API. Given that we're talking about REST and therefore state-driven API, json-patch (as described in TMF-630) to me sounds significantly more appealing to modify the array of cart items, or even a POST/PATCH/PUT/DELETE to /shoppingCart/<cart-id>/cartItem/<cart-id-unless-POST>. Also what is expected in this field in case of GET?

    Thank you for helping in advance!
    Florian

    ------------------------------
    Florian Wiesner
    Oracle Corporation
    ------------------------------


  • 2.  RE: TMF-663 ShoppingCart - why is there an action in CartItem?

    TM Forum Member
    Posted Oct 02, 2022 08:17
    Hi Florian
    The action in the cart item is what is intended to happen to the Product referred to by the cart item. For example, a typical shopping cart is all about providing new products so we can expect to see add actions in the cart items. But in case a shopping cart is used also to capture non-provide orders, we might see modify, remove, or even suspend actions in the relevant items.
    Hope this 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.
    ------------------------------



  • 3.  RE: TMF-663 ShoppingCart - why is there an action in CartItem?

    TM Forum Member
    Posted Oct 20, 2022 13:00
    Hey Jonathan,

    thank you!

    Sorry for the late reply.
    Florian

    ------------------------------
    Florian Wiesner
    Oracle Corporation
    ------------------------------