Difference between revisions of "XcelDataAPI:Version 0.2/standardize-address"
| Line 56: | Line 56: | ||
|} | |} | ||
| − | == Request Format == | + | === Request Format === |
<table class="wikitable"> | <table class="wikitable"> | ||
<tr> | <tr> | ||
| Line 195: | Line 195: | ||
</tr> | </tr> | ||
</table> | </table> | ||
| + | |||
| + | === Test === | ||
| + | |||
| + | You can test either examples requests below at either of these links: | ||
| + | |||
| + | * [https://api.xceldata.com/0.2/xml/1E17162A-8355-4FF2-8DCD-E5CEE676FD93/standardize-address Test XML Output] | ||
| + | * [https://api.xceldata.com/0.2/json/1E17162A-8355-4FF2-8DCD-E5CEE676FD93/standardize-address Test JSON Output] | ||
== Output== | == Output== | ||
| Line 257: | Line 264: | ||
</pre> | </pre> | ||
|} | |} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 23:07, 30 April 2018
Main Entry Point
Main Page: XcelData API v0.2
Example
This endpoint allows you to query multiple addresses at the same time.
Let's look up the work address currently located at: 2118 F St, Bakersfield, CA 93301 and the old address located at: 5880 District Blvd Ste 5, Bakersfield, CA 93301
Request
The incoming request can be in either XML or JSON format and should be post data (or alternatively if using application/x-www-form-urlencoded use the key "data" and pass it the xml or json as a string).
| XML - /0.2/xml/api-key/standardize-address | JSON - /0.2/json/api-key/standardize-address |
|---|---|
<Requests>
<Request ID="1">
<Address1>2118 F St</Address1>
<City>Bakersfield</City>
<State>CA</State>
<Zip5>93301</Zip5>
</Request>
<Request ID="2">
<Address1>5880 District Blvd Ste 5</Address1>
<City>Bakersfield</City>
<State>CA</State>
<Zip5>93313</Zip5>
</Request>
</Requests>
|
{"Requests": [
{
"Address1": "2118 F St",
"City": "Bakersfield",
"ID": 1,
"State": "CA",
"Zip5": 93301
},
{
"Address1": "5880 District Blvd Ste 5",
"City": "Bakersfield",
"ID": 1,
"State": "CA",
"Zip5": 93313
}
]}
|
Request Format
|
Address1 |
Required Tag/ Optional Value |
Address Line 1 is used to provide an apartment or suite number, if applicable. Maximum characters allowed: 38 For example: <Address1></Address1> |
|
Address2 |
Required Tag/ Required Value |
Street address. Maximum characters allowed: 38 For example: <Address2>6406 Ivy </Address2> |
|
City |
Required Tag/ Optional Value (see box at right) |
Maximum characters allowed: 15.Either <City> and <State> or <Zip5> are required. For example: <City> Greenbelt </City> |
|
State |
Required Tag/ Optional Value (see box at right) |
Maximum characters allowed: 2. Either <City> and <State> or <Zip5> are required. For example: <State>MD</State> |
|
Zip5 |
Required Tag/ Optional Value (see box at right) |
Input tag exactly as presented, not all caps.Maximum characters allowed: 5. Either <City> and <State> or <Zip5> are required. For example: <Zip5></Zip5> |
|
Zip4 |
Required Tag/ Optional Value |
Input tag exactly as presented, not all caps. Maximum characters allowed: 4 For example: <Zip4></Zip4> |
Test
You can test either examples requests below at either of these links:
Output
The output can either be XML or JSON. You specify that in the request url.
| XML - /0.2/xml/api-key/standardize-address | JSON - /0.2/json/api-key/standardize-address |
|---|---|
<?xml version="1.0"?>
<root>
<success>1</success>
<Results>
<Result ID="1">
<ID>1</ID>
<Address1>2118 F ST</Address1>
<City>BAKERSFIELD</City>
<State>CA</State>
<Zip5>93301</Zip5>
<Zip4>3826</Zip4>
</Result>
<Result ID="2">
<ID>2</ID>
<Address1>5880 DISTRICT BLVD</Address1>
<Address2>STE 5</Address2>
<City>BAKERSFIELD</City>
<State>CA</State>
<Zip5>93313</Zip5>
<Zip4>2138</Zip4>
</Result>
</Results>
</root>
|
{
"success": true,
"Results": [
{
"ID": "1",
"Address1": "2118 F ST",
"City": "BAKERSFIELD",
"State": "CA",
"Zip5": "93301",
"Zip4": "3826"
},
{
"ID": "2",
"Address1": "5880 DISTRICT BLVD",
"Address2": "STE 5",
"City": "BAKERSFIELD",
"State": "CA",
"Zip5": "93313",
"Zip4": "2138"
}
]
}
|