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

                using RestSharp;

var client = new RestClient("https://api-us1.stannp.com/v1/addresses/validate?api_key={API_KEY}");
var request = new RestRequest(Method.POST);

request.AddParameter("company", "Stannp");
request.AddParameter("address1", "1000 N west street");
request.AddParameter("address2", "Suite 1200 #1939");
request.AddParameter("city", "Wilmington");
request.AddParameter("zipcode", "19801");
request.AddParameter("country", "US");


IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
            

Response

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