Error while merging contacts


#1

I’m trying to use the merge contact API call. But when I use it I get a Ok response (200) but in the body I get the following error: “Invalid JSON string”

I’m calling the URL https://api.hubapi.com/contacts/v1/contact/merge-vids/6295/?hapikey=MYKEY with the following body:
{“vidToMerge”:12502}


#2

Hi @divad4686

The response body for a successful merge is going to be just the text SUCCESS, which may not be considered valid JSON depending on the parser you’re using.


#3

Yea it was that, my library doesn’t support single strings as valid Json.
More info on this if anyone is interested http://www.mattlunn.me.uk/blog/2014/01/what-is-the-minimum-valid-json/