Verify Address
Verify Address
POST
https://api.synapsefi.com/v3.1/address-verification
This endpoint allows you to verify an address.
Headers
Request Body
{
"deliverability": "usps_deliverable",
"deliverability_analysis": {
"partial_valid": false,
"primary_number_invalid": false,
"primary_number_missing": false,
"secondary_invalid": false,
"secondary_missing": false
},
"normalized_address": {
"address_city": "SAN FRANCISCO",
"address_country_code": "US",
"address_postal_code": "94105",
"address_street": "1 MARKET ST STE 500",
"address_subdivision": "CA"
}
}
{
"deliverability": "deliverable_missing_unit",
"deliverability_analysis": {
"partial_valid": true,
"primary_number_invalid": false,
"primary_number_missing": false,
"secondary_invalid": false,
"secondary_missing": true
},
"normalized_address": {
"address_city": "SAN FRANCISCO",
"address_country_code": "US",
"address_postal_code": "94105",
"address_street": "1 MARKET ST",
"address_subdivision": "CA"
}
}
Example Request
POST /v3.1/address-verification HTTP/1.1
Host: uat-api.synapsefi.com
Content-Type: application/json
{
"address_street": "1 Market St. STE 500",
"address_city": "San Francisco",
"address_subdivision": "CA",
"address_postal_code": "94105",
"address_country_code": "US"
}
conn = http.client.HTTPConnection("uat-api,synapsefi,com")
payload = "{
"address_street\": \"1 Market St. STE 500\",\n \"address_city\": \"San Francisco\",\n \"address_subdivision\": \"CA\",\n \"address_postal_code\": \"94105\",\n \"address_country_code\": \"US\"\n}"
headers = {
'Content-Type': "application/json",
'cache-control': "no-cache",
'Postman-Token': "9f4649ad-9869-401d-b04b-96e145cde414"
}
conn.request("POST", "v3.1,address-verification", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var settings = {
"async": true,
"crossDomain": true,
"url": "https://uat-api.synapsefi.com/v3.1/address-verification",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"processData": false,
"data": "{\n \"address_street\": \"1 Market St. STE 500\",\n \"address_city\": \"San Francisco\",\n \"address_subdivision\": \"CA\",\n \"address_postal_code\": \"94105\",\n \"address_country_code\": \"US\"\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
require 'uri'
require 'net/http'
url = URI("https://uat-api.synapsefi.com/v3.1/address-verification")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address_street\": \"1 Market St. STE 500\",\n \"address_city\": \"San Francisco\",\n \"address_subdivision\": \"CA\",\n \"address_postal_code\": \"94105\",\n \"address_country_code\": \"US\"\n}"
response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://uat-api.synapsefi.com/v3.1/address-verification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Content-Type' => 'application/json'
));
$request->setBody('{
"address_street": "1 Market St. STE 500",
"address_city": "San Francisco",
"address_subdivision": "CA",
"address_postal_code": "94105",
"address_country_code": "US"
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://uat-api.synapsefi.com/v3.1/address-verification"
payload := strings.NewReader("{\n \"address_street\": \"1 Market St. STE 500\",\n \"address_city\": \"San Francisco\",\n \"address_subdivision\": \"CA\",\n \"address_postal_code\": \"94105\",\n \"address_country_code\": \"US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Deliverability
Deliverability Analysis Object
Last updated