Hello,
I’m working on a Golang library and have hit a little bump.
Either I am doing something wrong – or there is a bug in v3 contact update (PUT, /api/3/contacts/id).
I have tried using different variations of the required JSON but all of my attempts have failed.
Strangely enough, if you send a PUT request to the POST endpoint (/api/3/contact/sync) it appears to work.
From what I can see, it seems like the PUT endpoint would allow you to change an email address since you are using the contact ID in the URL. I just tried sending a PUT->/api/3/contacts/id
with a different email address and the existing ID in both the URL and the JSON, and it just created a new user (this is definitely broken).
Not sure what other variants I can try at this point. Help? I am also willing to help.
Thanks.
</Henry>
Current User
"contact":{id: "35", "email":"test@user.com","firstName":"Test","lastName":"User","phone":"2125551212"}}
Update Variants
{"contact":{"email":"test@user.com","firstName":"Test","lastName":"Smith","phone":"7185551212"}} // Last and phone update, get email exists.
{"contact":{"email":"test@user.com","firstName":"Test","lastName":"User","phone":"2125551212","orgid":1}} // Add OrgID only, get email exists.
{"contact":{"id":35,"email":"test@user.com","firstName":"Test","lastName":"User","phone":"2125551212","orgid":1}} // Include ID, get email exists.
{"contact":{"firstName":"Test","lastName":"Smith","phone":"7185551212"}} // URL includes ID, get email required.
{"contact":{"id":35,"firstName":"Test","lastName":"Smith","phone":"7185551212","orgid":1}} // JSON also includes ID, get email required.