Enter the Share Your Success Sweepstakes 2024 For the Chance to Win Great Prizes!

Bulk API issues when working with contacts

user2865428
Rookie
0 Votes

Good evening/day,

Since our application is facing request limit issues, we decided to switch to the bulk API. However, we have encountered several problems:

Post /activities/contact_exports

  1. File Size Limit: The file size limit for a GET request is 6 MB. This makes it impossible to retrieve more than 100,000 contacts. Can you consider adding pagination or chunking to split the resulting file into smaller parts? This would help with managing large numbers of contacts.

  2. Incomplete Fields: According to the documentation (https://developer.constantcontact.com/api_guide/export_contacts.html), not all fields can be retrieved. For example, fields like street_1, street_2, intl_state, website, social_profiles, etc., are missing.

  3. CSV Formatting Issues:

    • When retrieving fields like 'email_lists', 'notes', and 'tags' in a CSV file, the cell values are separated by commas or semicolons (in the case of 'notes'). For example, "tag1, tag2". However, tags or email lists can contain commas, making it difficult to distinguish between individual elements. For example, it could be one tag "tag1, tag2" or two tags "tag1" and "tag2". Is it possible to escape these special characters?
    • When reading the street field, the cell combines Address Line 1 and Address Line 2 into one value. For example, if Home Address Line 1 is "First address" and Home Address Line 2 is "Second address", the CSV field for Street Address Line 1 - Home shows "First addressSecond address". This seems incorrect.
  4. Filtering Limitations:

    • Currently, there are only four filters available: contact_ids, list_ids, segment_id, and status.
    • For list_ids: Can you add the ability to specify the list name in the filter instead of its ID or ensure that the IDs are sent in the GET request?
    • For segment_id: Can you add the segment_ids field to the schema so that these values can be retrieved in a GET request?

Post /activities/contacts_json_import

  1. Data Insertion Issues: When inserting fields like home_street, home_street2, work_street, work_street2, home_city, work_city, other_city, home_state, work_state, other_state, home_zip, work_zip, other_zip, home_country, work_country, and other_country, the data does not insert into the corresponding sections. Instead, new "Physical addresses" are created with individual values. For example, if I insert with the following body (https://imgur.com/7E970Mt), I get this result (https://imgur.com/Fu4sEhm). Can you review and improve the import job behavior?

  2. Response Issues: It is not possible to get a response after inserting or updating. The error message "The requested resource was not found".

1 REPLY 1
John__B
Employee
0 Votes

Hello user2865428,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Thanks so much for your feedback regarding the 6MB file size limit for contact exports. It has been submitted for review and consideration by our engineering team. Your feedback and experience with this request is essential to improving our product, so thank you for reaching out to us regarding this matter.

 

Regarding all fields not being exported when using the Export Contacts to a File request, every contact field, including custom fields should be exported by default. When using the “fields” array, only the specified fields are exported. If you have any examples of a field not being exported when not including the “fields” array, or when including that field in the array, we would be happy to investigate if you could send an email to webservices@constantcontact.com which specifies your API key, includes a full example request, including headers, an example response, and any timestamps you may have from previous requests where this behavior occurred.

 

For the CSV formatting concerns that you mentioned regarding commas, one method you could use to escape the field values, which may contain commas from the commas separating the field values, is to put the field values within quotation marks. 

 

I was able to confirm that address line 1 and address line 2 being combined in a single cell upon exporting contacts is functioning as designed, however, I would be happy to pass your feedback to the appropriate teams if you feel these fields should have their own cells.

 

Regarding the filtering options for the contact export request, if by GET request you’re referring to the GET Contacts Collection request, the list ID is returned in the response under the “list_memberships” property. Currently, only the list_id can be used to specify the contact list in the contact export request. I would be happy to pass your feedback regarding the ability to use the list name in place of the list_id to the appropriate team, though we can’t guarantee if or when this feature will be implemented.

 

GET Contacts Collection:

https://developer.constantcontact.com/api_reference/index.html#!/Contacts/getContacts

 

Regarding segment_id’s, you can obtain all of your account’s segment_id’s by utilizing the GET all Segments request.

 

GET all Segments:

https://developer.constantcontact.com/api_reference/index.html#!/Segments/getAccountSegments

 

Regarding the issue you encountered with physical address field values populating under random “Home”, “Work” and “Other” groupings in the website UI, we greatly appreciate you bringing this to our attention. I have documented this issue and passed it up to our engineering team to review for a resolution. For the meantime, the best method to ensure that these field values appear correctly under their corresponding physical address type is to group all “Home”, “Work” and “Other” address fields together in the request body as is shown in the Body sample of the JSON import request documentation I am linking below.

 

Import Contacts using a JSON Payload:

https://developer.constantcontact.com/api_reference/index.html#!/Bulk_Activities/bulkImportContactsJ...

 

When you receive an error response which states “The requested resource was not found”, this typically indicates that a list, contact or segment ID used in the request was not found on the account. We would be happy to investigate this further if you could send an email to webservices@constantcontact.com which specifies your API key, includes a full example request, including headers, an example response, and any timestamps you may have from previous requests where you received this error response.

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
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