Using the api/tester, the following POST request to edit a contact has the very strange behaviour of replacing the company name with the contact's first name.
{ "job_title":"", "prefix_name":"", "first_name":"FFFFFFFF", "middle_name":"", "last_name":"SSSSSSSS", "addresses":[], "work_phone":"", "cell_phone":"", "company_name":"AAAAAAAA", "home_phone":"", "email_addresses":[ {"status":"ACTIVE", "opt_in_source":"ACTION_BY_OWNER", "confirm_status":"NO_CONFIRMATION_REQUIRED", "email_address":"xxxxxx@yyyyy.com" }], "fax":"", "lists":[ {"id":"147"}, {"id":"151"}, {"id":"162"} ], "notes":[], "custom_fields":[] }
Status code=200 (fine) the headers look as follows:
Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, no-cache="Set-Cookie" Content-Type: application/json;charset=UTF-8 Date: Thu, 26 Feb 2015 11:59:42 GMT Pragma: no-cache Server: Apache Vary: Accept-Encoding,User-Agent X-Mashery-Responder: prod-j-worker-us-east-1b-77.mashery.com X-Powered-By: Content-Length: 960 Connection: keep-alive
However the returned data replaces the `company_name` with the contact's `first_name`
{
"id": "12128",
"status": "ACTIVE",
"fax": "",
"addresses": [],
"notes": [],
"confirmed": false,
"lists": [{
"id": "147",
"status": "ACTIVE"
}, {
"id": "151",
"status": "ACTIVE"
}, {
"id": "162",
"status": "ACTIVE"
}],
"source": "",
"email_addresses": [{
"id": "92570b70-533f-11e3-8227-d4ae529a8612",
"status": "ACTIVE",
"confirm_status": "NO_CONFIRMATION_REQUIRED",
"opt_in_source": "ACTION_BY_OWNER",
"opt_in_date": "2013-09-04T14:40:17.000Z",
"email_address": "xxxxxx@yyyyy.com"
}],
"prefix_name": "",
"first_name": "FFFFFFFF",
"middle_name": "",
"last_name": "SSSSSSSS",
"job_title": "",
"company_name": "FFFFFFF",
"home_phone": "",
"work_phone": "",
"cell_phone": "",
"custom_fields": [],
"created_date": "2013-09-04T14:40:17.000Z",
"modified_date": "2015-02-26T11:49:06.000Z",
"source_details": ""
}
Could someone please explain what might be going wrong here.
Many thanks
Hi Gabrielle,
I tried the same call on my personal account, adding the contact to a single list,payload here:
{
"job_title":"",
"prefix_name":"",
"first_name":"FFFFFFFF",
"middle_name":"",
"last_name":"SSSSSSSS",
"addresses":[],
"work_phone":"",
"cell_phone":"",
"company_name":"AAAAAAAA",
"home_phone":"",
"email_addresses":[
{"status":"ACTIVE",
"opt_in_source":"ACTION_BY_OWNER",
"confirm_status":"NO_CONFIRMATION_REQUIRED",
"email_address":"xxxxxx@yyyyy.com"
}],
"fax":"",
"lists":[
{"id":"1719198141"}
],
"notes":[],
"custom_fields":[]
}
and I got the expected results, shown here:
201 Created
Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, no-cache="Set-Cookie" Content-Type: application/json;charset=UTF-8 Date: Wed, 04 Mar 2015 21:39:22 GMT Location: https://api.constantcontact.com/v2/contacts/1657281845 Pragma: no-cache Server: Apache Vary: Accept-Encoding,User-Agent X-Mashery-Responder: prod-j-worker-us-east-1e-75.mashery.com X-Powered-By: Transfer-Encoding: chunked Connection: keep-alive
{
"id": "1657281845",
"status": "ACTIVE",
"fax": "",
"addresses": [],
"notes": [],
"confirmed": false,
"lists": [{
"id": "1719198141",
"status": "ACTIVE"
}],
"source": "API",
"email_addresses": [{
"id": "ec6a66b0-c2b6-11e4-8a71-d4ae529a848a",
"status": "ACTIVE",
"confirm_status": "NO_CONFIRMATION_REQUIRED",
"opt_in_source": "ACTION_BY_OWNER",
"opt_in_date": "2015-03-04T21:39:23.000Z",
"email_address": "xxxxxx@yyyyy.com"
}],
"prefix_name": "",
"first_name": "FFFFFFFF",
"middle_name": "",
"last_name": "SSSSSSSS",
"job_title": "",
"company_name": "AAAAAAAA",
"home_phone": "",
"work_phone": "",
"cell_phone": "",
"custom_fields": [],
"created_date": "2015-03-04T21:39:23.000Z",
"modified_date": "2015-03-04T21:39:23.000Z",
"source_details": "myapplication name"
}
Let me know if you need additional assistance in making your call work. If you are still seeing this situation, please PM me the credentials for the account this is occuring in, Username/password, access_token as well.
Hello,
Based on what you've described, it sounds like the most likely scenario is that your trouble may be related to updating specific contacts or contacts that have duplicates in your account. Is it possible to recreate any of this behavior if you create a new contact and then try to update it?
If the behavior is not happening with new contacts, then it's likely that we need to look more closely at the specific contacts that you've been working on. I that is the case, then it would be best to collect up some information (such as the email addresses and contact IDs that are having issues) and email that to us at webservices@constantcontact.com.
Please let me know if you have any questions!
Sincerely,