HI,
My add_contact.php api from CC works fine except the state and country function
below is the error message;
Notice: Undefined index: state in C:\wamp\www\add_contact.php on line 251
Notice: Undefined index: country in C:\wamp\www\add_contact.php on line 294
Hi Ron,
Could you tell us what values you are trying to pass in for the state and country values? If you could copy and paste the XML you are trying to pass in below (redacting or removing your username/password information), that would be most helpful.
Thanks,
Shannon W.
Support Engineer, Constant Contact
Was there a solution to this? What are the correct field name to use?
Hi Oscar,
While we did not hear back from this specific person, there are no known problems with submitting this data. Here is an example of submitting address data with the correct fields.
"addresses": [ { "id":"1", "line1": "541 Brighton Ave.", "line2": "Unit 785", "line3": "", "city": "Cambridge", "address_type": "PERSONAL", "state":"Massachusetts", "state_code": "MA", "country_code": "us", "postal_code": "01555", "sub_postal_code": "" }]