Open APIs

 View Only
  • 1.  Why orderItem ids are mandatory for POST operation?

    Posted May 01, 2020 08:28
    Edited by Venkat Bollina May 01, 2020 08:32
    Looking at POST operation of TMF622 Product Ordering Management API
    As i understand across the TMF APIs, The general pattern for id attributes in POST (Create resource) operation is: id fields are not included in input payload, ids are Initially generated by the server and provided in the response upon resource creation.

    But when it comes to product Order Item Id, it is different for post operation, the orderItem id is mandatory. the description says "Identifier of the line item (generally it is a sequence number 01, 02, 03, ...)". the orderItem.id is consistently mandatory(for post operation) across other order APIs as well (Service Ordering, Resource Ordering APIs).
    Could anybody please help me understand following:
    1. In POST response, what should we return in the order Items Id attribute? will it be server generated order item id or the order item id sent in request payload itself?
    2. Why is orderItem id mandatory for creating order item resource? What are the usecases to make orderitem id mandatory in POST operation?

    Thanks

    ------------------------------
    Venkat Bollina
    SSE Enterprise Telecoms
    ------------------------------


  • 2.  RE: Why orderItem ids are mandatory for POST operation?

    TM Forum Member
    Posted May 03, 2020 05:29
    Hi Venkat
    The IDs of OrderItems are not the standard IDs as in managed entities. Rather, these are locally unique IDs within the containing entity (Product Order). This is to allow distinguishing and direct addressing of order items.
    We use this pattern in other places in the Open API model for contained entities.

    So yes, the consumer is expected to populate these IDs when creating a product order that contains order items.
    And yes, the provider is expected to persist these IDs (after local uniqueness check) and not change their values.

    Adding @Ludovic Robert for additional insights.

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