State and Country Code Reference

Spidr validates the state field in address payloads against a country-specific list of subdivision codes. This page lists every valid state value for each country that has validation, so you can look up the exact code to send instead of guessing.

Address payloads appear on Create User, Edit User, Create Entity, and Edit Entity.


How address validation works

  • countryCode accepts a three-digit numeric ISO 3166-1 code (for example 840 for the United States). It defaults to 840 when omitted.
  • state accepts a short subdivision code, not the full name. Send NY, not New York; AGU, not Aguascalientes.
  • For the United States, Canada, and Mexico, state must be one of the codes listed below. Any other value is rejected with Invalid state '<value>' for country code <XX>.
  • For all other supported countries, state is not validated against a list; any string within the general field constraints is accepted.
  • postalCode is format-checked for the US, Canada, and Mexico (formats noted below).

Countries with state validation

Send the numeric value as countryCode. For these countries, state must be one of the codes listed on this page.

CountrycountryCodeAlpha-2State codesPostal code format
Canada124CAcodesA1A 1A1 (space optional)
Mexico484MXcodes12345 (5 digits)
United States of America840UScodes12345 or 12345-6789

Other supported country codes, with no state or postal code validation: Argentina (032), Bolivia (068), Colombia (170), Costa Rica (188), Dominican Republic (214), Ecuador (218), El Salvador (222), Guatemala (320), Honduras (340), Panama (591), Paraguay (600), Peru (604), Uruguay (858).

📘

The country codes your product accepts are contingent on your product configuration. If a country listed here is rejected for your product, contact Spidr to review your product's allowed countries.


United States

countryCode: 840. Includes the 50 states plus the District of Columbia and US territories.

stateName
ALAlabama
AKAlaska
AZArizona
ARArkansas
CACalifornia
COColorado
CTConnecticut
DEDelaware
FLFlorida
GAGeorgia
HIHawaii
IDIdaho
ILIllinois
INIndiana
IAIowa
KSKansas
KYKentucky
LALouisiana
MEMaine
MDMaryland
MAMassachusetts
MIMichigan
MNMinnesota
MSMississippi
MOMissouri
MTMontana
NENebraska
NVNevada
NHNew Hampshire
NJNew Jersey
NMNew Mexico
NYNew York
NCNorth Carolina
NDNorth Dakota
OHOhio
OKOklahoma
OROregon
PAPennsylvania
RIRhode Island
SCSouth Carolina
SDSouth Dakota
TNTennessee
TXTexas
UTUtah
VTVermont
VAVirginia
WAWashington
WVWest Virginia
WIWisconsin
WYWyoming
DCDistrict of Columbia
ASAmerican Samoa
GUGuam
MPNorthern Mariana Islands
PRPuerto Rico
VIU.S. Virgin Islands

Canada

countryCode: 124. Provinces and territories.

stateName
ABAlberta
BCBritish Columbia
MBManitoba
NBNew Brunswick
NLNewfoundland and Labrador
NTNorthwest Territories
NSNova Scotia
NUNunavut
ONOntario
PEPrince Edward Island
QCQuebec
SKSaskatchewan
YTYukon

Mexico

countryCode: 484. States and Ciudad de México.

stateName
AGUAguascalientes
BCNBaja California
BCSBaja California Sur
CAMCampeche
CHPChiapas
CHHChihuahua
COACoahuila
COLColima
DURDurango
GUAGuanajuato
GROGuerrero
HIDHidalgo
JALJalisco
MEXMéxico
MICMichoacán
MORMorelos
NAYNayarit
NLENuevo León
OAXOaxaca
PUEPuebla
QUEQuerétaro
ROOQuintana Roo
SLPSan Luis Potosí
SINSinaloa
SONSonora
TABTabasco
TAMTamaulipas
TLATlaxcala
VERVeracruz
YUCYucatán
ZACZacatecas
CMXCiudad de México

Did this page help you?