Join our Ask A Trainer Sessions and Chat With our Experts!

API v.3 409 conflict on POST (create) a Contact; User doesn't appear to exist

InteractiveK
Rookie
0 Votes

We are using v.3 of the API and running into an issue with this use case for a custom sign up form:

 

First we check for existence of the contact via GET Contact Collection passing the email of the potential contact (example@example.com). We receive empty response for the "contacts" and "contacts_count" response body elements (see code and screenshot)

 

https://api.cc.email/v3/contacts?status=all&email=example%40example.com&include_count=true

Screen Shot 2019-02-26 at 4.29.13 PM.png

 

Since the previous call reports no contacts found (contact_count = 0), we assume the user doesn't exist and submit a POST Create Contact (with create_source, email_address and list_membership parameters.

 

{
"email_address":
{ 
  "address": "example@example.com", 
  "permission_to_send": "implicit" 
},
"create_source": "Account",
"list_memberships": [
  "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx"
  ]
}

We consistently get error response code 409, error_key = "contacts.api.conflict", error_message = "Validation failed: EmailAddress is not unique"

 

Screen Shot 2019-02-26 at 4.39.50 PM.png

 

The contact does not appear in a search in the admin Contacts GUI. Is there a way that a deleted contact can still cause a conflict? 

 

We have also tried POST Create Contact without the list_membership parameter, in case there was a bug with that.

 

We experience this problem in our codebase as well as in the API Reference testing tool as shown in the screenshots. Also, yes, we are OAuth'd into the desired account when using the API Reference testing tool. https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/createContact

 

 

 

8 REPLIES 8
Jimmy_D
Employee
0 Votes

Hi @InteractiveK,

 

Thank you for reaching out to Constant Contact's API Support.

 

We are currently researching this issue and working toward a solution. What is happening is what you alluded to; the email address is a deleted contact. You can do a GET on the status of DELETED and not the specific email address. This will return all deleted contacts and you should see the email address in question among those results.

 

That would be the work around I would recommend for now until we have a full resolution in place. If you would like to be notified of the resolution by email feel free to contact us at webservices@constantcontact.com to request this.


Regards,
Jimmy D.
Tier II API Support Engineer
Fetzer
Rookie
0 Votes

Thank you, Jimmy. This does help, even though with the workaround deleted users cannot be re-added, but that's OK for now.

Jimmy_D
Employee
0 Votes

@Fetzer,

 

You can do a PUT to update the deleted contact. You would just need to ensure you use the  "update_source": "Contact" to tell the system that the contact is taking the action.

 

The 409 conflict is technically describing a conflict between the status of express versus implied status on the contact. The action being used to change is being done by the account owner when the email address has express permission and only actions can be taken by the contact themselves.

 

This is generally done with sign-up forms when a contact has been unsubscribed in addition to being deleted.


Regards,
Jimmy D.
Tier II API Support Engineer
JohnD16884
Campaign Collaborator
0 Votes

I'd like to know when the fix for this issue is ready also. I have thousands of deleted contacts that still exist in the back end data store which are not accessible through the CC website search and yet have a status of DELETED and therefor a new contact cannot be created with the same email address.

 

It is not helpful to get a list of all contacts with status of DELETED when there are thousands of contacts in the result. 

 

p.s. I am using v3 of the api also. 

 

Thanks for any help.

David_B.
Employee
0 Votes

Hello,

 

I completely understand your concern and your reasoning. Please email us at webservices@constantcontact.com and we will be sure to get an email out to you when we have a resolution.

 

Regards,
David B.
Tier II API Support Engineer

JonA63399
Rookie
0 Votes

Hello,

 

I'd like to know if this issue has been resolved. I need to be able to create contacts with emails that had existed before but have been deleted.

 

Thank you!

Jimmy_D
Employee
0 Votes

Hi @JonA63399,

 

You can do a GET to see a deleted contact. You must include the email address and you must include a status of either all, or deleted. This will return a result of the contact that looks like this.

 

"contacts": [
    {
      "contact_id": "d4e514d4-9d0b-11e9-9bfe-d4ae528e486a",
      "email_address": {
        "address": "msm005@ucsd.edu",
        "permission_to_send": "implicit",
        "created_at": "2019-07-02T16:56:17-04:00",
        "updated_at": "2019-09-09T11:56:37-04:00",
        "opt_in_source": "Account",
        "opt_in_date": "2019-07-02T16:56:16-04:00",
        "confirm_status": "off"
      },
      "first_name": "Micaela",
      "last_name": "Martinez",
      "create_source": "Account",
      "created_at": "2019-07-02T16:56:17-04:00",
      "updated_at": "2019-09-09T11:56:37-04:00",
      "deleted_at": "2019-09-09"
    },

Regards,
Jimmy D.
Tier II API Support Engineer
TammyBren
Rookie
0 Votes

2023 and still no resolution to this issue.

Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up