Open APIs

 View Only
  • 1.  Cart Management v5 change

    TM Forum Member
    Posted Mar 05, 2024 04:19
    Edited by Ilyas Premji Mar 05, 2024 06:36


    I would like to know how we can manipulate cartItems in Cart Management v5. Becasue from my current understanding, to remove or adjust a cartItem within a Cart, it seems one would need to send a patch request, iterate through the items inside the Cart, and then execute the changes to that item. Please let me know if this is correct or if there's maybe another way to achieve that.

    Thanks in advance!

    Fadel Kaadan

  • 2.  RE: Cart Management v5 change

    TM Forum Member
    Posted Mar 05, 2024 07:01

    Hi Fadel

    In the TM Forum Open APIs, we don't provide in the standard explicit endpoints to allow manipulations of contained entities. So yes, to add a cart item, you need to PATCH the cart itself, updating the array of items accordingly. Bear in mind that you have the choice of:

    • PATCH Merge, which is simpler to use, and you can apply schema validation to the payload; but it is not so convenient for arrays of contained elements
    • JSON PATCH, which gives you finer control and easier access to array elements; but there is no schema validation for the "value" being applied

    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.