Canada

PropertyValue
CodeCA
CurrencyCAD
RegionAmericas, Northern America
Name orderGiven name first
StateProvince, a list of 13
PostcodeRequired, checked, like K1A 0B1, and by state
RulesGET /v1/countries/CA

Form

The address form, in English. A field that is not required shows its optional label.

CountryCanada First name Last name Address Apartment, suite, etc. (optional) City ProvinceChoose… Postal codeK1A 0B1 Phone number (optional)(506) 234-5678

Fields

FieldLabelRequiredAutocomplete
countryCountry (list)yescountry
first_nameFirst nameyesgiven-name
last_nameLast nameyesfamily-name
line1Addressyesaddress-line1
line2Apartment, suite, etc.noaddress-line2
cityCityyesaddress-level2
stateProvince (list)yesaddress-level1
postcodePostal codeyespostal-code
phone_numberPhone numbernotel
emailEmailyesemail

Postcode

RuleValue
Requiredyes
Pattern^[A-Z][0-9][A-Z][0-9][A-Z][0-9]$
ExampleK1A 0B1
Written as### ###
Checked by state13 of 13, below

POST /v1/validate refuses a postcode sent with a state it does not start like, as not_in_state. A state not listed is checked by pattern only. From libaddressinput.

StateStarts with
Alberta (AB)T
British Columbia (BC)V
Manitoba (MB)R
New Brunswick (NB)E
Newfoundland and Labrador (NL)A
Northwest Territories (NT)X0E|X0G|X1A
Nova Scotia (NS)B
Nunavut (NU)X0A|X0B|X0C
Ontario (ON)K|L|M|N|P
Prince Edward Island (PE)C
Quebec (QC)G|H|J|K1A
Saskatchewan (SK)S|R8A
Yukon (YT)Y

Phone

RuleValue
Calling code+1
National prefix1
Pattern^[0-9]{7,11}$
Example(506) 234-5678
Written as(###) ###-####

Address format

How an address is written for reading, on an order page, a receipt or a label: address.format in the rules.

CODE
{first_name} {last_name}
{line1}
{line2}
{city} {state} {postcode}
{country}

On an envelope, the address and apartment, suite, etc. and city and first name and last name and province and postal code are written in capitals.

Example

A real address in Canada, from address.example, written with the format and the state by its name:

CODE
John Doe
2701 Riverside Drive
Ottawa Ontario K1A 0B1
Canada

Province

The form submits the code, which is what an order stores; the name is what the shopper reads, in their language.

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

Messages

What the form shows under a field when a value is refused, in English. Every language is on its page under Languages.

FieldErrorMessage
countrynot_selectedSelect a country
first_nameblankEnter a first name
first_nameinvalid_charactersFirst name can only contain letters, spaces, hyphens and apostrophes
first_namecontains_emojiFirst name can't contain emojis
first_nametoo_longFirst name must be 255 characters or fewer
last_nameblankEnter a last name
last_nameinvalid_charactersLast name can only contain letters, spaces, hyphens and apostrophes
last_namecontains_emojiLast name can't contain emojis
last_nametoo_longLast name must be 255 characters or fewer
line1blankEnter an address
line1contains_emojiAddress can't contain emojis
line1too_longAddress must be 255 characters or fewer
line2blankEnter address line 2
line2contains_emojiAddress line 2 can't contain emojis
line2too_longAddress line 2 must be 255 characters or fewer
cityblankEnter a city
cityinvalidEnter a valid city
citycontains_emojiCity can't contain emojis
citytoo_longCity must be 255 characters or fewer
statenot_selectedSelect a province
stateinvalidChoose a province from the list
postcodeblankEnter a postal code
postcodeinvalidEnter a valid postal code, like K1A 0B1
postcodecontains_emojiPostal code can't contain emojis
postcodetoo_longPostal code must be 64 characters or fewer
phone_numberblankEnter a phone number
phone_numberinvalidEnter a valid phone number, like (506) 234-5678
phone_numbercontains_emojiPhone number can't contain emojis
phone_numbertoo_longPhone number must be 24 characters or fewer
emailblankEnter an email address
emailinvalidEnter a valid email, like name@example.com
emailcontains_emojiEmail can't contain emojis
emailtoo_longEmail must be 254 characters or fewer