"Error 400: Invalid data: Unknown StateName value" With Text Input Values

axiomit
Participant

"Error 400: Invalid data: Unknown StateName value" With Text Input Values

Hello,


I'm developing an integration for a client using Constant Contact, and I believe I've nailed just about all of the intricacies of the REST API (including the combinations of StateName/StateCode and CountryName/CountryCode issues).  Now that the integration is live, they've found some of their customers aren't successfully signing up, and I've tracked it down to an issue with values entered for StateName.  The signup form uses Text inputs for State/Province, and the values that have been rejected thus far are "B.C." and "Yukon".  I can see how some might appreciate this data validation, but it's a hindrance in my case.  Is there any way to turn this validation off?  (I'm also going to need to turn this validation off for CountryName.)


If it can't be done, using custom fields will be fine.


Thanks for your time.

1 REPLY 1
DaveBerard
Moderator

The validation you're talking about is unable to be turned off.  This is part of our core validation and is universal to all people using the API.  A possible better solution is to instead offer a prepopulated drop down menu instead of text inputs.  This way you can control the values being sent and will not have any problems with incorrect or improperly formated entries.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page