API Reference

This model is also used for the Sender and Recipient objects.

FieldTypeDescriptionValidation
allow_emailbooleanIf allow_email is true, send notifications to customer by email.Possible values:
true false
allow_smsbooleanIf allow_sms is true, send notifications to customer by SMS.Possible values:
true false
emailstringThe customer's email address.Valid email address,
2-225 characters
idnumber (double)The ID of this object in Delivery Hub.Valid uuid
languagestringThe customer's locale (ISO6391), which defines the Delivery Notification language for this order. Learn more about configuring notifications.Valid ISO 639-1 code
namestringThe customer's first and last name.Required,
2-35 characters
phonestringThe customer's phone number.Required
7-16 characters

The regular expression pattern ^[+]?[(]?[0-9]{3}[)]?[-s.]?[0-9]{3}[-s.]?[0-9]{1,8}$ is used to match and validate phone numbers with various formats. Let's break down the components of this pattern:

^ 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]{1,8} matches a group of 1 to 8 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 1 to 8 digits, accommodating phone numbers with or without extension numbers.