X

Validate an address

We currently can only validate UK & US addresses.


[POST] https://api-us1.stannp.com/v1/addresses/validate

Parameters

company string Company name.
address1 string Address line 1.
address2 string Address line 2.
city string Address city.
state string Two-letter abbreviation if possible.
zipcode string Address zipcode.
country string ISO 3166-1 Alpha 2 Country Code (US,GB,CA,FR...).

Request

                import requests

data = {
    "company": "Stannp",\n    "address1": "1000 N west street",\n    "address2": "Suite 1200 #1939",\n    "city": "Wilmington",\n    "zipcode": "19801",\n    "country": "US",\n
}

response = requests.post("https://api-us1.stannp.com/v1/addresses/validate?api_key={API_KEY}", data=data)
print(response.text)
            

Response

{
    "success": true,
    "data": {
        "is_valid": true
    }
}