Method PostSearchLandInfoByAddress

Summary

Search for location by address

Input Parameters

NameTypeLengthDescription
streetName System.String 25 [Required] Street name to search on
streetNumber numeric 7 Street number to search on
rows numeric 4 Number of rows to return
pageNumber numeric 5 Used for paging results

Example

POST http://localhost/FusionServices/v3/Naviline/Permit/Application/SearchLandInfo/ByAddress

Return Values

NameDescription
Address Street number and name
Parcel Parcel number for location
Owner The owner or other related party
GenLocCode General location code
LocationID Location ID
StreetNum Street number
StreetDir Street direction. I.e. N, NE, NW, E, W, S
StreetName Street name
StreetSuffix Street suffix. I.e. AVE, DR, RD, ST
InOutCode Inside Outside code. Indicates if address in inside city limits
FLD11
FLD12 Y/N

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v3/Naviline/Permit/Application/SearchLandInfo/ByAddress";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("streetName",System.Web.HttpUtility.UrlEncode("Fair"));

   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 Address = row["Address"].ToString();
             string Parcel = row["Parcel"].ToString();
             string Owner = row["Owner"].ToString();
             string GenLocCode = row["GenLocCode"].ToString();
             string LocationID = row["LocationID"].ToString();
             string StreetNum = row["StreetNum"].ToString();
             string StreetDir = row["StreetDir"].ToString();
             string StreetName = row["StreetName"].ToString();
             string StreetSuffix = row["StreetSuffix"].ToString();
             string InOutCode = row["InOutCode"].ToString();
             string FLD11 = row["FLD11"].ToString();
             string FLD12 = row["FLD12"].ToString();
             // TODO - YOUR CODE HERE
        }
   }
}

C# Razor MVC Sample Code

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 PostSearchLandInfoByAddress
   {
       // 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-9]{0,7}", ErrorMessage = "Numeric values only. Must be 7 digits or less. ")]
       public string streetNumber{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,5}", ErrorMessage = "Numeric values only. Must be 5 digits or less. ")]
       public string pageNumber{get; set;}

       public PostSearchLandInfoByAddress()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostSearchLandInfoByAddress 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.PostSearchLandInfoByAddress

@{
   ViewBag.Title = "PostSearchLandInfoByAddress";
}

<h2>PostSearchLandInfoByAddress</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostSearchLandInfoByAddress</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.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.pageNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.pageNumber)
           @Html.ValidationMessageFor(model => model.pageNumber)
       </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/PostSearchLandInfoByAddress
public ActionResult PostSearchLandInfoByAddress()
{
   // Create a new instance of the model to pick up any default values.
   PostSearchLandInfoByAddress model =  new PostSearchLandInfoByAddress();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/PostSearchLandInfoByAddress.cshtml", model);
}

// 
// POST: /MyController/PostSearchLandInfoByAddress
[HttpPost]
public ActionResult PostSearchLandInfoByAddress(FormCollection collection)
{
   string url = "v3/Naviline/Permit/Application/SearchLandInfo/ByAddress";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("streetName", collection["streetName"]);
   inputParms.Add("streetNumber", collection["streetNumber"]);
   inputParms.Add("rows", collection["rows"]);
   inputParms.Add("pageNumber", collection["pageNumber"]);

   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", "PostSearchLandInfoByAddress");
       return View("Error", info);
   }
}