X

Validate an address

We currently can only validate UK & US addresses.


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

Parameters

company string Company name.
address1 string Address line 1.
address2 string Address line 2.
address3 string Address line 3.
city string Address city.
postcode string Address postal code.
country string ISO 3166-1 Alpha 2 Country Code (GB,US,FR...).

Request

                import requests

data = {
    "company": "Stannp",\n    "address1": "Unit 12",\n    "address2": "Taw trade park",\n    "city": "Barnstaple",\n    "postcode": "EX31 1JZ",\n    "country": "GB",\n
}

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

Response

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