Hi everyone,
Our team is currently working with the GraphQL createOrder
API, and we have a question regarding the provinceCode
field in shipping_address
.
Does Shopify provide any official documentation or a complete list of province codes for all countries? Any official reference or link would be incredibly helpful.
Thanks so much for your time and support!
Hi @hue_nguyen,
I’m pretty sure the province codes a from the “ISO 3166-2” standard. If you look on Google there’s a few places where you can download the list of all of them.
For example, https://www.ip2location.com/downloads/ip2location-iso3166-2.zip has a CSV with the name and code of all the provinces that you could use.
(Just note that in that file, the code
column is in the format [Country code]-[Province code]
, so you’ll need to split the data at the dash to get just the code that Shopify accepts)
Best,
Daniel
Hi @hue_nguyen
According to Shopify documentation, it complies with the ISO 3166-1 alpha-2 standard
ISO 3166-1 alpha-2 - Wikipedia
Hi Daniel,
Thank you so much for the helpful info and the link! I really appreciate you taking the time to point me in the right direction — this will definitely save us a lot of time.
Best regards,
Hue
Hi Kyle,
Thanks again for your valuable input! I appreciate you sharing both the resource and the clarification on the ISO standards.
Much appreciated!