Method PostSearchNewAppl

Summary

Search New Application - Coming soon... targeted release 23.1

Remarks

This API will return the list of new applications for electronic review process. It will return a data set of the new applications that are flagged for electronic review.

Input Parameters

NameTypeLengthDescription
rows System.String 3 [Required] Number of rows must be from 1 to 999.

Example

POST http://localhost/FusionServices/v3/Naviline/EPR/SearchNewAppl

Return Values

NameDescription
ErrorCode Error Code
ErrorMessage Error Message
RecordType Record Type
ApplicationYear Application Year
ApplicationNumber Application Number
ApplicationDesc Application Description
ContactEmail Contact Email
ContactName Contact Name
ApplTypeCode Application Type Code
PropertyAddr Property Address
SquareFootage Square Footage
ProjEstValue Project Estimated Value
OldApplStatus Old Application Status
NewApplStatus New Application Status
NewApplStatus New Application Status
ElecRevProjID Electronic Review Project ID
ApplDesc Application Description

Error Details

Error CodeError Message
0000 Success
0001 No records found.

Sample Responses

Sample Code

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

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v3/Naviline/EPR/SearchNewAppl";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("rows",System.Web.HttpUtility.UrlEncode("001"));

   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 RecordType = row["RecordType"].ToString();
             string ApplicationYear = row["RTPYER"].ToString();
             string ApplicationNumber = row["ApplicationNumber"].ToString();
             string ApplicationDesc = row["ApplicationDesc"].ToString();
             string ContactEmail = row["ContactEmail"].ToString();
             string ContactName = row["ContactName"].ToString();
             string ApplTypeCode = row["ApplTypeCode"].ToString();
             string PropertyAddr = row["PropertyAddr"].ToString();
             string SquareFootage = row["SquareFootage"].ToString();
             string ProjEstValue = row["ProjEstValue"].ToString();
             string OldApplStatus = row["OldApplStatus"].ToString();
             string NewApplStatus = row["NewApplStatus"].ToString();
             string ElecRevProjID = row["ElecRevProjID"].ToString();
             string ApplDesc = row["ApplDesc"].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 PostSearchNewAppl
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,3}$).*", ErrorMessage = "Must be 3 characters or less. ")]
       public string rows{get; set;}

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

@{
   ViewBag.Title = "PostSearchNewAppl";
}

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

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

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

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