Open APIs

 View Only
  • 1.  reschedule appointment

    TM Forum Member
    Posted Jan 21, 2020 09:29
    Hi, I have a query about how to reschedule an appointment using searchTimeSlot. I'm unsure about whether to use:

    a) POST searchTimeSlot to find a new time slots, and later PATCH appointment with the new time slot available found. (new reservation)
    b) GET searchTimeSlot{id} to get the time slots found in the first seach where the original appointment was booked, and later PATCH appointment with the new time slot available found. (same reservation updated)

    I think the option b avoid to DELETE the original searchTimeSlot.

    Can anyone clarify which the right approach?

    Kind regards

    ------------------------------
    Cristian Medina
    Telecom Argentina, S.A.
    ------------------------------


  • 2.  RE: reschedule appointment

    TM Forum Member
    Posted Jan 22, 2020 08:42

    Hello Cristian,

     

    My opinion is that both solutions will work. The point is to find which one best fits your needs.

    a)  If you create a new POST searchTimeSlot request with the same parameters than the initial one, you will get a new resource (with a new searchTimeSlot.id), which contains an updated version of the available timeSlots array. Some of them may have disappeared, others may have reappeared. You will then be able to PATCH appointment. It is not a new reservation, as long as the appointment.id will remain the same.
    In this case, as long as you don't delete the initials searchTimeSlot resources, you will keep all previous searchTimeSlot resources. This might be useful if you want to keep the history of timeSlots researches.

     b) If you request GET searchTimeSlot{id}, you will potentially get a new list of available time slots for the same resource. Indeed, within the delay  between the 2 searchTimeSlot requests, some time slots may have been booked and/or others may have been released. No new searchTimeSlot resource will be created in this case (you still consider the same timeslot.id) but the current resource will be updated. In this case, you don't keep any history of the time slots researches.

    I hope it helps, don't hesitate to ask for extra questions if necessary.

    Best regards

     



    ------------------------------
    Gregoire Laurent
    Orange
    My answer are my own & don't represent necessarily my company or the TMF.
    ------------------------------



  • 3.  RE: reschedule appointment

    TM Forum Member
    Posted Jan 27, 2020 01:55
    Thanks a lot @Gregoire Laurent for the clarification​

    ------------------------------
    Cristian Medina
    Telecom Argentina, S.A.
    ------------------------------



  • 4.  RE: reschedule appointment

    TM Forum Member
    Posted Jan 28, 2020 10:49
    I have a question related to same regarding http Error code. Which error code will you suggest in case of timeSlot is not available? will you return "OK" 200 or Failure with 422 or some other http error code?

    ------------------------------
    hashim Singh
    Rogers Communications Inc.
    ------------------------------



  • 5.  RE: reschedule appointment

    TM Forum Member
    Posted Feb 04, 2020 08:58
    Hello @hashim Singh,

    when you create a POST searchTimeSlot request, even if it doesn't return any available time slot, the resource should be created. In this case, to my opinion the expected return http code should be 201 (created). Maybe that in the future a time slot will be available when you'll request a GET searchTimeSlot on the same id ?

    If you want to indicate in the POST searchTimeSlot response that no time slot is available, you should consider using the searchResult attribute .

    I hope it helps, don't hesitate to ask if you have any further question.

    Best regards,
    ​​

    ------------------------------
    Gregoire Laurent
    Orange
    My answer are my own & don't represent necessarily my company or the TMF.
    ------------------------------