Create or update contacts

(Rohan Jalil) #1

Infusionsoft has api endpiont to create or update contacts but PHP sdk don’t provide any interface to use that endpoint. Is there a way to do so? Am I missing something?

(John Borelli) #2

Apples and oranges. The REST implementation uses endpoints under REST design. The api that is accessible via the php support files has an XML-RPC structure at it’s core and is handled by the code. You instantiate the object you want, authenticate and then start using it’s methods.

(Rohan Jalil) #3

I’m sorry if I couldn’t clear myself. I’m using (infusionsoft-php) which supports both REST and XML-RPC. Api has createOrUpdate REST endpoint but php library don’t have any function to use that api.

(John Borelli) #4

look at addWithDupCheck

(Rohan Jalil) #5

This is supported in xml rpc but not in the rest api

(John Borelli) #6

You say that you’re using createOrUpdate with REST. The api equal would be addWithDupCheck… they’re just names. They preform the same function. If it’s critical to you to have them be the same name then create a psuedo function for one or the other.

(Rohan Jalil) #7

Thanks @John_Borelli, is it correct that xml rpc accepts differnt parameters than rest api?

(Rohan Jalil) #8

And is there any particular reason that createOrUpdate is not supported in rest structure? Because I can see that we just need to change call type post to put in RestModel to support this endpoint?

(John Borelli) #9

REST is still in development. You will not find all features carried over yet. Rely on documentation to tell you what is currently available.