Skip Navigation

[Resolved] How to send an API post / get request via CRE

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by Beda 6 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#526361

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.

#526437

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.

#526446

Hi Beda,

So probably the best practice would be to make a wp plugin that connects both APIs?

#526448

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.

#526481

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!

#526482

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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.