The address model is used for the billing_address, sender_address, and recipient_address objects.

FieldTypeDescriptionValidation
address_typestringThe type of location. Example: business, residential.Possible values:
commercial residential educational government medical
industrial shipping_location
citystringCity, district, suburb, town, or village.Required,
2-40 characters
companystringThe company name, when shipping to a business address.2-35 characters
countrystringTwo letter ISO country code.Required,
Two letter ISO country code. Learn more
emailstringThe customer's email address.Valid email address,
2-225 characters
idnumber (double)The ID of this object in Delivery Hub.2-225 characters
phonestringThe customer's phone number.The regular expression pattern ^[+]?[(]?[0-9]{3}[)]?[-s.]?[0-9]{3}[-s.]?[0-9]{4,9}$ is used to match and validate phone numbers with various formats. Each symbol in the expression matches a section or symbol in the phone number:

^ asserts the start of the string.
[+]? matches an optional plus sign (+) at the beginning of the number.
[(]? matches an optional opening parenthesis (().
[0-9]{3} matches exactly three digits (0-9).
[)]? matches an optional closing parenthesis ()) if an opening parenthesis was present.
[-s.]? matches an optional hyphen (-), whitespace (s), or period (.) separator.
[0-9]{3} matches exactly three digits (0-9).
[-s.]? matches an optional separator after the second group of three digits.
[0-9]{4,9} matches a group of 4 to 9 digits (0-9).
$ asserts the end of the string.
Here are some examples of phone numbers that would match this pattern:

+123-456-7890
(123) 456-7890
123.456.7890
Note that the pattern allows for flexibility in terms of the presence of optional elements like the plus sign, parentheses, and separators. The last group of digits can range from 4 to 9 digits, accommodating phone numbers with or without extension numbers.
postal_codestringPostal or ZIP code.Required,
2-20 characters
statestring(Optional, based on country) State, province, or region.2-35 characters
street1stringThe first line of the street address, including the street name or PO Box number.Required,
1-35 characters
street2string(Optional) The second line of the street address, including the apartment number.1-35 characters