I am trying to send an API post request to an external http API when the user submits a CRED form.
There's a we application we would like to integrate with our toolset app. It can handle basic CRUD API requests. What I don't know is:
How to create a post request when a user submits a cred?
How to send a get request and display it in a view via toolset?
Thanks for your help.
Toolset isn't made for this.
But you can try to use our API to hook in at the right moment and then perform your own API calls.
The CRED API is discussed here:
https://toolset.com/documentation/programmer-reference/cred-api/
With those hooks, you can decide when to fire your own code, which you will have to code according to the API of your CRUD software/library.
Hi Beda,
So probably the best practice would be to make a wp plugin that connects both APIs?
I am not sure how your API works, but ours is a set of hooks that lets you fire some Code at a certain moment.
For example, the cred_save_data() is a hook that fires exactly when the post is saved to the Database.
This way you can wrap your own Custom Code in that hook and it will fire at that moment.
Hi Beda,
thanks for fast replies.
This is the API we're trying to connect to: hidden link
Any advice on how to tie this two together would be realy helpful, thanks!
This is the REST API.
Toolset does not yet support the REST for WordPress, and WordPress itself requires some add-ons as far I know.
We have plans to add REST Support, by now you can only choose in Post types whether to show or not these Posts in the REST.
But that's all, more can't be done yet.
More information about WordPress and REST is here:
https://developer.wordpress.org/rest-api/
As said, Toolset is not ready for REST yet and even if it would, it would be full custom code that we cannot provide here:
https://toolset.com/toolset-support-policy/
Unfortunately, this is not something I can assist yet, I have to apologise.