Open gabrielfin opened 2 years ago
Hello!
This sounds like a good idea, but please consider the following:
develop
branch/api/v1/availabilities?date=2022-07&providerId=<id>&serviceId=<id>
[
"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! |
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:
or perhaps an array of dates and slots:
Would that be OK?