Address and Contact Info Objects
Address and contact info objects are used throughout ShipEngine Connect. Your application will almost certainly need to access or return address objects, such as origin and destination addresses of a shipment or the location of a carrier pickup. Likewise, your application will need a way to represent an individual person and their contact information.
For example, the schedulePickupMethod
receives an address object containing the address where the package(s) should
be picked up and a contact info object containing the contact information for the person that will be there to meet the driver.
Sometimes the address and contact info will be included within a single object. For example, the shipTo
and shipFrom
addresses passed to the createShipment
method will contain all the properties for an address
object as well as all the properties for a contact info object. This is referred to as address + contact info
in the
reference documentation.
Address Properties
This table lists the properties of an Address object and identifies those properties that are required. The nullable
column indicates which properties may be null when the object is provided as an argument to one of your methods and the required
column indicates which properties are required when the object is returned from one of your methods.
Name | Type | Required? | Nullable? | Description |
---|---|---|---|---|
company | string | ✔ | The company name for the address, if provided. This string must not include newline characters. | |
addressLines | string[] | ✔ | Rather than providing two or three distinct address fields, simply provide all lines of the address in a string array. Each string in the array must be between | |
cityLocality | string | ✔ | The city or locality for this address. This string must not include newline characters. | |
stateProvince | string | ✔ | The state or province for this address. This string must not include newline characters. | |
postalCode | string | The zip code or other postal code for this address. This string must not include newline characters. | ||
country | ✔ | The country for the address. | ||
isResidential | boolean | ✔ | A boolean value indicating whether or not the address is residential. |
Example
{ company: "Example Corp", addressLines: [ "4009 Marathon Blvd", "Suite 310", ], cityLocality: "Austin", stateProvince: "TX", postalCode: "78756", country: "US", isResidential: false}
Contact Info Properties
This table lists the properties of a Contact Info object and identifies those properties that are required. The nullable
column indicates which properties may be null when the object is provided as an argument to one of your methods and the required
column indicates which properties are required when the object is returned from one of your methods.
Name | Type | Required? | Nullable? | Description |
---|---|---|---|---|
name | object | ✔ | The name of the contact. | |
name.title | string | The title of the contact (eg "Mr", "Mrs", "Dr"). This must not include newline characters. | ||
name.given | string | ✔ | The first name of the signer. This must not include newline characters. | |
name.middle | string | The middle name of the signer. This must not include newline characters. | ||
name.family | string | The last name or family name of the signer. This must not include newline characters. | ||
name.suffix | string | The suffix of the signer (eg "Sr", "Jr", "IV"). This must not include newline characters. | ||
email | string | The email address of the contact. This string must be a valid email address. | ||
phoneNumber | string | The phone number of the contact. and must not include newline characters. |
Example
{ name: { title: "Mr.", given: "John", family: "Doe", }, email: "johndoe@example.com", phoneNumber: "555-555-5555",}
Pickup Location Properties
This table lists the properties of a Pickup Location object and all of its properties are required.
Name | Type | Required? | Nullable? | Description |
---|---|---|---|---|
relayId | string | ✔ | The Relay Id of the desired Pickup Location. | |
carrierId | string | ✔ | The Carrier Id of the desired Pickup Location. |
Example
{ relayId: "12345-A", carrierId: "DHL"}
Address + Contact Info Properties
This table lists the properties of an object referred to as address + contact info
in the reference documentation
and identifies those properties that are required. The nullable
column indicates which properties may be null when the object is provided as an argument to one of your methods and the required
column indicates which properties are required when the object is returned from one of your methods.
Name | Type | Required? | Nullable? | Description |
---|---|---|---|---|
company | string | ✔ | The company name for the address, if provided. This string must not include newline characters and must not include newline characters. | |
addressLines | string[] | ✔ | Rather than providing two or three distinct address fields, simply provide all lines of the address in a string array. Each string in the array must be between | |
cityLocality | string | ✔ | The city or locality for this address. This string must not include newline characters. | |
stateProvince | string | ✔ | The state or province for this address. This string must not include newline characters. | |
postalCode | string | ✔ | The zip code or other postal code for this address. This string must not include newline characters. | |
country | ✔ | The country for the address. | ||
isResidential | boolean | ✔ | A boolean value indicating whether or not the address is residential. | |
name | object | ✔ | The name of the contact. | |
name.title | string | The title of the contact (eg "Mr", "Mrs", "Dr"). This string must not include newline characters. | ||
name.given | string | ✔ | The first name of the signer. This string must not include newline characters. | |
name.middle | string | The middle name of the signer. This string must not include newline characters. | ||
name.family | string | The last name or family name of the signer. This string must not include newline characters. | ||
name.suffix | string | The suffix of the signer (eg "Sr", "Jr", "IV"). This string must not include newline characters. | ||
email | string | The email address of the contact. This string must be a valid email address. | ||
phoneNumber | string | The phone number of the contact. This string must not include newline characters. |
Example
{ name: { title: "Mr.", given: "John", family: "Doe", }, email: "johndoe@example.com", phoneNumber: "555-555-5555", company: "Example Corp", addressLines: [ "4009 Marathon Blvd", "Suite 310", ], cityLocality: "Austin", stateProvince: "TX", postalCode: "78756", country: "US", isResidential: false}
Address + Contact Info + Pickup Location Properties
This table lists the properties of an object referred to as address + contact info + pickup location
in the reference documentation
and identifies those properties that are required. The nullable
column indicates which properties may be null when the object is
provided as an argument to one of your methods and the required
column indicates which properties are required when the object is
returned from one of your methods.
Name | Type | Required? | Nullable? | Description |
---|---|---|---|---|
company | string | ✔ | The company name for the address, if provided. This string must not include newline characters and must not include newline characters. | |
addressLines | string[] | ✔ | Rather than providing two or three distinct address fields, simply provide all lines of the address in a string array. Each string in the array must be between | |
cityLocality | string | ✔ | The city or locality for this address. This string must not include newline characters. | |
stateProvince | string | ✔ | The state or province for this address. This string must not include newline characters. | |
postalCode | string | ✔ | The zip code or other postal code for this address. This string must not include newline characters. | |
country | ✔ | The country for the address. | ||
isResidential | boolean | ✔ | A boolean value indicating whether or not the address is residential. | |
name | object | ✔ | The name of the contact. | |
name.title | string | The title of the contact (eg "Mr", "Mrs", "Dr"). This string must not include newline characters. | ||
name.given | string | ✔ | The first name of the signer. This string must not include newline characters. | |
name.middle | string | The middle name of the signer. This string must not include newline characters. | ||
name.family | string | The last name or family name of the signer. This string must not include newline characters. | ||
name.suffix | string | The suffix of the signer (eg "Sr", "Jr", "IV"). This string must not include newline characters. | ||
email | string | The email address of the contact. This string must be a valid email address. | ||
phoneNumber | string | The phone number of the contact. This string must not include newline characters. | ||
pickupLocation | object | ✔ | The Pickup Location asscoated with, or to use instead of, this address. | |
pickupLocation.relayId | string | ✔ | The Relay Id of the desired Pickup Location. | |
pickupLocation.carrierId | string | ✔ | The Carrier Id of the desired Pickup Location. |
Example
{ name: { title: "Mr.", given: "John", family: "Doe", }, email: "johndoe@example.com", phoneNumber: "555-555-5555", company: "Example Corp", addressLines: [ "4009 Marathon Blvd", "Suite 310", ], cityLocality: "Austin", stateProvince: "TX", postalCode: "78756", country: "US", isResidential: false, pickupLocation: { relayId: "12345-A", carrierId: "DHL" }}