You can use metadata from the Google i18n Internationalization project (link). For example, the address completion metadata from the libaddressinput package (C++ and Java tools) used for Android (Java) and Chromium OS (C++).
The raw data is stored here: https://i18napis.appspot.com/address
For Canada, it looks like this:
{
"lang":"en",
"upper":"ACNOSZ",
"zipex":"H3Z 2Y7,V8X 3X4,T0L 1K0,T0H 1A0,K1A 0B1",
"posturl":"http://www.canadapost.ca/cpotools/apps/fpc/personal/findByCity?execution=e2s1",
"zip":"[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d",
"fmt":"%N%n%O%n%A%n%C %S %Z",
"require":"ACSZ",
"name":"CANADA",
"languages":"en~fr",
"sub_keys":"AB~BC~MB~NB~NL~NT~NS~NU~ON~PE~QC~SK~YT",
"key":"CA",
"id":"data/CA",
"sub_names":"Alberta~British Columbia~Manitoba~New Brunswick~Newfoundland and Labrador~Northwest Territories~Nova Scotia~Nunavut~Ontario~Prince Edward Island~Quebec~Saskatchewan~Yukon",
"sub_zips":"T~V~R~E~A~X0E|X0G|X1A~B~X0A|X0B|X0C~K|L|M|N|P~C~G|H|J|K1A~S|R8A~Y"
}
(link)
And the full list for Canadian addresses:
data/CA
data/CA--fr
data/CA/AB
data/CA/AB--fr
data/CA/BC
data/CA/BC--fr
data/CA/MB
data/CA/MB--fr
data/CA/NB
data/CA/NB--fr
data/CA/NL
data/CA/NL--fr
data/CA/NS
data/CA/NS--fr
data/CA/NT
data/CA/NT--fr
data/CA/NU
data/CA/NU--fr
data/CA/ON
data/CA/ON--fr
data/CA/PE
data/CA/PE--fr
data/CA/QC
data/CA/QC--fr
data/CA/SK
data/CA/SK--fr
data/CA/YT
data/CA/YT--fr
You then use the individual sub-keys (i.e. QC in french) to download the address formats for that region.
{
"lang":"fr",
"name":"Québec",
"zip":"G|H|J|K1A",
"key":"QC",
"id":"data/CA/QC--fr"
}