Put New Contact vs Update Put


Put New Contact vs Update Put

What are the differences between the following:

1) XML tags/layout

2. XML tag Content (values of the tags)





You can find the required syntax upon a POST for creating a contact here.  As far as doing the PUT, I suggest to do a GET and update the necessary information. 


I hope this helps.

Ryan Davis
Quality Engineer

Sorry, I'm using the phrase Put but it should be "Post", that's true in my other forum posts (no punn intended)


Okay, correctt me if I'm wrong the xml that I send with an update and a new record are the same except that the Contact attribute "id" is missing on a new contact?


And, the xml is just the Atom ns entry section and CtCt ns Contact (in Content)
Entry xmlns=Atom>....<Content>...<Contact xmlns:ctct [id is omitted0]





Yes they are the same but it is best to get everything and re-include it as there could be information in other fields and if you do an update with that field missing it will remove it.  Information is not appended upon put, it is replaced.The namespaces are exactly as you mentioned.

Ryan Davis
Quality Engineer

I will be doing a fresh get then post after correlating my data, business rules (which data is the survivor) etc...


However the reason I'm asking is that I'm not using any class or xpath operations, I'm using transformations from predefined XSLT docs stored as .xsl files (xml) and eventually in the database, hence why I need to know which tags, attributes and ns's will be returned so I can properly parse or render the correct xml string from xslt.


When I get further along, I'll post my sample xml strings of all my expected get & post operations for review.


If I'm sucessful, I'll post a link to my xslt and how I did it. I personally prefer it to all the looping & parsing of the xml; in this case your samples have most of the code to do so, but that's not always the case with some implementations.


Developer Portal

View API documentation, code samples, get your API key.

Visit Page