Example of an API call
-
As ChurchTools does the whole communication via AJAX, every function can be call via the API as well.
E.g. https://xxx.churchtools.de/index.php?q=churchresource/ajaxThe calls always have to be sent via POST and need to contain the function name as parameter "func", e.g. func=getBookings (to get all booking) or func=getMasterData to get all needed masterdata.
Per module there are different functions. You can look them up unter system/modulename/classes/CTModulename.class.php or at api.churchtools.de .
Further examples for API calls:
LOGIN
https://xxx.churchtools.de/?q=login/ajax
needs these parameters in the POST body:
email
passwordREQUEST ALL PERSONS
https://xxx.churchtools.de/?q=churchdb/ajax&func=getAllPersonData -
We have created two example projects for you, which also handle login and cookie handling: