Fetching form data using API2

By: Mike MacDonald | Asked: 03/20/2023
ForumsCategory: General questionsFetching form data using API2
Mike MacDonald asked 2 years ago
Can anyone please point me at a sample API call - ideally using the Talend API extension to Chrome - to receive JSON object containing data from the form. 

If it's in the docs and I missed it then any official docs I'd appreciate a link Thanks very much
Victor Font replied 2 years ago

I'm not exactly sure what you're asking for by "a sample API call". What is the Talend API extension to Chrome and what does it have to do with JSON?

There are so many varieties of APIs that you can connect to through Formidable, that it's impossible to create a sample API call without knowing the structure of the API with which you are interfacing. Different APIs specify the data formats of the properties they're receiving. This often times has to be constructed manually as raw JSON or by using the Postman tool and converting its output to make it work with Formidable. By "make it work with Formidable", I mean substituting the hard coded values required for Postman with Formidable form variables.

JSON REQUEST/RESPONSE headers can also be seen in the network tab of any browser's developer tools when you examine the XHR object when debugging an API request. Don't expect things to go right at first either. They hardly ever do mostly because of data mismatches between the two systems. Make sure you dates formatted the way the API expects them. That's a common data mismatch. The Formidable logging add-on is a help when debugging JSON.

Ultimately JSON is JSON is JSON. There's only one way to write JSON and it's key/value pair centric. I use Microsoft's Visual Studio Code for JSON development because it can read API schemas and use them as intellisense files when writing code. If you've done any work with full site editing things, almost everything is done in JSON now. Using a tool like Visual Studio Code makes debugging JSON a whole lot easier because it makes sure all of your commas are right.

From your post, it sounds like you might be in a decision making process or relatively new to API activities. I've done a lot of API work over the years and only once did I ever have a problem connecting Formidable to an external system and it wasn't Formidable's issue. The API developers kept changing their API on the fly without notifying anyone and it kept breaking what had already been done. Whatever you want to accomplish with the API, you can have confidence that Formidable can handle it for you.

1 Answers
Mike MacDonald answered 2 years ago
Hi Again Victor! Thanks very much - sorry for the delay in response

Talend is just a chrome extension is similar to Postman but I note with thanks that you are listing the tools that are tried and true. The job I was working on was really needing a quick win on a shoestring budget, and so there has been a bit of a straw clutching to get the project out!  I'm taking the point that a deep dive into JSON based APIs is the way to go and am heading in that direction
Thanks very much, for your patient and detailed response  Kindest regards  Mike  

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right