Method PostSearchByParcel

Summary

Searches Permits by Parcel and return type

Remarks

It will parse the input value for 1 to 10 sets of numbers separated by a hypen (-) to compare against the ParcelNo1 - ParcelNo10 values. It fills the first ParcelNo values first. To skip a ParcelNo value, enter a blank space between the hyphens. Unused Parcel numbers can be omitted from the end if not being searched on.

Each Parcel segment must be filled with leading zeros to fill the number of digits defined for the segment under Land Key Setup.

Input Parameters

NameTypeLengthDescription
ParcelSearchCriteria System.String 0 [Required] The Parcel number, i.e. 0011-222-33-444-5
ReturnType System.String 1 Default="O" BLANK(" ")=Both Open/Closed, O=Open Only, C=Closed

Example

POST http://localhost/FusionServices/v3/Naviline/Permit/Application/Search/ByParcel

Return Values

NameDescription
ApplicationYear Year permit application was submitted. This is the first part of the application number
ApplicationNumber Number assigned to the application.
StreetNumber Street address number
StreetDirectionCode 2 digit code indicating street direction: N,S,E,W,NE,NW,SE,SW
StreetName Street name portion of the address
StreetSuffix 4 character street suffix. I.e. Bay, Dr, Lane, Rd, Way
Name Name found for the application
NameTypeCode Indicates who's name was returned. AC=Alternate Contact AP=Applicant CT=Contractor OW=Owner PC=Primary Contact SC=Subcontractor. Other values may be defined.
ParcelCrossRef
ParcelNo1-10 Set of digits in the Parcel ID. I.e. 1111-222-33-444-5 up to 10 sets of numbers.
ApplicationTypeDesc Description for what type of permit application this is.
UserStatusCodeDesc Application status. Description is maintained by the city.

Sample Responses

Sample Code

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

public void MethodName(parms){
   string uri = "http://localhost/FusionServices/v2/Naviline/Permit/Application/Search/ByParcel";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("parcelSearchCriteria",System.Web.HttpUtility.UrlEncode("0005-355-108"));

   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")
   {
       // 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 PostSearchByParcel
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       public string ParcelSearchCriteria{get; set;}

       [RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
       public string ReturnType{get; set;}

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

@{
   ViewBag.Title = "PostSearchByParcel";
}

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

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

// 
// POST: /MyController/PostSearchByParcel
[HttpPost]
public ActionResult PostSearchByParcel(FormCollection collection)
{
   string url = "v3/Naviline/Permit/Application/Search/ByParcel";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("ParcelSearchCriteria", collection["ParcelSearchCriteria"]);
   inputParms.Add("ReturnType", collection["ReturnType"]);

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