Search for Location by street address
The street number, direction, and suffix can be used to narrow the search down but are not required.
Name | Type | Length | Description |
---|---|---|---|
streetName | System.String | 25 | [Required] Street name to search on. |
streetNumber | System.String | 7 | Street number. I.e 105 in 105 FAIR ST |
streetDir | System.String | 2 | Street direction code. I.e N, NW, S, SW. See GetStreetDirCodes |
streetSuffix | System.String | 4 | Street Suffix code. I.e AVE, ST, RD. See GetStreetSuffixes |
mode | System.String | 1 | Search mode. F=New Search, N=Continue Previous Search. Use N with paging. |
rows | numeric | 4 | Rows. Used for paging |
firstRec | numeric | 9 | First row number to return. Used for paging |
lastRec | numeric | 9 | Last row number to return. Used for paging |
POST http://localhost/FusionServices/v3/Naviline/CodeEnforcement/Address/Search
Name | Description |
---|---|
StreetName | Street name of the matching address returned |
StreetDirection | Street direction code. See GetStreetDirCodes |
StreetSuffix | Street suffix code. See GetStreetSuffixes |
RTPDR | |
RTPRQ | |
ApartmentNumber | Apartment number |
StreetAddress | Combined street address with name, number, direction, and suffix |
OwnerName | Owner |
LocationID | Location ID number for address |
LandKey | Land parcel number for address |
UserZoneCode | Code for user zone. A=Apartment, C=Commercial, R=Residential, etc. |
UserZoneDesc | Description of user zone. Apartment,Commercial, Residential, etc. |
BoundaryCode | Inside Outside Code - Indicates if address is inside or outside city limits |
AllowPayment | |
RTCNOTE | |
ErrorCode | 2003 = Records found, no more records to retrieve |
ErrorMessage | 'End of file' if no more records to retrieve |
ROWS | Number of rows returned |
FirstRecord | First row returned |
LastRecord | Last row returned |
MOREYN | Y/N More records to return |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v3/Naviline/CodeEnforcement/Address/Search";
System.Collections.Specialized.NameValueCollection postParms =
new System.Collections.Specialized.NameValueCollection();
// Set paramater values
postParms.Add("streetDir",System.Web.HttpUtility.UrlEncode(""));
postParms.Add("streetName",System.Web.HttpUtility.UrlEncode("FAIR"));
postParms.Add("streetNumber",System.Web.HttpUtility.UrlEncode(""));
postParms.Add("streetSuffix",System.Web.HttpUtility.UrlEncode(""));
postParms.Add("mode",System.Web.HttpUtility.UrlEncode("F"));
postParms.Add("rows",System.Web.HttpUtility.UrlEncode(""));
postParms.Add("firstRec",System.Web.HttpUtility.UrlEncode(""));
postParms.Add("lastRec",System.Web.HttpUtility.UrlEncode(""));
WebClient req = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
wc.Headers.Set("X-APPID", "YOURID");
wc.Headers.Set("X-APPKEY", "YOURKEY");
byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
string stringResult = Encoding.UTF8.GetString(responseBytes);
JObject response = JObject.Parse(stringResult);
string error = response["OutputParms"]["ErrorCode"].ToString();
if (error == "0000")
{
JArray jRows = (JArray)response["Rows"];
foreach (JObject row in jRows)
{
string StreetName = row["StreetName"].ToString();
string StreetDirection = row["StreetDirection"].ToString();
string StreetSuffix = row["StreetSuffix"].ToString();
string RTPDR = row["RTPDR"].ToString();
string StreetNumber = row["StreetNumber"].ToString();
string RTPRQ = row["RTPRQ"].ToString();
string RTPSQ = row["RTPSQ"].ToString();
string ApartmentNumber = row["ApartmentNumber"].ToString();
string StreetAddress = row["StreetAddress"].ToString();
string OwnerName = row["OwnerName"].ToString();
string LocationID = row["LocationID"].ToString();
string LandKey = row["LandKey"].ToString();
string UserZoneCode = row["UserZoneCode"].ToString();
string UserZoneDesc = row["UserZoneDesc"].ToString();
string BoundaryCode = row["BoundaryCode"].ToString();
string AllowPayment = row["AllowPayment"].ToString();
string RTCNOTE = row["RTCNOTE"].ToString();
// TODO - YOUR CODE HERE
}
}
}
using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;
// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
public class PostAddressSearch
{
// Add property for each input param in order to map a field to it
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,25}$).*", ErrorMessage = "Must be 25 characters or less. ")]
public string streetName{get; set;}
[RegularExpression("^(?=.{0,7}$).*", ErrorMessage = "Must be 7 characters or less. ")]
public string streetNumber{get; set;}
[RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
public string streetDir{get; set;}
[RegularExpression("^(?=.{0,4}$).*", ErrorMessage = "Must be 4 characters or less. ")]
public string streetSuffix{get; set;}
[RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
public string mode{get; set;}
[RegularExpression("[0-9]{0,4}", ErrorMessage = "Numeric values only. Must be 4 digits or less. ")]
public string rows{get; set;}
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string firstRec{get; set;}
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string lastRec{get; set;}
public PostAddressSearch()
{
//Set any defaults here
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostAddressSearch class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top. Replace the rest with the lines below.
@model FusionRazor.Models.PostAddressSearch
@{
ViewBag.Title = "PostAddressSearch";
}
<h2>PostAddressSearch</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>PostAddressSearch</legend>
<div class="editor-label">
@Html.LabelFor(model => model.streetName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.streetName)
@Html.ValidationMessageFor(model => model.streetName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.streetNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.streetNumber)
@Html.ValidationMessageFor(model => model.streetNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.streetDir)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.streetDir)
@Html.ValidationMessageFor(model => model.streetDir)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.streetSuffix)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.streetSuffix)
@Html.ValidationMessageFor(model => model.streetSuffix)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.mode)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.mode)
@Html.ValidationMessageFor(model => model.mode)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.rows)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.rows)
@Html.ValidationMessageFor(model => model.rows)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.firstRec)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.firstRec)
@Html.ValidationMessageFor(model => model.firstRec)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.lastRec)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.lastRec)
@Html.ValidationMessageFor(model => model.lastRec)
</div>
<p>
<input type="submit" value="Submit"/>
</p>
</fieldset>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;
// NOTE: Replace 'MyController' with the name of your controller.
//
// GET: /MyController/PostAddressSearch
public ActionResult PostAddressSearch()
{
// Create a new instance of the model to pick up any default values.
PostAddressSearch model = new PostAddressSearch();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/PostAddressSearch.cshtml", model);
}
//
// POST: /MyController/PostAddressSearch
[HttpPost]
public ActionResult PostAddressSearch(FormCollection collection)
{
string url = "v3/Naviline/CodeEnforcement/Address/Search";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("streetName", collection["streetName"]);
inputParms.Add("streetNumber", collection["streetNumber"]);
inputParms.Add("streetDir", collection["streetDir"]);
inputParms.Add("streetSuffix", collection["streetSuffix"]);
inputParms.Add("mode", collection["mode"]);
inputParms.Add("rows", collection["rows"]);
inputParms.Add("firstRec", collection["firstRec"]);
inputParms.Add("lastRec", collection["lastRec"]);
try
{
// Send the request
FusionServiceRequest request = new FusionServiceRequest();
FusionServiceResult result = request.Post(url, inputParms);
return View("Result", result);
}
catch(Exception e)
{
HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostAddressSearch");
return View("Error", info);
}
}