API documentation Addresses
Contents
Address Data
The following describes the validations that are in place for address records, and the data sanitations that you will need to perform before sending the data to ViaEurope.
Addresses are currently used in the following contexts:
-
Delivery
as attribute
address
-
Declaration
as attributes
consignee
andexporter
-
Waybills
as attribute
consignor
Data Sanitation
You will need to ensure to perform the following data sanitations on the address data that you submit to ViaEurope in order to ensure that the data can be processed without error. Failure to do so might result in the request being rejected with an error.
Key(s) | Description |
name1
,
name2
,
street
,
city
|
|
street
,
city
,
zip
,
email
,
phone
|
|
street
|
|
zip
|
|
city
|
|
phone
|
|
email
|
|
Data Validation
We perform the validations on the various address fields which may produce the following errors. If you have performed the aforementioned sanitations, your data should be accepted; but keep in mind that there may be additional context-specific validations. This list is not exhaustive.
You may test your address data against our address validation API to see if it passes our validations.
Bear in mind that courier networks might perform their own checks and
might reject a delivery even though it passed our validation.
The delivery record will be set to state
rejected_at_courier
in this case. Your account manager can help you determine additional
limitations that might apply to your choice of delivery network.
Key | Description | Datatype | Constraints | Errors |
service | Name | String | Optional. The name of the delivery service that is planned to be used with the submitted address. It will be used to check if that courier charges extra for delivering to the given address. 200 OK with an additional JSON payload of warnings (See example). The address is still considered valid and can be used in subsequent requests despite the warning. |
|
name1 | Name | String | Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
name2 | Name (continued) | String | Optional. Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
street | Street | String | Maximum 70 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. Must not contain zip code. Must not contain city. |
|
city | City | String | 2-35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
country | Country | String | 2 character ISO 3166-Alpha 2 country code. |
|
zip | Zip | String | Zipcode associated with the address |
|
Email of recipient | String | Optional. Maximum 50 characters |
|
|
phone | Phone number | String | Optional. Maximum 15 characters. Must only contain characters 0-9, plus and minus. |
|