Validate an address
This address validation endpoint allows you to validate shipping addresses before using them. By validating addresses in advance, you can ensure that the shipping information is accurate and complete, reducing the risk of delivery issues and improving overall shipping efficiency. Providing the carrier helps to tailor the address validation process according to specific carrier requirements. Using additional validation methods can further enhance the accuracy of the address verification.
The default Sendcloud validation, will always be applied, has in 2 steps:
-
checks the address against the carrier limits (e.g. maximum length of the address line, existence of the postal code for the country, etc.). see also Carrier address limits.
-
optimizes (washes) the address to fit within the carrier limits. (e.g. deduplication of address lines, abbreviations, etc.)
Headers
If you are <a href="https://www.sendcloud.com/ecosystem/" target="_blank"> an official Sendcloud Tech Partner</a>, you can provide this additional request header for the system to recognize you. Sendcloud Partner UUID is provided to Sendcloud partners. The token is not required but if the header is set, the system will try to validate it. An unknown UUID will cause the 404 return, whilst an invalid one will return 400.
Request body
Example request
{
"address": {
"address_line_1": "Stadhuisplein",
"house_number": "50",
"address_line_2": "Apartment 17B",
"postal_code": "1013 AB",
"city": "Eindhoven",
"state_province_code": "IT-RM",
"country_code": "NL"
},
"carrier_code": "trunkrs",
"validation_methods": [
"here"
]
}Response
Address validation successful
Example response
{
"results": [
{
"address": {
"address_line_1": "Stadhuisplein",
"house_number": "50",
"address_line_2": "Apartment 17B",
"postal_code": "1013 AB",
"city": "Eindhoven",
"state_province_code": "IT-RM",
"country_code": "NL"
}
}
]
}