I successfully replicated this problem using the API tester:
I use the "Retrieve a contact with a specified Contact ID" endpoint:
https://api.constantcontact.com/v2/contacts/xxxxx?api_key=yyyyyy
In most cases, I can copy the result body and paste it in (unmodified!) as the request body for the endpoint "Modify a contact with specific Contact ID"
https://api.constantcontact.com/v2/contacts/xxxxx?action_by=ACTION_BY_OWNER&api_key=yyyyyy
In about 90% of test cases, this works successfully. In the remaining 10%, I get:
Response StatusSelect content
409 Conflict
Response HeadersSelect content
Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, no-cache="Set-Cookie" Content-Type: application/json Date: Thu, 17 Mar 2016 01:09:53 GMT Pragma: no-cache Server: Apache Vary: Accept-Encoding,User-Agent X-Mashery-Responder: prod-j-worker-us-east-1e-114.mashery.com X-Powered-By: Content-Length: 130 Connection: keep-alive
Response BodySelect content
[{
"error_key": "http.status.conflict",
"error_message": "There was a conflict between the supplied data and the existing resource."
}]
Is there a reason why this would be? My actual use case is more complex, but I created this simple test case to eliminate any other variables.
Jon
Solved! Go to Solution.
Hello,
In the case of a conflict when sending unmodified data, the most likely cause is a contact in a Confirmed state. This is because the PUT action always updates a field, even if the input is the same as the previous value, and the email address of a Confirmed contact can only be changed with an action by that contact. If you're working on an implementation that handles groups of contacts, I would definitely advise making use of our bulk APIs, as they do not have this same limitation as a result of being unable to change email addresses.
You can find information about our bulk APIs here: https://v2.developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.ht...
Sincerely,
Hello,
In the case of a conflict when sending unmodified data, the most likely cause is a contact in a Confirmed state. This is because the PUT action always updates a field, even if the input is the same as the previous value, and the email address of a Confirmed contact can only be changed with an action by that contact. If you're working on an implementation that handles groups of contacts, I would definitely advise making use of our bulk APIs, as they do not have this same limitation as a result of being unable to change email addresses.
You can find information about our bulk APIs here: https://v2.developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.ht...
Sincerely,
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up