Search for account delinquency information
If the account is past due, but has not been sent a delinquency notice yet, it will not be returned.
If you enter a customer and location number to search on, this will return delinquincy info for that account and other accounts with the nearest customer number.
Name | Type | Length | Description |
---|---|---|---|
customerNumber | numeric | 9 | Customer Number. See Account Search methods. |
locationNumber | numeric | 9 | Location Number. See Account Search methods. |
minimumAmount | amount | 11 | Minimum Amount of delinquency to return accounts for. |
dateType | numeric | 1 | The deliquincy notice date type to search on: 1=First Notice, 2=Second Notice, 3=Third Notice, C=Collection |
fromDate | mmddyyyy | 8 | Search From Date. Format: mmddyyyy |
toDate | mmddyyyy | 8 | Search To Date. Format: mmddyyyy |
exempt | yn | 1 | Include exempt delinquencies: Y/N |
POST http://localhost/FusionServices/v2/Naviline/Utilities/delinquencies
Name | Description |
---|---|
CustomerID | The customer number for the account. |
LocationID | The location number for the account. Location number is the second part of the account number used to identify the customer’s account. |
CustomerAreaCode | 3 digit area code for customer's phone number. |
CustomerPhone | Customer's 7 digit phone number |
DelinquencyDate | Date the deliquency notice was sent. Format: mmddyyyy |
CurrentBalance | Current balance Amount on the account. |
DelinquencyAmount | Amount due on the account. |
PendingAmount | Amount of payment applied to the account, that has not yet been posted and approved. |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v2/Naviline/Utilities/delinquencies";
System.Collections.Specialized.NameValueCollection postParms =
new System.Collections.Specialized.NameValueCollection();
// Set paramater values
postParms.Add("customerNumber",System.Web.HttpUtility.UrlEncode("27211"));
postParms.Add("locationNumber",System.Web.HttpUtility.UrlEncode("9258"));
postParms.Add("minimumAmount",System.Web.HttpUtility.UrlEncode("00000000100"));
postParms.Add("dateType",System.Web.HttpUtility.UrlEncode("1"));
postParms.Add("fromDate",System.Web.HttpUtility.UrlEncode("01012001"));
postParms.Add("toDate",System.Web.HttpUtility.UrlEncode("12312019"));
postParms.Add("exempt",System.Web.HttpUtility.UrlEncode("N"));
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 CustomerID = row["CustomerID"].ToString();
string LocationID = row["LocationID"].ToString();
string CustomerAreaCode = row["CustomerAreaCode"].ToString();
string CustomerPhone = row["CustomerPhone"].ToString();
string DelinquencyDate = row["DelinquencyDate"].ToString();
string CurrentBalance = row["CurrentBalance"].ToString();
string DelinquencyAmount = row["DelinquencyAmount"].ToString();
string PendingAmount = row["PendingAmount"].ToString();
// TODO - YOUR CODE HERE
}
}
}
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 PostSearchUtilitiesAccountDelinquencies
{
// Add property for each input param in order to map a field to it
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string customerNumber{get; set;}
[RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
public string locationNumber{get; set;}
[RegularExpression("^\\d{1,8}\\.(\\d{2,2})$", ErrorMessage = "Amount values only. Example: 1234.56")]
public string minimumAmount{get; set;}
[RegularExpression("[0-9]{0,1}", ErrorMessage = "Numeric values only. Must be 1 digits or less. ")]
public string dateType{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 fromDate{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 toDate{get; set;}
[RegularExpression("^[YN]{0,1}$", ErrorMessage = "Must be Y or N.")]
public string exempt{get; set;}
public PostSearchUtilitiesAccountDelinquencies()
{
//Set any defaults here
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostSearchUtilitiesAccountDelinquencies 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.PostSearchUtilitiesAccountDelinquencies
@{
ViewBag.Title = "PostSearchUtilitiesAccountDelinquencies";
}
<h2>PostSearchUtilitiesAccountDelinquencies</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>PostSearchUtilitiesAccountDelinquencies</legend>
<div class="editor-label">
@Html.LabelFor(model => model.customerNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.customerNumber)
@Html.ValidationMessageFor(model => model.customerNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.locationNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.locationNumber)
@Html.ValidationMessageFor(model => model.locationNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.minimumAmount)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.minimumAmount)
@Html.ValidationMessageFor(model => model.minimumAmount)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.dateType)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.dateType)
@Html.ValidationMessageFor(model => model.dateType)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.fromDate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.fromDate)
@Html.ValidationMessageFor(model => model.fromDate)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.toDate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.toDate)
@Html.ValidationMessageFor(model => model.toDate)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.exempt)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.exempt)
@Html.ValidationMessageFor(model => model.exempt)
</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/PostSearchUtilitiesAccountDelinquencies
public ActionResult PostSearchUtilitiesAccountDelinquencies()
{
// Create a new instance of the model to pick up any default values.
PostSearchUtilitiesAccountDelinquencies model = new PostSearchUtilitiesAccountDelinquencies();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/PostSearchUtilitiesAccountDelinquencies.cshtml", model);
}
//
// POST: /MyController/PostSearchUtilitiesAccountDelinquencies
[HttpPost]
public ActionResult PostSearchUtilitiesAccountDelinquencies(FormCollection collection)
{
string url = "v2/Naviline/Utilities/delinquencies";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("customerNumber", collection["customerNumber"]);
inputParms.Add("locationNumber", collection["locationNumber"]);
inputParms.Add("minimumAmount", collection["minimumAmount"]);
inputParms.Add("dateType", collection["dateType"]);
inputParms.Add("fromDate", collection["fromDate"]);
inputParms.Add("toDate", collection["toDate"]);
inputParms.Add("exempt", collection["exempt"]);
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", "PostSearchUtilitiesAccountDelinquencies");
return View("Error", info);
}
}