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

Bexio API Version number should not be constant #12

Open
kosli opened this issue Jan 11, 2021 · 1 comment
Open

Bexio API Version number should not be constant #12

kosli opened this issue Jan 11, 2021 · 1 comment

Comments

@kosli
Copy link

kosli commented Jan 11, 2021

Currently the API version number is "constant" as the API URL is constant ->

const API_URL = 'https://api.bexio.com/2.0';

The reason is that there are different functions available in the Bexio API depending on the version. Some are v2 but some are (only) v3, e.g. https://docs.bexio.com/#tag/Taxes

Maybe this is more something that Bexio should solve, as I would expect a function from API v2 to be available in v3 too (e.g. Contacts are v2 only: https://docs.bexio.com/#tag/Contacts), but if you want to use the full functionality of the API, this should take care of the in php client as well. e.g. use "2.0" as default version if no version is provided in the "get" function call.

@simoor
Copy link
Contributor

simoor commented Dec 14, 2023

@kosli instead of using
return $this->client->get('contact', $params);
you could use
return $this->client->get('../3.0/taxes', $params);
which is not nice, but a workaround

Repository owner deleted a comment from mrpanday93 Feb 15, 2024
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

2 participants