Greetings. Two questions on use with the api. The first is dealing with the api and activityType of SV_ADD. It seems like this can be rather flaky when adding in multiple fields with multiple people. For example I have had to switch from using "Zip/Postal Code" to just "Postal Code" to get it to work for that element. I'm wondering if there are other changes I should make in regard to "US State/CA Provice", "Other State/Province" and Sub Zip/Postal Code" ? Along these same lines I'm wondering if there is ANY way to get more info than the dreaded "400 Bad Request". Information on WHY this is a bad request would be so helpful...
According to the docs below is the fieldnames you get with an export so importing will use the same:
FIRST NAME, MIDDLE NAME, LAST NAME, JOB TITLE, COMPANY NAME, WORK PHONE, HOME PHONE, ADDRESS LINE 1, ADDRESS LINE 2, ADDRESS LINE 3, CITY, STATE, STATE/PROVINCE (US/CANADA), COUNTRY, POSTAL CODE, SUB POSTAL CODE, CUSTOM FIELD 1, CUSTOM FIELD 2, CUSTOM FIELD 3, CUSTOM FIELD 4, CUSTOM FIELD 5, CUSTOM FIELD 6, CUSTOM FIELD 7, CUSTOM FIELD 8, CUSTOM FIELD 9, CUSTOM FIELD 10, CUSTOM FIELD 11, CUSTOM FIELD 12, CUSTOM FIELD 13, CUSTOM FIELD 14, CUSTOM FIELD 15
I think you may have copied the fieldname from the constantocntact.com website rather than the developer docs?
James Benson, PHP Developer.
Constant Contact Services: http://integrationservic.es/
I switched to using these fieldnames and things are working much, much better. Thanks for the info. Now if I could just get more info from a 400 I'd be in business!
I did some testing on my account and was able to retrieve error messages via the REST client we recommend. They provided me with details like the following:
Error 400: No activityType specified (I had a space before activityType so it messed up the encoded URI)
Error 400: Bad value(s) for parameter 'lists' found: http://api.constantcontact.com/ws/customers/joesflowers/lists/209 (I used a List ID that doesn't exist in my account)
Error 400: Bad upload data (I used an invalid field name of First+Last)