I can’t seem to get rid of this message when trying to add a new contact:
{“message”:“BILLING Country Code is invalid, BILLING Region is invalid”}
Here is the data I’m trying to send:
[field] => BILLING
[line1] => 123 Road St.
[line2] =>
[locality] => Austin
[postal_code] => 78701
[region] => Texas
[country_code] => US
I have tried both “Texas” and “TX” for region, and it still returns the error. And I’ve tried “US” and “United States” for country_code, and it also still returns the error. I’ve tried all 4 combinations, and I get the error every time.
If I take out the locality, region, and country_code, then it works fine… So, it doesn’t seem like it’s a problem with the other data in the API call.
Hoping someone can point me in the right direction. The API documentation is zero help at all on this…
Hi @Jer_Fortenberry I have successfully added a contact using the above example with a country_code of “USA” instead of “US”. I think that is what may have been causing the issues. Here is the JSON that I used:
{
“addresses”: [
{
“country_code”: “USA”,
“field”: “BILLING”,
“line1”: “123 Road St.”,
“line2”: “”,
“locality”: “Austin”,
“postal_code”: “78701”,
“region”: “Texas”
}
],
“given_name”: “REST API TEST”,
“email_addresses”: [
{
“email”: “test@example.com ”,
“field”: “EMAIL1”
}
]
}
Please let us know if you have any further issues with the country_code.
@Carlos_Ochoa - Seems odd to use “USA” as a country code. In every other context I’ve ever needed to use a “country code”, it’s been a 2 character code, like “US”.
And what about the region? I think I’ve got it working now, having seen something in a different post, that it should be in the format of “US-TX” (which seems odd - you’d think at least for consistency it would be “USA-TX”… It would just be great for some solid rationale or documentation into what the API is really expecting for these fields. Something certainly better than “string” as it is now in the API documentation…
Hey @Jer_Fortenberry Some api’s use the “Alpha-2”, a 2 digit code and some use the “Alpha-3”, a 3 digit code. In our specific implementation we chose 3. As far as region, I believe we tried to leave it as flexible as possible while still returning the “de-facto” or “nicer” iso code. In this case it causes the “Alpha-2” code to come back. I have created a ticket to look into this. As far as the documentation goes, it looks like these field values are not examples but the data type being the field. I have also put a ticket in to extend the documentation for these fields.
Ming_Zhang
(Ming Zhang)
September 13, 2017, 1:01am
5
Got the same problem here in Australia.
Region is only accepting full name of the state.
For example I have to use “Victoria” instead of “VIC”.
When I’m operating on InfusionSoft web console and putting in a new contact, “VIC” is allowed to be saved in region field. But why API can’t do it ?
Secondly, when I got “Victoria” saved on new contact, InfusionSoft web console shows “AU-VIC” in the field. Why that value has been saved differently.
Found the answers from here:
https://integration.keap.com/t/billing-and-shipping-region-invalid-when-updating-contact/557
bradb
(Bradley Booth)
September 13, 2017, 5:51pm
6
We are working on getting this standardized throughout the entire REST API now. We will provide an update soon.
1 Like
@bradb
Any update on a full list valid states for USA? I don’t want to have to test each one.
Regards,
Gavin
Any update on a full list valid states for USA?
I second this request and would also add that we need a valid list of country codes, too. Right now my db has 239 countries in it, with 2-letter abbreviations for each, and I cannot use any of them.
I work for Help Scout and we’re updating our integration with Infusionsoft. We’re running into this same error when creating a Contact. “US” apparently should be “USA”, yet I couldn’t find mention of this in the API docs. Can we get a list of state and country codes as suggested above? I don’t want to assume other country codes based on US → USA.
TomScott
(Tom Scott)
October 17, 2017, 8:18pm
10
A way to pull these lists programmatically is on our backlog, but here is an export of our current allowed values:
States
Alabama US-AL
Alaska US-AK
American Samoa US-AS
Arizona US-AZ
Arkansas US-AR
California US-CA
Colorado US-CO
Connecticut US-CT
Delaware US-DE
District of Columbia US-DC
Florida US-FL
Georgia US-GA
Guam US-GU
Hawaii US-HI
Idaho US-ID
Illinois US-IL
Indiana US-IN
Iowa US-IA
Kansas US-KS
Kentucky US-KY
Louisiana US-LA
Maine US-ME
Maryland US-MD
Massachusetts US-MA
Michigan US-MI
Minnesota US-MN
Mississippi US-MS
Missouri US-MO
Montana US-MT
Nebraska US-NE
Nevada US-NV
New Hampshire US-NH
New Jersey US-NJ
New Mexico US-NM
New York US-NY
North Carolina US-NC
North Dakota US-ND
Northern Mariana Islands US-MP
Ohio US-OH
Oklahoma US-OK
Oregon US-OR
Pennsylvania US-PA
Puerto Rico US-PR
Rhode Island US-RI
South Carolina US-SC
South Dakota US-SD
Tennessee US-TN
Texas US-TX
US Minor Outlying Islands US-UM
Utah US-UT
Vermont US-VT
Virgin Islands, U.S. US-VI
Virginia US-VA
Washington US-WA
West Virginia US-WV
Wisconsin US-WI
Wyoming US-WY
Provinces
1 Badakhshan AF-BDS
1 Badghis AF-BDG
1 Baghlan AF-BGL
1 Balkh AF-BAL
1 Bamian AF-BAM
1 Daykondi AF-DAY
1 Farah AF-FRA
1 Faryab AF-FYB
1 Ghazni AF-GHA
1 Ghowr AF-GHO
1 Helmand AF-HEL
1 Herat AF-HER
1 Jowzjan AF-JOW
1 Kabul AF-KAB
1 Kandahar AF-KAN
1 Kapisa AF-KAP
1 Khowst AF-KHO
1 Konar AF-KNR
1 Kondoz AF-KDZ
1 Laghman AF-LAG
1 Lowgar AF-LOW
1 Nangrahar AF-NAN
1 Nimruz AF-NIM
1 Nurestan AF-NUR
1 Oruzgan AF-ORU
1 Paktia AF-PIA
1 Paktika AF-PKA
1 Panjshir AF-PAN
1 Parwan AF-PAR
1 Samangan AF-SAM
1 Sar-e Pol AF-SAR
1 Takhar AF-TAK
1 Wardak AF-WAR
1 Zabol AF-ZAB
2 Berat AL-BR
2 Bulqizë AL-BU
2 Delvinë AL-DL
2 Devoll AL-DV
2 Dibër AL-DI
2 Durrës AL-DR
2 Elbasan AL-EL
2 Fier AL-FR
2 Gjirokastër AL-GJ
2 Gramsh AL-GR
2 Has AL-HA
2 Kavajë AL-KA
2 Kolonjë AL-ER
2 Korçë AL-KO
2 Krujë AL-KR
2 Kukës AL-KU
2 Kurbin AL-KB
2 Kuçovë AL-KC
2 Lezhë AL-LE
2 Librazhd AL-LB
2 Lushnjë AL-LU
2 Mallakastër AL-MK
2 Malësi e Madhe AL-MM
2 Mat AL-MT
2 Mirditë AL-MR
2 Peqin AL-PQ
2 Pogradec AL-PG
2 Pukë AL-PU
2 Përmet AL-PR
2 Sarandë AL-SR
2 Shkodër AL-SH
2 Skrapar AL-SK
2 Tepelenë AL-TE
2 Tiranë AL-TR
2 Tropojë AL-TP
2 Vlorë AL-VL
3 Adrar DZ-01
3 Alger DZ-16
3 Annaba DZ-23
3 Aïn Defla DZ-44
3 Aïn Témouchent DZ-46
3 Batna DZ-05
3 Biskra DZ-07
3 Blida DZ-09
3 Bordj Bou Arréridj DZ-34
3 Bouira DZ-10
3 Boumerdès DZ-35
3 Béchar DZ-08
3 Béjaïa DZ-06
3 Chlef DZ-02
3 Constantine DZ-25
3 Djelfa DZ-17
3 El Bayadh DZ-32
3 El Oued DZ-39
3 El Tarf DZ-36
3 Ghardaïa DZ-47
3 Guelma DZ-24
3 Illizi DZ-33
3 Jijel DZ-18
3 Khenchela DZ-40
3 Laghouat DZ-03
3 Mascara DZ-29
3 Mila DZ-43
3 Mostaganem DZ-27
3 Msila DZ-28
3 Médéa DZ-26
3 Naama DZ-45
3 Oran DZ-31
3 Ouargla DZ-30
3 Oum el Bouaghi DZ-04
3 Relizane DZ-48
3 Saïda DZ-20
3 Sidi Bel Abbès DZ-22
3 Skikda DZ-21
3 Souk Ahras DZ-41
3 Sétif DZ-19
3 Tamanghasset DZ-11
3 Tiaret DZ-14
3 Tindouf DZ-37
3 Tipaza DZ-42
3 Tissemsilt DZ-38
3 Tizi Ouzou DZ-15
3 Tlemcen DZ-13
3 Tébessa DZ-12
5 Andorra la Vella AD-07
5 Canillo AD-02
5 Encamp AD-03
5 Escaldes-Engordany AD-08
5 La Massana AD-04
5 Ordino AD-05
5 Sant Julià de Lòria AD-06
6 Bengo AO-BGO
6 Benguela AO-BGU
6 Bié AO-BIE
6 Cabinda AO-CAB
6 Cuando-Cubango AO-CCU
6 Cuanza Norte AO-CNO
6 Cuanza Sul AO-CUS
6 Cunene AO-CNN
6 Huambo AO-HUA
6 Huíla AO-HUI
6 Luanda AO-LUA
6 Lunda Norte AO-LNO
6 Lunda Sul AO-LSU
6 Malange AO-MAL
6 Moxico AO-MOX
6 Namibe AO-NAM
6 Uíge AO-UIG
6 Zaire AO-ZAI
9 Barbuda AG-10
9 Redonda AG-11
9 St. George AG-03
9 St. John's AG-04
9 St. Mary AG-05
9 St. Paul AG-06
9 St. Peter AG-07
9 St. Philip AG-08
10 Buenos Aires AR-B
10 Catamarca AR-K
10 Chaco AR-H
10 Chubut AR-U
10 Ciudad Autónoma de Buenos Aires AR-C
10 Corrientes AR-W
10 Córdoba AR-X
10 Entre Ríos AR-E
10 Formosa AR-P
10 Jujuy AR-Y
10 La Pampa AR-L
10 La Rioja AR-F
10 Mendoza AR-M
10 Misiones AR-N
10 Neuquén AR-Q
10 Río Negro AR-R
10 Salta AR-A
10 San Juan AR-J
10 San Luis AR-D
10 Santa Cruz AR-Z
10 Santa Fe AR-S
10 Santiago del Estero AR-G
10 Tierra del Fuego AR-V
10 Tucumán AR-T
11 Aragacotn AM-AG
11 Ararat AM-AR
11 Armavir AM-AV
11 Erevan AM-ER
11 Gegark'unik' AM-GR
11 Kotayk' AM-KT
11 Lory AM-LO
11 Syunik' AM-SU
11 Tavush AM-TV
11 Vayoc Jor AM-VD
11 Shirak AM-SH
13 Australian Capital Territory AU-ACT
13 New South Wales AU-NSW
13 Northern Territory AU-NT
13 Queensland AU-QLD
13 South Australia AU-SA
13 Tasmania AU-TAS
13 Victoria AU-VIC
13 Western Australia AU-WA
14 Burgenland AT-1
14 Kärnten AT-2
14 Niederösterreich AT-3
14 Oberösterreich AT-4
14 Salzburg AT-5
14 Steiermark AT-6
14 Tirol AT-7
14 Vorarlberg AT-8
14 Wien AT-9
16 Abseron AZ-ABS
16 Agcabädi AZ-AGC
16 Agdam AZ-AGM
16 Agdas AZ-AGS
16 Agstafa AZ-AGA
16 Agsu AZ-AGU
16 Astara AZ-AST
16 Babäk AZ-BAB
16 Baki AZ-BA
16 Balakän AZ-BAL
16 Beyläqan AZ-BEY
16 Biläsuvar AZ-BIL
16 Bärdä AZ-BAR
16 Culfa AZ-CUL
16 Cäbrayil AZ-CAB
16 Cälilabab AZ-CAL
16 Daskäsän AZ-DAS
16 Däväçi AZ-DAV
16 Füzuli AZ-FUZ
16 Goranboy AZ-GOR
16 Gädäbäy AZ-GAD
16 Gäncä AZ-GA
16 Göyçay AZ-GOY
16 Haciqabul AZ-HAC
16 Imisli AZ-IMI
16 Ismayilli AZ-ISM
16 Kälbäcär AZ-KAL
16 Kürdämir AZ-KUR
16 Laçin AZ-LAC
16 Lerik AZ-LER
16 Länkäran AZ-LAN
16 Länkäran City AZ-LA
16 Masalli AZ-MAS
16 Mingäçevir AZ-MI
16 Naftalan AZ-NA
16 Naxçivan AZ-NX
16 Neftçala AZ-NEF
16 Oguz AZ-OGU
16 Ordubad AZ-ORD
16 Qax AZ-QAX
16 Qazax AZ-QAZ
16 Qobustan AZ-QOB
16 Quba AZ-QBA
16 Qubadli AZ-QBI
16 Qusar AZ-QUS
16 Qäbälä AZ-QAB
16 Saatli AZ-SAT
16 Sabirabad AZ-SAB
16 Sahbuz AZ-SAH
16 Salyan AZ-SAL
16 Samaxi AZ-SMI
16 Samux AZ-SMX
16 Siyäzän AZ-SIY
16 Sumqayit AZ-SM
16 Susa AZ-SUS
16 Susa City AZ-SS
16 Sädäräk AZ-SAD
16 Säki AZ-SAK
16 Säki City AZ-SA
16 Sämkir AZ-SKR
16 Särur AZ-SAR
16 Tovuz AZ-TOV
16 Tärtär AZ-TAR
16 Ucar AZ-UCA
16 Xankändi AZ-XA
16 Xanlar AZ-XAN
16 Xaçmaz AZ-XAC
16 Xizi AZ-XIZ
16 Xocali AZ-XCI
16 Xocavänd AZ-XVD
16 Yardimli AZ-YAR
16 Yevlax AZ-YEV
16 Yevlax City AZ-YE
16 Zaqatala AZ-ZAQ
16 Zängilan AZ-ZAN
16 Zärdab AZ-ZAR
16 Äli Bayramli AZ-AB
17 Acklins Islands BS-AK
17 Berry Islands BS-BY
17 Bimini and Cat Cay BS-BI
17 Black Point BS-BP
17 Cat Island BS-CI
17 Central Abaco BS-CO
17 Central Andros BS-CS
17 Central Eleuthera BS-CE
17 City of Freeport BS-FP
17 Crooked Island and Long Cay BS-CK
17 East Grand Bahama BS-EG
17 Exuma BS-EX
17 Grand Cay BS-GC
17 Green Turtle Cay BS-GT
17 Harbour Island BS-HI
17 Hope Town BS-HT
17 Inagua BS-IN
17 Long Island BS-LI
17 Mangrove Cay BS-MC
17 Mayaguana BS-MG
17 Moore's Island BS-MI
17 North Abaco BS-NO
17 North Andros BS-NS
17 North Eleuthera BS-NE
17 Ragged Island BS-RI
17 Rum Cay BS-RC
17 San Salvador BS-SS
17 South Abaco BS-SO
17 South Andros BS-SA
17 South Eleuthera BS-SE
17 Spanish Wells BS-SW
17 West Grand Bahama BS-WG
18 Al Janubiyah BH-14
18 Al Manamah (Al 'Asimah) BH-13
18 Al Muharraq BH-15
18 Al Wustá BH-16
18 Ash Shamaliyah BH-17
19 Bagerhat zila BD-05
19 Bandarban zila BD-01
19 Barguna zila BD-02
19 Barisal zila BD-06
19 Bhola zila BD-07
19 Bogra zila BD-03
19 Brahmanbaria zila BD-04
19 Chandpur zila BD-09
19 Chittagong zila BD-10
19 Chuadanga zila BD-12
19 Comilla zila BD-08
19 Cox's Bazar zila BD-11
19 Dhaka zila BD-13
19 Dinajpur zila BD-14
19 Faridpur zila BD-15
19 Feni zila BD-16
19 Gaibandha zila BD-19
19 Gazipur zila BD-18
19 Gopalganj zila BD-17
19 Habiganj zila BD-20
19 Jaipurhat zila BD-24
19 Jamalpur zila BD-21
19 Jessore zila BD-22
19 Jhalakati zila BD-25
19 Jhenaidah zila BD-23
19 Khagrachari zila BD-29
19 Khulna zila BD-27
19 Kishoreganj zila BD-26
19 Kurigram zila BD-28
19 Kushtia zila BD-30
19 Lakshmipur zila BD-31
19 Lalmonirhat zila BD-32
19 Madaripur zila BD-36
19 Magura zila BD-37
19 Manikganj zila BD-33
19 Meherpur zila BD-39
19 Moulvibazar zila BD-38
19 Munshiganj zila BD-35
19 Mymensingh zila BD-34
19 Naogaon zila BD-48
19 Narail zila BD-43
19 Narayanganj zila BD-40
19 Narsingdi zila BD-42
19 Natore zila BD-44
19 Nawabganj zila BD-45
19 Netrakona zila BD-41
19 Nilphamari zila BD-46
19 Noakhali zila BD-47
19 Pabna zila BD-49
19 Panchagarh zila BD-52
19 Patuakhali zila BD-51
19 Pirojpur zila BD-50
19 Rajbari zila BD-53
19 Rajshahi zila BD-54
19 Rangamati zila BD-56
19 Rangpur zila BD-55
19 Satkhira zila BD-58
19 Shariatpur zila BD-62
19 Sherpur zila BD-57
19 Sirajganj zila BD-59
19 Sunamganj zila BD-61
19 Sylhet zila BD-60
19 Tangail zila BD-63
19 Thakurgaon zila BD-64
20 Christ Church BB-01
20 St. Andrew BB-02
20 St. George BB-03
20 St. James BB-04
20 St. John BB-05
20 St. Joseph BB-06
20 St. Lucy BB-07
20 St. Michael BB-08
20 St. Peter BB-09
20 St. Philip BB-10
20 St. Thomas BB-11
21 Brestskaya voblasts BY-BR
21 Homyel'skaya voblasts BY-HO
21 Horad Minsk BY-HM
21 Hrodzenskaya voblasts BY-HR
21 Mahilyowskaya voblasts BY-MA
21 Minskaya voblasts BY-MI
21 Vitsyebskaya voblasts BY-VI
22 Antwerpen BE-VAN
22 Brabant Wallon BE-WBR
22 Brussels BE-BRU
22 Hainaut BE-WHT
22 Limburg BE-VLI
22 Liège BE-WLG
22 Luxembourg BE-WLX
22 Namur BE-WNA
22 Oost-Vlaanderen BE-VOV
22 Vlaams Brabant BE-VBR
22 West-Vlaanderen BE-VWV
23 Belize BZ-BZ
23 Cayo BZ-CY
23 Corozal BZ-CZL
23 Orange Walk BZ-OW
23 Stann Creek BZ-SC
23 Toledo BZ-TOL
24 Alibori BJ-AL
24 Atakora BJ-AK
24 Atlantique BJ-AQ
24 Borgou BJ-BO
24 Collines BJ-CO
24 Donga BJ-DO
24 Kouffo BJ-KO
24 Littoral BJ-LI
24 Mono BJ-MO
24 Ouémé BJ-OU
24 Plateau BJ-PL
24 Zou BJ-ZO
26 Bumthang BT-33
26 Chhukha BT-12
26 Dagana BT-22
26 Gasa BT-GA
26 Ha BT-13
26 Lhuentse BT-44
26 Monggar BT-42
26 Paro BT-11
26 Pemagatshel BT-43
26 Punakha BT-23
26 Samdrup Jongkha BT-45
26 Samtse BT-14
26 Sarpang BT-31
26 Thimphu BT-15
26 Trashi Yangtse BT-TY
26 Trashigang BT-41
26 Trongsa BT-32
26 Tsirang BT-21
26 Wangdue Phodrang BT-24
26 Zhemgang BT-34
27 Chuquisaca BO-H
27 Cochabamba BO-C
27 El Beni BO-B
27 La Paz BO-L
27 Oruro BO-O
27 Pando BO-N
27 Potosí BO-P
27 Santa Cruz BO-S
27 Tarija BO-T
28 Bosansko-podrinjski kanton BA-05
28 Brchko distrikt BA-BRC
28 Federacija Bosna i Hercegovina BA-BIH
28 Hercegovacko-neretvanski kanton BA-07
28 Kanton br. 10 (Livanjski kanton) BA-10
28 Kanton Sarajevo BA-09
28 Posavski kanton BA-02
28 Republika Srpska BA-SRP
28 Srednjobosanski kanton BA-06
28 Tuzlanski kanton BA-03
28 Unsko-sanski kanton BA-01
28 Zapadnohercegovacki kanton BA-08
28 Zenicko-dobojski kanton BA-04
29 Central BW-CE
29 Ghanzi BW-GH
29 Kgalagadi BW-KG
29 Kgatleng BW-KL
29 Kweneng BW-KW
29 North-East BW-NE
29 North-West BW-NW
29 South-East BW-SE
29 Southern BW-SO
31 Acre BR-AC
31 Alagoas BR-AL
31 Amapá BR-AP
31 Amazonas BR-AM
31 Bahia BR-BA
31 Ceará BR-CE
31 Distrito Federal BR-DF
31 Espírito Santo BR-ES
31 Goiás BR-GO
31 Maranhão BR-MA
31 Mato Grosso BR-MT
31 Mato Grosso do Sul BR-MS
31 Minas Gerais BR-MG
31 Paraná BR-PR
31 Paraíba BR-PB
31 Pará BR-PA
31 Pernambuco BR-PE
31 Piauí BR-PI
31 Rio de Janeiro BR-RJ
31 Rio Grande do Norte BR-RN
31 Rio Grande do Sul BR-RS
31 Rondônia BR-RO
31 Roraima BR-RR
31 Santa Catarina BR-SC
31 Sergipe BR-SE
31 São Paulo BR-SP
31 Tocantins BR-TO
33 Belait BN-BE
33 Brunei-Muara BN-BM
33 Temburong BN-TE
33 Tutong BN-TU
34 Blagoevgrad BG-01
34 Burgas BG-02
34 Dobrich BG-08
34 Gabrovo BG-07
34 Haskovo BG-26
34 Kardzhali BG-09
34 Kjustendil BG-10
34 Lovech BG-11
34 Montana BG-12
34 Pazardzhik BG-13
34 Pernik BG-14
34 Pleven BG-15
34 Plovdiv BG-16
34 Razgrad BG-17
34 Ruse BG-18
34 Silistra BG-19
34 Sliven BG-20
34 Smolyan BG-21
34 Sofia BG-23
34 Sofia-Grad BG-22
34 Stara Zagora BG-24
34 Targovishte BG-25
34 Varna BG-03
34 Veliko Tarnovo BG-04
34 Vidin BG-05
34 Vratsa BG-06
34 Yambol BG-28
34 Shumen BG-27
35 Balé BF-BAL
35 Bam BF-BAM
35 Banwa BF-BAN
35 Bazèga BF-BAZ
35 Boucle du Mouhoun BF-01
35 Bougouriba BF-BGR
35 Boulgou BF-BLG
35 Boulkiemdé BF-BLK
35 Cascades BF-02
35 Centre BF-03
35 Centre-Est BF-04
35 Centre-Nord BF-05
35 Centre-Ouest BF-06
35 Centre-Sud BF-07
35 Comoé BF-COM
35 Est BF-08
35 Ganzourgou BF-GAN
35 Gnagna BF-GNA
35 Gourma BF-GOU
35 Hauts-Bassins BF-09
35 Houet BF-HOU
35 Ioba BF-IOB
35 Kadiogo BF-KAD
35 Komondjari BF-KMD
35 Kompienga BF-KMP
35 Kossi BF-KOS
35 Koulpélogo BF-KOP
35 Kouritenga BF-KOT
35 Kourwéogo BF-KOW
35 Kénédougou BF-KEN
35 Loroum BF-LOR
35 Léraba BF-LER
35 Mouhoun BF-MOU
35 Nahouri BF-NAO
35 Namentenga BF-NAM
35 Nayala BF-NAY
35 Nord BF-10
35 Noumbiel BF-NOU
35 Oubritenga BF-OUB
35 Oudalan BF-OUD
35 Passoré BF-PAS
35 Plateau-Central BF-11
35 Poni BF-PON
35 Sahel BF-12
35 Sanguié BF-SNG
35 Sanmatenga BF-SMT
35 Sissili BF-SIS
35 Soum BF-SOM
35 Sourou BF-SOR
35 Sud-Ouest BF-13
35 Séno BF-SEN
35 Tapoa BF-TAP
35 Tui BF-TUI
35 Yagha BF-YAG
35 Yatenga BF-YAT
35 Ziro BF-ZIR
35 Zondoma BF-ZON
35 Zoundwéogo BF-ZOU
36 Bubanza BI-BB
36 Bujumbura Mairie BI-BM
36 Bujumbura Rural BI-BL
36 Bururi BI-BR
36 Cankuzo BI-CA
36 Cibitoke BI-CI
36 Gitega BI-GI
36 Karuzi BI-KR
36 Kayanza BI-KY
36 Kirundo BI-KI
36 Makamba BI-MA
36 Muramvya BI-MU
36 Muyinga BI-MY
36 Mwaro BI-MW
36 Ngozi BI-NG
36 Rutana BI-RT
36 Ruyigi BI-RY
37 Baat Dambang KH-2
37 Banteay Mean Chey KH-1
37 Kampong Chaam KH-3
37 Kampong Chhnang KH-4
37 Kampong Spueu KH-5
37 Kampong Thum KH-6
37 Kampot KH-7
37 Kandaal KH-8
37 Kaoh Kong KH-9
37 Kracheh KH-10
37 Krong Kaeb KH-23
37 Krong Pailin KH-24
37 Krong Preah Sihanouk KH-18
37 Mondol Kiri KH-11
37 Otdar Mean Chey KH-22
37 Phnom Penh KH-12
37 Pousaat KH-15
37 Preah Vihear KH-13
37 Prey Veaeng KH-14
37 Rotanak Kiri KH-16
37 Siem Reab KH-17
37 Stueng Traeng KH-19
37 Svaay Rieng KH-20
37 Taakaev KH-21
38 Adamaoua CM-AD
38 Centre CM-CE
38 East CM-ES
38 Far North CM-EN
38 Littoral CM-LT
38 North CM-NO
38 North-West CM-NW
38 South CM-SU
38 South-West CM-SW
38 West CM-OU
39 Alberta CA-AB
39 British Columbia CA-BC
39 Manitoba CA-MB
39 New Brunswick CA-NB
39 Newfoundland and Labrador CA-NL
39 Northwest Territories CA-NT
39 Nova Scotia CA-NS
39 Nunavut CA-NU
39 Ontario CA-ON
39 Prince Edward Island CA-PE
39 Quebec CA-QC
39 Saskatchewan CA-SK
39 Yukon Territory CA-YT
40 Boa Vista CV-BV
40 Brava CV-BR
40 Ilhas de Barlavento CV-B
40 Ilhas de Sotavento CV-S
40 Maio CV-MA
40 Mosteiros CV-MO
40 Paul CV-PA
40 Porto Novo CV-PN
40 Praia CV-PR
40 Ribeira Brava CV-RB
40 Ribeira Grande CV-RG
40 Ribeira Grande de Santiago CV-RS
40 Santa Catarina CV-CA
40 Santa Catarina do Fogo CV-CF
40 Santa Cruz CV-CR
40 São Domingos CV-SD
40 São Filipe CV-SF
40 São Lourenço dos Órgãos CV-SL
40 São Miguel CV-SM
40 São Salvador do Mundo CV-SS
40 São Vicente CV-SV
40 Tarrafal CV-TA
40 Tarrafal de São Nicolau CV-TS
41 Bodden Town KY-01~
41 Cayman Brac KY-02~
41 East End KY-03~
41 George Town KY-04~
41 Little Cayman Ky-05~
41 North Side KY-06~
41 West Bay KY-07~
42 Bamingui-Bangoran CF-BB
42 Bangui CF-BGF
42 Basse-Kotto CF-BK
42 Gribingui CF-KB
42 Haut-Mbomou CF-HM
42 Haute-Kotto CF-HK
42 Haute-Sangha / Mambéré-Kadéï CF-HS
42 Kémo-Gribingui CF-KG
42 Lobaye CF-LB
42 Mbomou CF-MB
42 Nana-Mambéré CF-NM
42 Ombella-Mpoko CF-MP
42 Ouaka CF-UK
42 Ouham CF-AC
42 Ouham-Pendé CF-OP
42 Sangha CF-SE
42 Vakaga CF-VK
43 Al Batthah TD-BA
43 Al Buhayrah TD-LC
43 Bahr al Ghazaal TD-BG
43 Buurkuu TD-BO
43 Inniidii TD-EN
43 Kaanim TD-KA
43 Luuquun al Gharbii TD-LO
43 Luuquun ash Sharqii TD-LR
43 Madiinat Injamiinaa TD-ND
43 Maanduul TD-MA
43 Maayuu Kiibbii al Gharbii TD-MO
43 Maayuu Kiibbii ash Sharqii TD-ME
43 Qiiraa TD-GR
43 Salaamaat TD-SA
43 Shaarii al Awsatt TD-MC
43 Shaarii Baaqirmii TD-CB
43 Siilaa TD-SI
43 Tibastii TD-TI
43 Taanjilii TD-TA
43 Waddaay TD-OD
43 Waadii Fiiraa TD-WF
43 Hajjar Lamiis TD-HL
44 Aisén del General Carlos Ibáñez del Campo CL-AI
44 Antofagasta CL-AN
44 Araucanía CL-AR
44 Arica y Parinacota CL-AP
44 Atacama CL-AT
44 Bío-Bío CL-BI
44 Coquimbo CL-CO
44 Libertador General Bernardo O'Higgins CL-LI
44 Los Lagos CL-LL
44 Los Ríos CL-LR
44 Magallanes CL-MA
44 Maule CL-ML
44 Región Metropolitana de Santiago CL-RM
44 Tarapacá CL-TA
44 Valparaíso CL-VS
45 Anhui CN-34
45 Aomen (zh) *** CN-92
45 Beijing CN-11
45 Chongqing CN-50
45 Fujian CN-35
45 Gansu CN-62
45 Guangdong CN-44
45 Guangxi CN-45
45 Guizhou CN-52
45 Hainan CN-46
45 Hebei CN-13
45 Heilongjiang CN-23
45 Henan CN-41
45 Hubei CN-42
45 Hunan CN-43
45 Jiangsu CN-32
45 Jiangxi CN-36
45 Jilin CN-22
45 Liaoning CN-21
45 Nei Mongol (mn) CN-15
45 Ningxia CN-64
45 Qinghai CN-63
45 Shaanxi CN-61
45 Shandong CN-37
45 Shanghai CN-31
45 Shanxi CN-14
45 Sichuan CN-51
45 Taiwan * CN-71
45 Tianjin CN-12
45 Xianggang (zh) ** CN-91
45 Xinjiang CN-65
45 Xizang CN-54
45 Yunnan CN-53
45 Zhejiang CN-33
48 Amazonas CO-AMA
48 Antioquia CO-ANT
48 Arauca CO-ARA
48 Atlántico CO-ATL
48 Bolívar CO-BOL
48 Boyacá CO-BOY
48 Caldas CO-CAL
48 Caquetá CO-CAQ
48 Casanare CO-CAS
48 Cauca CO-CAU
48 Cesar CO-CES
48 Chocó CO-CHO
48 Cundinamarca CO-CUN
48 Córdoba CO-COR
48 Distrito Capital de Bogotá CO-DC
48 Guainía CO-GUA
48 Guaviare CO-GUV
48 Huila CO-HUI
48 La Guajira CO-LAG
48 Magdalena CO-MAG
48 Meta CO-MET
48 Nariño CO-NAR
48 Norte de Santander CO-NSA
48 Putumayo CO-PUT
48 Quindío CO-QUI
48 Risaralda CO-RIS
48 San Andrés, Providencia y Santa Catalina CO-SAP
48 Santander CO-SAN
48 Sucre CO-SUC
48 Tolima CO-TOL
48 Valle del Cauca CO-VAC
48 Vaupés CO-VAU
48 Vichada CO-VID
49 Andjazîdja KM-G
49 Andjouân (Anjwaan) KM-A
49 Moûhîlî (Muuhiilii) KM-M
50 Bouenza CG-11
50 Brazzaville CG-BZV
50 Cuvette CG-8
50 Cuvette-Ouest CG-15
50 Kouilou CG-5
50 Likouala CG-7
50 Lékoumou CG-2
50 Niari CG-9
50 Plateaux CG-14
50 Pool CG-12
50 Sangha CG-13
51 Bandundu CD-BN
51 Bas-Congo CD-BC
51 Kasai-Occidental CD-KW
51 Kasai-Oriental CD-KE
51 Katanga CD-KA
51 Kinshasa CD-KN
51 Maniema CD-MA
51 Nord-Kivu CD-NK
51 Orientale CD-OR
51 Sud-Kivu CD-SK
51 Équateur CD-EQ
53 Alajuela CR-A
53 Cartago CR-C
53 Guanacaste CR-G
53 Heredia CR-H
53 Limón CR-L
53 Puntarenas CR-P
53 San José CR-SJ
54 Bjelovarsko-bilogorska zhupanija HR-07
54 Brodsko-posavska zhupanija HR-12
54 Dubrovacko-neretvanska zhupanija HR-19
54 Grad Zagreb HR-21
54 Istarska zhupanija HR-18
54 Karlovacka zhupanija HR-04
54 Koprivnicko-krizhevacka zhupanija HR-06
54 Krapinsko-zagorska zhupanija HR-02
54 Licko-senjska zhupanija HR-09
54 Medimurska zhupanija HR-20
54 Osjecko-baranjska zhupanija HR-14
54 Pozheshko-slavonska zhupanija HR-11
54 Primorsko-goranska zhupanija HR-08
54 Sisacko-moslavacka zhupanija HR-03
54 Splitsko-dalmatinska zhupanija HR-17
54 Varazhdinska zhupanija HR-05
54 Viroviticko-podravska zhupanija HR-10
54 Vukovarsko-srijemska zhupanija HR-16
54 Zadarska zhupanija HR-13
54 Zagrebacka zhupanija HR-01
54 Shibensko-kninska zhupanija HR-15
55 Camagüey CU-09
55 Ciego de CU-08
55 Cienfuegos CU-06
55 Ciudad de La Habana CU-03
55 Granma CU-12
55 Guantánamo CU-14
55 Holguín CU-11
55 Isla de la Juventud CU-99
55 La Habana CU-02
55 Las Tunas CU-10
55 Matanzas CU-04
55 Pinar del Río CU-01
55 Sancti Spíritus CU-07
55 Santiago de Cuba CU-13
55 Villa Clara CU-05
56 Ammochostos CY-04
56 Keryneia CY-06
56 Larnaka CY-03
56 Lefkosia CY-01
56 Lemesos CY-02
56 Pafos CY-05
57 Jihoceský kraj CZ-JC
57 Jihomoravský kraj CZ-JM
57 Karlovarský kraj CZ-KA
57 Královéhradecký kraj CZ-KR
57 Liberecký kraj CZ-LI
57 Moravskoslezský kraj CZ-MO
57 Olomoucký kraj CZ-OL
57 Pardubický kraj CZ-PA
57 Plzenský kraj CZ-PL
57 Praha, hlavní mesto CZ-PR
57 Stredoceský kraj CZ-ST
57 Vysocina CZ-VY
57 Zlínský kraj CZ-ZL
57 Ústecký kraj CZ-US
58 18 Montagnes (Région des) CI-06
58 Agnébi (Région de l') CI-16
58 Bafing (Région du) CI-17
58 Bas-Sassandra (Région du) CI-09
58 Denguélé (Région du) CI-10
58 Fromager (Région du) CI-18
58 Haut-Sassandra (Région du) CI-02
58 Lacs (Région des) CI-07
58 Lagunes (Région des) CI-01
58 Marahoué (Région de la) CI-12
58 Moyen-Cavally (Région du) CI-19
58 Moyen-Comoé (Région du) CI-05
58 Nzi-Comoé (Région) CI-11
58 Savanes (Région des) CI-03
58 Sud-Bandama (Région du) CI-15
58 Sud-Comoé (Région du) CI-13
58 Vallée du Bandama (Région de la) CI-04
58 Worodougou (Région du) CI-14
58 Zanzan (Région du) CI-08
59 Bornholm DK-040
59 Capital DK-84
59 Central Jutland DK-82
59 Frederiksberg City DK-147
59 Frederiksborg DK-020
59 Fyn DK-042
59 København DK-015
59 København City DK-101
59 Nordjylland DK-080
59 North Jutland DK-81
59 Ribe DK-055
59 Ringkøbing DK-065
59 Roskilde DK-025
59 South Denmark DK-83
59 Storstrøm DK-035
59 Sønderjylland DK-050
59 Vejle DK-060
59 Vestsjaelland DK-030
59 Viborg DK-076
59 Zeeland DK-85
59 Århus DK-070
60 Ali Sabieh DJ-AS
60 Arta DJ-AR
60 Dikhil DJ-DI
60 Djibouti DJ-DJ
60 Obock DJ-OB
60 Tadjourah DJ-TA
61 St. Andrew DM-02
61 St. David DM-03
61 St. George DM-04
61 St. John DM-05
61 St. Joseph DM-06
61 St. Luke DM-07
61 St. Mark DM-08
61 St. Patrick DM-09
61 St. Paul DM-10
61 St. Peter DM-11
62 Azua DO-02
62 Bahoruco DO-03
62 Barahona DO-04
62 Dajabón DO-05
62 Distrito Nacional (Santo Domingo) DO-01
62 Duarte DO-06
62 El Seybo DO-08
62 Espaillat DO-09
62 Hato Mayor DO-30
62 Independencia DO-10
62 La Altagracia DO-11
62 La Estrelleta DO-07
62 La Romana DO-12
62 La Vega DO-13
62 María Trinidad Sánchez DO-14
62 Monseñor Nouel DO-28
62 Monte Cristi DO-15
62 Monte Plata DO-29
62 Pedernales DO-16
62 Peravia DO-17
62 Puerto Plata DO-18
62 Salcedo DO-19
62 Samaná DO-20
62 San Cristóbal DO-21
62 San Jose de Ocoa DO-31
62 San Juan DO-22
62 San Pedro de Macorís DO-23
62 Santiago DO-25
62 Santiago Rodríguez DO-26
62 Sánchez Ramírez DO-24
62 Valverde DO-27
63 Azuay EC-A
63 Bolívar EC-B
63 Carchi EC-C
63 Cañar EC-F
63 Chimborazo EC-H
63 Cotopaxi EC-X
63 El Oro EC-O
63 Esmeraldas EC-E
63 Galápagos EC-W
63 Guayas EC-G
63 Imbabura EC-I
63 Loja EC-L
63 Los Ríos EC-R
63 Manabí EC-M
TomScott
(Tom Scott)
October 17, 2017, 8:18pm
11
Countries
Id Name ISO2 ISO3
1 Afghanistan AF AFG
2 Albania AL ALB
3 Algeria DZ DZA
4 American Samoa AS ASM
5 Andorra AD AND
6 Angola AO AGO
7 Anguilla AI AIA
8 Antarctica AQ ATA
9 Antigua and Barbuda AG ATG
10 Argentina AR ARG
11 Armenia AM ARM
12 Aruba AW ABW
13 Australia AU AUS
14 Austria AT AUT
15 Ã…land Islands AX ALA
16 Azerbaijan AZ AZE
17 Bahamas BS BHS
18 Bahrain BH BHR
19 Bangladesh BD BGD
20 Barbados BB BRB
21 Belarus BY BLR
22 Belgium BE BEL
23 Belize BZ BLZ
24 Benin BJ BEN
25 Bermuda BM BMU
26 Bhutan BT BTN
27 Bolivia BO BOL
28 Bosnia and Herzegovina BA BIH
29 Botswana BW BWA
30 Bouvet Island BV BVT
31 Brazil BR BRA
32 British Indian Ocean Territory IO IOT
33 Brunei Darussalam BN BRN
34 Bulgaria BG BGR
35 Burkina Faso BF BFA
36 Burundi BI BDI
37 Cambodia KH KHM
38 Cameroon CM CMR
39 Canada CA CAN
40 Cape Verde CV CPV
41 Cayman Islands KY CYM
42 Central African Republic CF CAF
43 Chad TD TCD
44 Chile CL CHL
45 China CN CHN
46 Christmas Island CX CXR
47 Cocos (Keeling) Islands CC CCK
48 Colombia CO COL
49 Comoros KM COM
50 Congo CG COG
51 Democratic Republic Of Congo CD COD
52 Cook Islands CK COK
53 Costa Rica CR CRI
54 Croatia HR HRV
55 Cuba CU CUB
56 Cyprus CY CYP
57 Czech Republic CZ CZE
58 Côte D'Ivoire CI CIV
59 Denmark DK DNK
60 Djibouti DJ DJI
61 Dominica DM DMA
62 Dominican Republic DO DOM
63 Ecuador EC ECU
64 Egypt EG EGY
65 El Salvador SV SLV
66 Equatorial Guinea GQ GNQ
67 Eritrea ER ERI
68 Estonia EE EST
69 Ethiopia ET ETH
70 Falkland Islands FK FLK
71 Faroe Islands FO FRO
72 Fiji FJ FJI
73 Finland FI FIN
74 France FR FRA
75 French Guiana GF GUF
76 French Polynesia PF PYF
77 French Southern Territories TF ATF
78 Gabon GA GAB
79 Gambia GM GMB
80 Georgia GE GEO
81 Germany DE DEU
82 Ghana GH GHA
83 Gibraltar GI GIB
84 Greece GR GRC
85 Greenland GL GRL
86 Grenada GD GRD
87 Guadeloupe GP GLP
88 Guam GU GUM
89 Guatemala GT GTM
90 Guernsey GG GGY
91 Guinea GN GIN
92 Guinea-Bissau GW GNB
93 Guyana GY GUY
94 Haiti HT HTI
95 Heard and McDonald Islands HM HMD
96 Holy See (Vatican City State) VA VAT
97 Honduras HN HND
98 Hong Kong HK HKG
99 Hungary HU HUN
100 Iceland IS ISL
101 India IN IND
102 Indonesia ID IDN
103 Iran IR IRN
104 Iraq IQ IRQ
105 Ireland IE IRL
106 Isle of Man IM IMN
107 Israel IL ISR
108 Italy IT ITA
109 Jamaica JM JAM
110 Japan JP JPN
111 Jersey JE JEY
112 Jordan JO JOR
113 Kazakhstan KZ KAZ
114 Kenya KE KEN
115 Kiribati KI KIR
116 North Korea KP PRK
117 South Korea KR KOR
118 Kuwait KW KWT
119 Kyrgyzstan KG KGZ
120 Laos LA LAO
121 Latvia LV LVA
122 Lebanon LB LBN
123 Lesotho LS LSO
124 Liberia LR LBR
125 Libya LY LBY
126 Liechtenstein LI LIE
127 Lithuania LT LTU
128 Luxembourg LU LUX
129 Macao MO MAC
130 Republic of Macedonia MK MKD
131 Madagascar MG MDG
132 Malawi MW MWI
133 Malaysia MY MYS
134 Maldives MV MDV
135 Mali ML MLI
136 Malta MT MLT
137 Marshall Islands MH MHL
138 Martinique MQ MTQ
139 Mauritania MR MRT
140 Mauritius MU MUS
141 Mayotte YT MYT
142 Mexico MX MEX
143 Federated States of Micronesia FM FSM
144 Moldova MD MDA
145 Monaco MC MCO
146 Mongolia MN MNG
147 Montenegro ME MNE
148 Montserrat MS MSR
149 Morocco MA MAR
150 Mozambique MZ MOZ
151 Myanmar MM MMR
152 Namibia NA NAM
153 Nauru NR NRU
154 Nepal NP NPL
155 Netherlands NL NLD
156 Netherlands Antilles AN ANT
157 New Caledonia NC NCL
158 New Zealand NZ NZL
159 Nicaragua NI NIC
160 Niger NE NER
161 Nigeria NG NGA
162 Niue NU NIU
163 Norfolk Island NF NFK
164 Northern Mariana Islands MP MNP
165 Norway NO NOR
166 Oman OM OMN
167 Pakistan PK PAK
168 Palau PW PLW
169 Palestine PS PSE
170 Panama PA PAN
171 Papua New Guinea PG PNG
172 Paraguay PY PRY
173 Peru PE PER
174 Philippines PH PHL
175 Pitcairn PN PCN
176 Poland PL POL
177 Portugal PT PRT
178 Puerto Rico PR PRI
179 Qatar QA QAT
180 Romania RO ROU
181 Russian Federation RU RUS
182 Rwanda RW RWA
183 Réunion RE REU
184 St. Barthélemy BL BLM
185 St. Helena, Ascension and Tristan Da Cunha SH SHN
186 St. Kitts And Nevis KN KNA
187 St. Lucia LC LCA
188 St. Martin MF MAF
189 St. Pierre And Miquelon PM SPM
190 St. Vincent And The Grenedines VC VCT
191 Samoa WS WSM
192 San Marino SM SMR
193 Sao Tome and Principe ST STP
194 Saudi Arabia SA SAU
195 Senegal SN SEN
196 Serbia RS SRB
197 Seychelles SC SYC
198 Sierra Leone SL SLE
199 Singapore SG SGP
200 Slovakia SK SVK
201 Slovenia SI SVN
202 Solomon Islands SB SLB
203 Somalia SO SOM
204 South Africa ZA ZAF
205 South Georgia and the South Sandwich Islands GS SGS
206 Spain ES ESP
207 Sri Lanka LK LKA
208 Sudan SD SDN
209 Suriname SR SUR
210 Svalbard And Jan Mayen SJ SJM
211 Swaziland SZ SWZ
212 Sweden SE SWE
213 Switzerland CH CHE
214 Syrian Arab Republic SY SYR
215 Taiwan TW TWN
216 Tajikistan TJ TJK
217 Tanzania TZ TZA
218 Thailand TH THA
219 Timor-Leste TL TLS
220 Togo TG TGO
221 Tokelau TK TKL
222 Tonga TO TON
223 Trinidad and Tobago TT TTO
224 Tunisia TN TUN
225 Turkey TR TUR
226 Turkmenistan TM TKM
227 Turks and Caicos Islands TC TCA
228 Tuvalu TV TUV
229 Uganda UG UGA
230 Ukraine UA UKR
231 United Arab Emirates AE ARE
232 United Kingdom GB GBR
233 United States US USA
234 US Minor Outlying Islands UM UMI
235 Uruguay UY URY
236 Uzbekistan UZ UZB
237 Vanuatu VU VUT
238 Venezuela VE VEN
239 Viet Nam VN VNM
240 Virgin Islands, British VG VGB
241 Virgin Islands, U.S. VI VIR
242 Wallis and Futuna WF WLF
243 Western Sahara EH ESH
244 Yemen YE YEM
245 Zambia ZM ZMB
246 Zimbabwe ZW ZWE
If you’re looking for a more consumable way to get access to the ISO-3166 country and subdivision data you can find it here. It’s organized and formatted in JSON.
https://github.com/sourcec0de/ISO-3166
1 Like
Hi Scott,
i have a problem with the country code for slovakia, the country code alpha 3 SVK didn’t work for me:
‘addresses’ => [
{
‘country_code’ => ‘SVK’,
‘field’ => ‘BILLING’
}
],
And the following response:
Response content: ‘{“message”:“BILLING Country Code is invalid”}’
Any idea why this happens?
Dominik_Klein:
slovakia
Hi @Dominik_Klein ,
The country code for Slovakia is supposed to be SVK but the alternate is SK. Maybe try this to see if that might work instead?
Hello,
i tested it also now with “SK”, but this is also not wkring. All other countries works correctly, but not slovakia.
I use the createOrUpdateContactUsingPUT operation.
Best regards,
Dominik
Hello,
any new feedback about this problem?
@TomScott ,
We never heard back about why both 3 and 2 letter codes are not working?
The country code should be SVK
but there’s a bug that is preventing this country code in particular from being recognized properly. Thanks for pointing out this issue. I’ve submitted a ticket for this and it will be prioritized into our workload.
1 Like
Thanks for this Do you have a date for the fix?
We don’t have a specific date right now. The good news is that the issue has entered our queue, and we can look further into this once other items have been completed.