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.

Reading contacts. Information retrieval is not comprehensive

RomainG95
Participant

Reading contacts. Information retrieval is not comprehensive

Hello,

 

I came accross a blocking problem for me lately with the REST API.

 

I created a new contact in the default, here is his description:

 

Capture d'écran de 2015-09-30 10-19-43.png

 

Then I called the endpoint to retrieve contact from a specific list. Here is the json I get:

 

{
    "meta": {
        "pagination": {}
    },
    "results": [{
        "id": "1561892610",
        "status": "ACTIVE",
        "fax": "",
        "addresses": [],
        "notes": [],
        "confirmed": false,
        "lists": [{
            "id": "2074952893",
            "status": "ACTIVE"
        }],
        "source": "Site Owner",
        "email_addresses": [{
            "id": "92094440-65f2-11e5-960a-d4ae5292c40b",
            "status": "ACTIVE",
            "confirm_status": "NO_CONFIRMATION_REQUIRED",
            "opt_in_source": "ACTION_BY_OWNER",
            "opt_in_date": "2015-09-28T15:07:01.000Z",
            "email_address": "romain@podbox.com"
        }],
        "prefix_name": "",
        "first_name": "Romain",
        "middle_name": "",
        "last_name": "Gautier",
        "job_title": "",
        "company_name": "",
        "home_phone": "",
        "work_phone": "",
        "cell_phone": "",
        "custom_fields": [],
        "created_date": "2015-09-28T15:07:01.000Z",
        "modified_date": "2015-09-28T15:07:01.000Z",
        "source_details": ""
    }, {
        "id": "1710468771",
        "status": "ACTIVE",
        "fax": "",
        "addresses": [],
        "notes": [{
            "id": "dac8d650-66bf-11e5-868a-d4ae5292c36f",
            "note": "And he bites hard.",
            "created_date": "2015-09-29T15:36:30.000Z",
            "modified_date": "2015-09-29T15:36:30.000Z"
        }],
        "confirmed": false,
        "lists": [{
            "id": "2074952893",
            "status": "ACTIVE"
        }],
        "source": "Site Owner",
        "email_addresses": [{
            "id": "22f00490-66bf-11e5-8661-d4ae5292c36f",
            "status": "ACTIVE",
            "confirm_status": "NO_CONFIRMATION_REQUIRED",
            "opt_in_source": "ACTION_BY_OWNER",
            "opt_in_date": "2015-09-29T15:31:21.000Z",
            "email_address": "john.doe@podbox.com"
        }],
        "prefix_name": "",
        "first_name": "John",
        "middle_name": "",
        "last_name": "Doe",
        "job_title": "R&D engineer",
        "company_name": "La yungle",
        "home_phone": "+33 22 68 45 95 65",
        "work_phone": "",
        "cell_phone": "",
        "custom_fields": [],
        "created_date": "2015-09-29T15:31:21.000Z",
        "modified_date": "2015-09-29T15:36:30.000Z",
        "source_details": ""
    }, {
        "id": "1710468771",
        "status": "ACTIVE",
        "fax": "",
        "addresses": [],
        "notes": [{
            "id": "dac8d650-66bf-11e5-868a-d4ae5292c36f",
            "note": "And he bites hard.",
            "created_date": "2015-09-29T15:36:30.000Z",
            "modified_date": "2015-09-29T15:36:30.000Z"
        }],
        "confirmed": false,
        "lists": [{
            "id": "2074952893",
            "status": "ACTIVE"
        }],
        "source": "Site Owner",
        "email_addresses": [{
            "id": "22f73080-66bf-11e5-8661-d4ae5292c36f",
            "status": "ACTIVE",
            "confirm_status": "NO_CONFIRMATION_REQUIRED",
            "opt_in_source": "ACTION_BY_OWNER",
            "opt_in_date": "2015-09-29T15:31:21.000Z",
            "email_address": "john.doe@layungle.net"
        }],
        "prefix_name": "",
        "first_name": "John",
        "middle_name": "",
        "last_name": "Doe",
        "job_title": "R&D engineer",
        "company_name": "La yungle",
        "home_phone": "+33 22 68 45 95 65",
        "work_phone": "",
        "cell_phone": "",
        "custom_fields": [],
        "created_date": "2015-09-29T15:31:21.000Z",
        "modified_date": "2015-09-29T15:36:30.000Z",
        "source_details": ""
    }]
}

Surprisingly, the new contact is duplicated in the API response, but let's say we merge the two John Doe entries. Still, the there is blocking problems for me are:

 

  • We cannot distinct the two email addresses associated with John Doe (which is the work email, which is the home email).
  • We only have the last note associated to the contact. We don't have the comprehensive set of notes.
  • No custom fields appears in the API response. It lacks informations.

 

Thanks in advance for helping.

1 REPLY 1
Elijah_G
Member

Hello,

 

Thank you for reaching out to us about this! What you've described here is almost the entire set of functions that are currently available in the UI, but limited or unavailable in the API. The first thing that I would suggest is to look over the article we have specifically discussing some of the current discrepancies between the API and the UI here:

http://developer.constantcontact.com/docs/contacts-api/api-gui-func.html

 

As one specific side-note, because of the limitations inthe API regarding multiple email addresses on a single contact (which are discussed in the article above), it is not possible to determing the type of email address.

 

If there is anything that you've mentioned that isn't clarified fully in that document, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page