v4

latestOpenAPI 3.1.0Apache 2.02026-08-06960261.4 KB
Address
Returns
Shipments

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:

  1. 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.

  2. optimizes (washes) the address to fit within the carrier limits. (e.g. deduplication of address lines, abbreviations, etc.)

post/addresses/validate

Headers

Sendcloud-Partner-Idstring
Example:550e8400-e29b-41d4-a716-446655440000

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

carrier_codestring required

The code of the carrier to be used for the address validation. Only carriers available to your account can be used.

validation_methodsAddressValidationMethodEnum[]

An array of optional address validation methods to be applied The default Sendcloud validation will always be applied.

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

input_address_is_validboolean nullable

Indicates if the input address is valid. In case null is returned, the address is not valid and the details are not available (f.e.the address validator is not available).

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"
      }
    }
  ]
}