Method PostSearchLandParcelKey

Summary

Search Projects by Land ParcelKey

Remarks

Search for project by the land parcel key. You do not have to enter the full parcel key.

Input Parameters

NameTypeLengthDescription
Parcel System.String 70 [Required] Parcel Number. Format: 111111-222222-333333

Example

POST http://localhost/FusionServices/v3/Naviline/PlanningEngineering/SearchLandParcelKey

Sample Responses

Sample Code

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

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v3/Naviline/PlanningEngineering/SearchLandParcelKey";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("parcel",System.Web.HttpUtility.UrlEncode("5281-384"));

   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 AddressFormatted = row["AddressFormatted"].ToString();
             string StreetName = row["StreetName"].ToString();
             string StreetNumber = row["StreetNumber"].ToString();
             string StreetDirection = row["StreetDirection"].ToString();
             string StreetSuffix = row["StreetSuffix"].ToString();
             string ZipCode = row["ZipCode"].ToString();
             string ParcelFormatted = row["ParcelFormatted"].ToString();
             string ParcelNumber01 = row["ParcelNumber01"].ToString();
             string ParcelNumber02 = row["ParcelNumber02"].ToString();
             string ParcelNumber03 = row["ParcelNumber03"].ToString();
             string ParcelNumber04 = row["ParcelNumber04"].ToString();
             string ParcelNumber05 = row["ParcelNumber05"].ToString();
             string ParcelNumber06 = row["ParcelNumber06"].ToString();
             string ParcelNumber07 = row["ParcelNumber07"].ToString();
             string ParcelNumber08 = row["ParcelNumber08"].ToString();
             string ParcelNumber09 = row["ParcelNumber09"].ToString();
             string ParcelNumber10 = row["ParcelNumber10"].ToString();
             string Year = row["Year"].ToString();
             string Name = row["Name"].ToString();
             string Description = row["Description"].ToString();
             string NameType = row["NameType"].ToString();
             string DescriptionType = row["DescriptionType"].ToString();
             string LocationID = row["LocationID"].ToString();
             string ApplicationID = row["ApplicationID"].ToString();
             string ControlNumber = row["ControlNumber"].ToString();
             string TAPLCK0 = row["TAPLCK0"].ToString();
             string TAPLCK2 = row["TAPLCK2"].ToString();
             string TAPLCK3 = row["TAPLCK3"].ToString();
             string TAPLCK6 = row["TAPLCK6"].ToString();
             string TAPLCK7 = row["TAPLCK7"].ToString();
             string TAPLCKC = row["TAPLCKC"].ToString();
             string TAPLCKF = row["TAPLCKF"].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 PostSearchLandParcelKey
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,70}$).*", ErrorMessage = "Must be 70 characters or less. ")]
       public string Parcel{get; set;}

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

@{
   ViewBag.Title = "PostSearchLandParcelKey";
}

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

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

// 
// POST: /MyController/PostSearchLandParcelKey
[HttpPost]
public ActionResult PostSearchLandParcelKey(FormCollection collection)
{
   string url = "v3/Naviline/PlanningEngineering/SearchLandParcelKey";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("Parcel", collection["Parcel"]);

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