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
countryCodeaccepts a three-digit numeric ISO 3166-1 code (for example840for the United States). It defaults to840when omitted.stateaccepts a short subdivision code, not the full name. SendNY, notNew York;AGU, notAguascalientes.- For the United States, Canada, and Mexico,
statemust be one of the codes listed below. Any other value is rejected withInvalid state '<value>' for country code <XX>. - For all other supported countries,
stateis not validated against a list; any string within the general field constraints is accepted. postalCodeis 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.
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.
state | Name |
|---|---|
AL | Alabama |
AK | Alaska |
AZ | Arizona |
AR | Arkansas |
CA | California |
CO | Colorado |
CT | Connecticut |
DE | Delaware |
FL | Florida |
GA | Georgia |
HI | Hawaii |
ID | Idaho |
IL | Illinois |
IN | Indiana |
IA | Iowa |
KS | Kansas |
KY | Kentucky |
LA | Louisiana |
ME | Maine |
MD | Maryland |
MA | Massachusetts |
MI | Michigan |
MN | Minnesota |
MS | Mississippi |
MO | Missouri |
MT | Montana |
NE | Nebraska |
NV | Nevada |
NH | New Hampshire |
NJ | New Jersey |
NM | New Mexico |
NY | New York |
NC | North Carolina |
ND | North Dakota |
OH | Ohio |
OK | Oklahoma |
OR | Oregon |
PA | Pennsylvania |
RI | Rhode Island |
SC | South Carolina |
SD | South Dakota |
TN | Tennessee |
TX | Texas |
UT | Utah |
VT | Vermont |
VA | Virginia |
WA | Washington |
WV | West Virginia |
WI | Wisconsin |
WY | Wyoming |
DC | District of Columbia |
AS | American Samoa |
GU | Guam |
MP | Northern Mariana Islands |
PR | Puerto Rico |
VI | U.S. Virgin Islands |
Canada
countryCode: 124. Provinces and territories.
state | Name |
|---|---|
AB | Alberta |
BC | British Columbia |
MB | Manitoba |
NB | New Brunswick |
NL | Newfoundland and Labrador |
NT | Northwest Territories |
NS | Nova Scotia |
NU | Nunavut |
ON | Ontario |
PE | Prince Edward Island |
QC | Quebec |
SK | Saskatchewan |
YT | Yukon |
Mexico
countryCode: 484. States and Ciudad de México.
state | Name |
|---|---|
AGU | Aguascalientes |
BCN | Baja California |
BCS | Baja California Sur |
CAM | Campeche |
CHP | Chiapas |
CHH | Chihuahua |
COA | Coahuila |
COL | Colima |
DUR | Durango |
GUA | Guanajuato |
GRO | Guerrero |
HID | Hidalgo |
JAL | Jalisco |
MEX | México |
MIC | Michoacán |
MOR | Morelos |
NAY | Nayarit |
NLE | Nuevo León |
OAX | Oaxaca |
PUE | Puebla |
QUE | Querétaro |
ROO | Quintana Roo |
SLP | San Luis Potosí |
SIN | Sinaloa |
SON | Sonora |
TAB | Tabasco |
TAM | Tamaulipas |
TLA | Tlaxcala |
VER | Veracruz |
YUC | Yucatán |
ZAC | Zacatecas |
CMX | Ciudad de México |
Updated 20 minutes ago