Open APIs

Expand all | Collapse all

searchTimeSlot in Appointment API

  • 1.  searchTimeSlot in Appointment API

    TM Forum Member
    Posted Jan 15, 2019 01:53
    Hello,

    I have a query about how to apply the searchTimeSlot operations in the Appointment API.

    I need to model a query for available time slots prior to the appointment booking step, but I'm unsure about whether to use:

    a) the POST to the /searchTimeSlot  (page 42 of the API PDF)
    b) or the GET to /searchTimeSlot?...  (page 45)

    From the documentation it looks like it should be the POST?

    Can anyone clarify which approach to take?

    Kind Regards,
    Kieran.




    ------------------------------
    Kieran Ryan
    NBNCo Ltd
    ------------------------------


  • 2.  RE: searchTimeSlot in Appointment API

    TM Forum Member
    Posted Jan 18, 2019 03:12
    ​Hello,

    In your appointment booking step, you have to use the POST operation on the SearchTimeSlot  resource (a) to  obtain a list of available time slots according to given criteria in the request.

    The process is explained page 42.

    Best regards,

    ------------------------------
    Sophie BOULEAU
    Orange
    ------------------------------



  • 3.  RE: searchTimeSlot in Appointment API

    TM Forum Member
    Posted Jan 20, 2019 14:07
    Thanks @Sophie BOULEAU for your reply.
    Just to add some additional context - the searchTimeSlot resource is an example of a TASK resource. The REST paradigm is very much entity-oriented (create, read, update, delete on business entities). So we use TASK ​resources to express business operation semantics that go beyond the bounds of the entity-oriented operations, for example to validate an address, to submit an order, and more. POSTing the task resource causes the business operation to be executed.
    Searching and reserving an appointment timeslot is another example - the searchTimeSlot resource is a task resource with input that defines which slots might be needed, and output that returns the slots meeting the search criteria. Note that a simple GET will not do here, since an implementation may want to hide slots that were returned in a search so that they will not be returned in another parallel search. This is not idempotent (the search has side-effects in the persistent layer) so GET cannot be used.
    Hope this explanation helps - refer to the guidelines at https://projects.tmforum.org/wiki/display/PUB/TMF630+API+Design+Guidelines+3.0+R17.5.1 for more information.

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    ------------------------------



  • 4.  RE: searchTimeSlot in Appointment API

    TM Forum Member
    Posted Jan 21, 2019 02:07
    Thanks very much for the replies to my query. This has validated my understanding of the design intent of the API. We are reviewing the task versus resource aspect in this model further.

    ------------------------------
    Kieran Ryan
    NBNCo Ltd
    ------------------------------