cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a blank and opted out contact.

Highlighted
Occasional Contributor

Updating a blank and opted out contact.

We have a test contact that has no data (name/address etc.) associated with it.  It is also in the opted out state.  I've been having a lot of problems updating this contact - even just retrieving the data and posting it back does not work.

 

I either get a bad request error or a "there was a conflict between the supplied data and the existing resource" error.  These responses are really unhelpful and make debugging hard work!

 

The simplest method of getting the contact and then posting it straight back has PUT JSON that looks like this:

 

{
    "addresses": [
        {
            "address_type": "PERSONAL",
            "city": "",
            "country_code": "",
            "id": "2",
            "line1": "",
            "line2": "",
            "line3": "",
            "postal_code": "",
            "state": "",
            "state_code": "",
            "sub_postal_code": ""
        },
        {
            "address_type": "BUSINESS",
            "city": "",
            "country_code": "",
            "id": "3",
            "line1": "",
            "line2": "",
            "line3": "",
            "postal_code": "",
            "state": "",
            "state_code": "",
            "sub_postal_code": ""
        }
    ],
    "cell_phone": "",
    "company_name": "",
    "created_date": "2014-03-12T09:46:55.934Z",
    "custom_fields": [],
    "email_addresses": [
        {
            "confirm_status": "NO_CONFIRMATION_REQUIRED",
            "email_address": "developer.logs+d@dd.com",
            "id": "1",
            "opt_in_date": "2014-03-17T17:26:31.474Z",
            "opt_in_source": "ACTION_BY_VISITOR",
            "opt_out_date": "2014-03-17T17:26:32.683Z",
            "status": "OPTOUT"
        }
    ],
    "fax": "",
    "first_name": "",
    "home_phone": "",
    "id": "22",
    "job_title": "",
    "last_name": "",
    "lists": [],
    "middle_name": "",
    "modified_date": "2014-03-17T17:26:32.000Z",
    "notes": [],
    "prefix_name": "",
    "source": "API",
    "source_details": "D D Tests",
    "status": "OPTOUT",
    "work_phone": ""
}

 

 

Do you have any idea why this is returning the "there was a conflict" error message?

 

My other PUT methods with fully opted in contacts that have complete data all work.

 

Thanks,

Will

1 REPLY 1
Moderator

Re: Updating a blank and opted out contact.

Hi Will,

 

I'm sorry that you are now experiencing this issue with the API. We are currently looking into the issue, trying to reproduce it on our end. We'll let you know how things are going, and definitely get back when figure out where the issue may be.

 

 

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com