Summer is coming! Participate in the Community’s Get Advice: Wave Hello to Summer Sweepstakes and be entered to win a $100 credit on your Constant Contact account! *No Purchase Necessary. For Official Rules, visit the official thread. Get Advice: Spring Cleaning Sweepstakes ends on June 8, 2021 at 11:59 PM EST.

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

MikeR461
Participant

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

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

 

state

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?

 

1 REPLY 1
DaveBerard
Moderator

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.

Visit Page