Address
Returns
Shipments

Validate an address

Changed on

Validate a shipping address before you use it in a shipment.

post/addresses/validate

Request

  • Base URL
    https://panel.sendcloud.sc/api/v3
  • URL
    https://panel.sendcloud.sc/api/v3/addresses/validate
  • Auth
    • HTTP basic
    • or OAuth 2
      Client credentials
      Token URL: https://account.sendcloud.com/oauth2/token/ scopes: write:parcel

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 (e.g., 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"
      }
    }
  ]
}

Changes