Hello, My apologies in advance for the newbie questions. I am working on a proof of concept, and trying to prototype a simple demonstration of communicating via an API to the Infusionsoft CRM. I was able to use node.js/REST to communicate to another app’s API (part 1 of the project). My initial plan was to also communicate with the InfusionSoft CRM (part 2) via REST using node.js ( I’m fairly new to node.js and REST). I don’t see any node.js/REST examples.
I see XML-RPC examples for Java, CSharp, etc, (I’ve developed previously in both languages), and see the online REST examples and documentation. What I don’t see, is a node.js/REST example, or even a java/REST example.
Is there a simple node.js/REST example to do something basic like list contacts?
Should I just develop in Java or C# connecting to the Infusionsoft CRM via XML-RPC? Are people using XML-RPC for new development with Infusionsoft? What is the most common environment used to connect to the Infusionsoft CRM API?
Thank you in advance!
I use basic jQuery for communicating with local endpoints I’ve written in PHP. The languages will differ but it’s the most straight forward way weather I’m using REST or the XML-RPC api. The most common use by far seems to be the PHP XML-RPC if I’m to go by most I’ve spoke to. But endpoint management really only requires being able to send to and receive from the endpoint weather it’s yours or as a REST call out.
@Regan_Coleman Congrats on using Node to consume another REST API!
The general concepts of REST translate everywhere. I bet you’re well-equipped to consume the Infusionsoft REST API in Node, today.
We don’t (yet!) have examples for various languages but we have good REST API documentation. I’d recommend reading that introductory section which includes auth and how to make requests.
For your specific example, you’d want to look at List Contacts.
What I ended up doing is just using the XML-RPC for things that the REST API just can’t do, and just translate the XML into JSON, getting rid of all the extra tags, and turning the name tag into the key of the json field, and then the value tag as the value of the json field. Let me know and I can copy how I do the replacement so that it returns a valid JSON Object.
We use C# and RestSharp with Newtonsoft JSON in a custom wrapped RestSharp serializer. That way we can build up the structures we want on the backend and serialize it cleanly without all our developers needing to know how to build each REST API call. You could just as easily use pure JS or jQuery if you wanted.
Thanks - much appreciated!
Mike, Thank you. Yes, I saw the REST docs - they look good, and yes I had found that call as well. I was hoping for some node.js sample code. No worries - I’m about to tackle this, so I’m going to go through the auth docs. Thanks!
Thanks for the reply - I’m leaning towards starting in REST, and then if something comes up I can’t do, falling back to XML-RPC. I may take you up on your offer. Thank you!
Paul, interesting - helpful, and thank you for taking the time to reply. Cheers, Regan