Method GetCaseByLastNameAndDOB

Summary

Get a court case by last name and date of birth

Remarks

It will return all cases that the defendent owes money for.

Input Parameters

NameTypeLengthDescription
defendentLastName System.String 20 Defendent's last name
defendentDOB mmddyyyy 8 Defendent's Date of birth

Example

GET http://localhost/FusionServices/v2/Naviline/CaseManagement/Name/{defendentLastName}/dob/{defendentDOB}

Returns

It will return all cases that the defendent owes money for.

Return Values

NameDescription
LastName Last name of the defendent
FirstName First name of the defendent
DateOfBirth Defendent's Date of birth
CaseID Case ID (internal)
CaseNumber Case Number
CaseStatuteCode Statue code
CaseFilingDate Filing Date of court case
CaseStatuteDate Case Statute Date
CourtID Court ID
StatuteDescription Statute description

Sample Responses

Sample Code

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

public void MethodName(parms)
{
    string uri = "http://localhost/FusionServices/v2/Naviline/CaseManagement/Name/acosta/dob/11261920";
    WebClient wc = new WebClient();
    wc.Headers.Set("X-APPID", "YOURID");
    wc.Headers.Set("X-APPKEY", "YOURKEY");
    string stringResult = wc.DownloadString(new Uri(uri));
    
    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 LastName = row["LastName"].ToString();
             string FirstName = row["FirstName"].ToString();
             string DateOfBirth = row["DateOfBirth"].ToString();
             string CaseID = row["CaseID"].ToString();
             string CaseNumber = row["CaseNumber"].ToString();
             string CaseStatuteCode = row["CaseStatuteCode"].ToString();
             string CaseFilingDate = row["CaseFilingDate"].ToString();
             string CaseStatuteDate = row["CaseStatuteDate"].ToString();
             string CourtID = row["CourtID"].ToString();
             string StatuteDescription = row["StatuteDescription"].ToString();
             // TODO - YOUR CODE HERE
        }
    }
}

$.get('http://localhost/FusionServices/v2/Naviline/CaseManagement/Name/acosta/dob/11261920', function(response) {
    $('#resultDiv).html(response); 
 });

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 GetCaseByLastNameAndDOB
   {
       // Add property for each input param in order to map a field to it
       [RegularExpression("^(?=.{0,20}$).*", ErrorMessage = "Must be 20 characters or less. ")]
       public string defendentLastName{get; set;}

       [RegularExpression("^(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])(19|20)\\d\\d$", ErrorMessage = "Date values only. Format: MMDDYYYY")]
       public string defendentDOB{get; set;}

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

@{
   ViewBag.Title = "GetCaseByLastNameAndDOB";
   string myUrl = "http://localhost/FusionServices/v2/Naviline/CaseManagement/Name/" + Model.defendentLastName + "/dob/" + Model.defendentDOB;
}

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

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

// 
// POST: /MyController/GetCaseByLastNameAndDOB
[HttpPost]
public ActionResult GetCaseByLastNameAndDOB(FormCollection collection)
{
   string url = "v2/Naviline/CaseManagement/Name/{defendentLastName}/dob/{defendentDOB}";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("defendentLastName", collection["defendentLastName"]);
   inputParms.Add("defendentDOB", collection["defendentDOB"]);

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Get(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetCaseByLastNameAndDOB");
       return View("Error", info);
   }
}