We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

409 conflict error even when passing in unmodified data

SOLVED
Go to solution
WalterB41
Occasional Participant

409 conflict error even when passing in unmodified data

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

1 ACCEPTED SOLUTION
Elijah_G
Member

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: http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.html

 

Sincerely,

Elijah G.
API Support Engineer

View solution in original post

1 REPLY 1
Elijah_G
Member

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: http://developer.constantcontact.com/docs/bulk_activities_api/bulk-activities-import-contacts.html

 

Sincerely,

Elijah G.
API Support Engineer

View solution in original post

Developer Portal

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

Visit Page