Parameter | Description:Example | In Address Example | Type | Example |
---|---|---|---|---|
street_number | Street Number: | 1 N Mansion Dr NW Santa Fe NM 87501 | interger | 1 |
pre_direction | Pre Direction: | 1 N Mansion Dr NW Santa Fe NM 87501 | string | N |
street_name | Street Name: | 1 N Mansion Dr NW Santa Fe NM 87501 | string | Mansion |
street_suffix | Street Suffix: | 1 N Mansion Dr NW Santa Fe NM 87501 | string | Dr |
street_post_directional | Street Post Directional | 1 N Mansion Dr NW Santa Fe NM 87501 | string | NW |
city | City | 1 N Mansion Dr NW Santa Fe NM 87501 | string | Santa Fe |
zipcode | 5 Digit Zip Code | 1 N Mansion Dr NW Santa Fe NM 87501 | interger | 87501 |
/api/by_address?street_number=1&street_name=Mansion&street_suffix=Dr&city=Santa%20Fe&zipcode=87501
api/by_address?street_number=65432&street_name=PO BOX&city=Albuquerque&zipcode=87193
JSON
Return Address for Thai Vegan
{
"results": [
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"street_post_directional": "SE",
"city": "Albuquerque",
"zipcode": "87108",
"tax_rate": 7.875,
"success": true,
"county": "Bernalillo"
}
]
}
Key | Description | Type | Value Example |
---|---|---|---|
street_number | Street Number | interger | 1 |
pre_direction | Pre Direction | string | N |
street_name | Street Name | string | Mansion |
street_suffix | Street Suffix | string | Dr |
street_post_directional | Street Post Directional | string | NW |
city | City | string | Santa Fe |
zipcode | Zip Code | interger | 87501 |
{
"addresses": [
{
"city": "Santa Fe",
"county": "Santa Fe",
"street_name": "Mansion",
"street_number": "1",
"street_suffix": "Dr",
"zipcode": "87501"
},
{
"city": "Albuquerque",
"county": "Bernalillo",
"street_name": "Central",
"street_number": "3804",
"street_post_directional": "SE",
"street_suffix": "Ave",
"zipcode": "87108"
}
]
}
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"addresses": [
{
"street_number": "1",
"street_name": "Mansion",
"street_suffix": "Dr",
"city": "Santa Fe",
"zipcode": "87501",
"county": "Santa Fe"
},
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"city": "Albuquerque",
"zipcode": "87108",
"county": "Bernalillo",
"street_post_directional": "SE"
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://grt.edacnm.org/api/by_address", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var settings = {
"url": "https://grt.edacnm.org/api/by_address",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({
"addresses": [
{
"street_number": "1",
"street_name": "Mansion",
"street_suffix": "Dr",
"city": "Santa Fe",
"zipcode": "87501",
"county": "Santa Fe"
},
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"city": "Albuquerque",
"zipcode": "87108",
"county": "Bernalillo",
"street_post_directional": "SE"
}
]
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import requests
import json
url = "https://grt.edacnm.org/api/by_address"
payload = json.dumps({
"addresses": [
{
"street_number": "1",
"street_name": "Mansion",
"street_suffix": "Dr",
"city": "Santa Fe",
"zipcode": "87501",
"county": "Santa Fe"
},
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"city": "Albuquerque",
"zipcode": "87108",
"county": "Bernalillo",
"street_post_directional": "SE"
}
]
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://grt.edacnm.org/api/by_address',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"addresses": [
{
"street_number": "1",
"street_name": "Mansion",
"street_suffix": "Dr",
"city": "Santa Fe",
"zipcode": "87501",
"county": "Santa Fe"
},
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"city": "Albuquerque",
"zipcode": "87108",
"county": "Bernalillo",
"street_post_directional":"SE"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
{
"results": [
{
"street_number": "1",
"street_name": "Mansion",
"street_suffix": "Dr",
"city": "Santa Fe",
"zipcode": "87501",
"county": "Santa Fe",
"tax_rate": 8.4375,
"success": true
},
{
"street_number": "3804",
"street_name": "Central",
"street_suffix": "Ave",
"city": "Albuquerque",
"zipcode": "87108",
"county": "Bernalillo",
"street_post_directional": "SE",
"tax_rate": 7.875,
"success": true
}
]
}
<h1>Upload xls or xlsx file</h1>
<form action="https://grt.edacnm.org//api/upload" method=post enctype=multipart/form-data>
<input type=file name=file>
<input type=submit value=Upload>
</form>
Binary File
Python Example:
import requests
url = "https://grt.edacnm.org/api/upload"
payload = {}
files = [
('file', ('example.xlsx', open('/home/admin/examples/example.xlsx', 'rb'),
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))
]
headers = {}
local_filename = "/home/admin/examples/testdl.xls"
response = requests.request(
"POST", url, headers=headers, data=payload, files=files)
response.raise_for_status()
with open(local_filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(local_filename + " created.")
"results": [
{
"street_number": "1",
"pre_direction": "",
"street_name": "Mansion",
"street_suffix": "Dr",
"street_post_directional": "",
"city": "Santa Fe",
"zipcode": "87501",
"tax_rate": "8.4375",
"location_code": "01-123",
"success": true,
"source": "Intuit",
"county": "Santa Fe"
}
]
}