PHP API and free-form "state" in addresses?

Occasional Contributor

PHP API and free-form "state" in addresses?

The REST API appears to support a "state" property on Address types:



string (50)

This field accepts any state or province name. However, if a valid 2 letter US state or Canadian province is entered in the state_code field, the system resolves the code to a state or province and overwrites any name manually entered in this field.


Presumably this would allow us to capture non-US addresses. However, it looks like this field has been left out of the PHP API. Is that my imagination?

Or is there some other way to get it in there that I'm missing?



Re: PHP API and free-form "state" in addresses?

Wanted to this thread, though it's an older one.  Thanks for the pull request to add that field into the PHP SDK, this was a miss on our part.  We merged the request in July but noticed that we never updated the forum post about this.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Constant Contact would like to hear from you

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More