easyappointments
easyappointments copied to clipboard
Add support for month based availability generation on the availabilities API.
Currently, the /availabilities
endpoint only returns the available hour slots for a specific date. I would like to submit a PR that adds a new endpoint that would return the days with availabilities for a certain month or date range. Something like:
/availabilities/dates?month=2022-07&providerId=xx&serviceId=xx
which returns either an array of available dates:
["2022-07-05", "2022-07-14", "2022-07-22"]
or perhaps an array of dates and slots:
[
{
date: "2022-07-05",
hours: ["08:00", "11:30", "15:00"]
},
{
date: "2022-07-14",
hours: ["09:30", "11:30"]
},
]
Would that be OK?
Hello!
This sounds like a good idea, but please consider the following:
- Make your PR based on the code of the
develop
branch - Change the endpoint to
/api/v1/availabilities?date=2022-07&providerId=<id>&serviceId=<id>
- Change the end result to the following JSON structure
[
"2022-07-01": [
"08:00",
"09:00"
],
"2022-07-02": [
"08:00",
"09:00"
],
...
]
![]() |
Alex Tselegidis, Easy!Appointments Creator Need a customization? Get a free quote! |
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/
?
Hello!
Sorry, I accidentally skipped this one.
Do you mean I should replace the current existing endpoint?
Yes, I'd say for simplicity's sake, that we use the same endpoint without specifying and exact date.
![]() |
Alex Tselegidis, Easy!Appointments Creator Need a customization? Get a free quote! |