Method PostParcelSearch

Summary

Parcel Search

Input Parameters

NameTypeLengthDescription
parcel System.String 70 [Required] Parcel number. Format: 111-2222-333-44-55-6

Example

POST http://localhost/FusionServices/v3/Naviline/Tax/ParcelSearch

Sample Responses

Sample Code

using System.Net;

string uri = "http://localhost/FusionServices/v3/Naviline/Tax/ParcelSearch";
System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 

postParms.Add("parcel1",System.Web.HttpUtility.UrlEncode("0005"));
postParms.Add("parcel2",System.Web.HttpUtility.UrlEncode("350"));
postParms.Add("parcel3",System.Web.HttpUtility.UrlEncode("049"));
postParms.Add("parcel4",System.Web.HttpUtility.UrlEncode("000"));
postParms.Add("parcel5",System.Web.HttpUtility.UrlEncode("00"));
postParms.Add("rollCodes",System.Web.HttpUtility.UrlEncode("RE"));
postParms.Add("taxYear",System.Web.HttpUtility.UrlEncode("2015"));
using (WebClient req = new WebClient())
{
    byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
    string stringResult = Encoding.UTF8.GetString(responseBytes); 
    // TODO
}

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

@{
   ViewBag.Title = "PostParcelSearch";
}

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

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

// 
// POST: /MyController/PostParcelSearch
[HttpPost]
public ActionResult PostParcelSearch(FormCollection collection)
{
   string url = "v3/Naviline/Tax/ParcelSearch";
   // 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", "PostParcelSearch");
       return View("Error", info);
   }
}