easyappointments icon indicating copy to clipboard operation
easyappointments copied to clipboard

API endpoint for available dates

Open gabrielfin opened this issue 3 years ago • 7 comments

An endpoint that returns all dates with availabilities for a certain month.

/availabilities/dates?month=2022-07&providerId=xx&serviceId=xx

Returns:

["2022-07-05", "2022-07-14", "2022-07-22"]

See #1282

gabrielfin avatar Jul 09 '22 15:07 gabrielfin

Hello!

Thanks for this PR.

I just saw that you already submitted it, so could you please perform the missing changes so that I can merge this:

https://github.com/alextselegidis/easyappointments/issues/1282

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

alextselegidis avatar Jul 11 '22 08:07 alextselegidis

Any updates on this?

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

alextselegidis avatar Jul 18 '22 08:07 alextselegidis

I was waiting for your reply to my question in https://github.com/alextselegidis/easyappointments/issues/1282#issuecomment-1180739154 :

Change the endpoint to /api/v1/availabilities?date=2022-07&providerId=&serviceId=

Do you mean I should replace the current existing endpoint? Because /api/v1/availabilities already exists. Or you just meant that the new endpoint should begin with /api/v1/?

gabrielfin avatar Jul 18 '22 21:07 gabrielfin

Hello!

Sorry I accidentally skipped your comment, but it now has a reply:

https://github.com/alextselegidis/easyappointments/issues/1282#issuecomment-1236839778

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

alextselegidis avatar Sep 05 '22 10:09 alextselegidis

As requested, I put the new code in place of the previous /availabilities endpoint.

/api/v1/availabilities?date=2022-09&providerId=<id>&serviceId=<id> now returns:

{
  "2022-09-06": [
    "09:00",
    "09:30"
  ],
  "2022-09-07": [
    "09:00",
    "09:30"
  ],
  ...
}

gabrielfin avatar Sep 05 '22 20:09 gabrielfin

Hello!

Thanks for the updated PR!

I'll review and merge for 1.5

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

alextselegidis avatar Sep 12 '22 07:09 alextselegidis