Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5.0 API issues #1562

Open
DumahBrazorf opened this issue Jul 18, 2024 · 8 comments
Open

1.5.0 API issues #1562

DumahBrazorf opened this issue Jul 18, 2024 · 8 comments

Comments

@DumahBrazorf
Copy link

DumahBrazorf commented Jul 18, 2024

I just get 404 pages when trying to get categories list with API.
Also, the API documentation for 1.5.0 may need corrections. I see "categoryId" in the services response but 1.5.0 now respond "serviceCategoryId". This is also a pity having to use different words in my program code for different API versions.
Providers API call returns a php error before response. (json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in models/Providers_model.php line 892) and also a warning (Cannot modify header information - headers already sent by (output started at /var/www/html/system/core/Exceptions.php:283) in core/Common.php line 574)

It would be very useful if you add the ea_appointments.update_date_time field in the API appointments response, so we can see whenever someone modified the appointment.
And with this addition, the possibility to get appointments list created/edited since a defined datetime, so we don't need to get the full list every time to check for modifications.

Thanks.

@DumahBrazorf DumahBrazorf changed the title 1.5.0 API Categories not working 1.5.0 API issues Jul 18, 2024
@alextselegidis
Copy link
Owner

Hello!

Which documentation page are you using for while developing your client?

For now please check this config file for an accurate description of the API

https://github.com/alextselegidis/easyappointments/blob/main/openapi.yml

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

@DumahBrazorf
Copy link
Author

Hi,
the api docs on your main site. https://easyappointments.org/docs.html#1.5.0/rest-api.md
Calling service_categories returns 404 too.

@alextselegidis
Copy link
Owner

Hello!

That had to do with some late refactoring I had done before the 1.5 release.

The docs will be updated but instead of categories use service_categories for your requests and things will work out right.

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

@alextselegidis
Copy link
Owner

Docs were updated

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

@alextselegidis
Copy link
Owner

Re-open to check the other issues

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

@DumahBrazorf
Copy link
Author

DumahBrazorf commented Jul 22, 2024

service_categories does not work either, it returns the "404 Page Not Found | Easy!Appointments" html page
I have a couple of categories added via backend page.
all the others api calls work, except the providers issue.

@EagleDelux
Copy link

EagleDelux commented Jul 28, 2024

@alextselegidis

route_api_resource($route, 'categories', 'api/v1/');

this needs to be changed to route_api_resource($route, 'Service_categories', 'api/v1/');

@alextselegidis
Copy link
Owner

Good catch @EagleDelux, just updated this

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants