# Introduction
Lyons Commercial Data XML-based Web Services are hosted in a secure and fully redundant data center to provide near real-time account ownership, account status verification and validation of important transaction processing information.
Applications accessing Lyons Commercial Data web services utilize Representational State Transfer (REST) to process information requests to and from the Lyons Commercial Data servers via https:// or https:// for SSL encryption
Error handling for Rest:
Here’s are list of code's returned:
200 Response is OK.
500 Internal server error. Usually we would return the payload from the service on error and it will describe the error results.
// Following payload is received for 500 level error codes for institution not found
{
"errorMessage": "No financial institutions found",
"institutions": null
}
// Following payload is received for bad parameters.
{
"errorMessage": "Bad params!"
}
// For Session expire following response is returned
{
"errorMessage": "Logon session expired!"
}
Authentication
Each web service requires authentication, providing a secure connection between the client and Lyons Commercial Data servers. A company ID, username and password are required to access Lyons Commercial Data web services.
To receive a company ID, username and password, please complete the trial request form or contact an account representative.
Base Service URL
Please use the base URL that you are subscribed to for Authentication. Example if subscribed to OFAC service
Logon
Sub Main(args As String())
'''''''''' Replace service url in below code with your service that you subscribed to in below bash command.
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/Logon"
Dim inputJson As String = "{""companyId"":""XXXXX"", ""userName"":""XXXXX"",""password"":""XXXXXXX""}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
# Replace service URL in below code with your service that you subscribed in below Python code.
serviceUrl = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logon"
import requests
data = {
"companyId":"0000",
"userName":"loginName",
"password":"pwd"
}
response = requests.post(
serviceUrl,
json=data)
public abstract class AbstractServiceCall {
protected String login(RestTemplate rt, LogonProperties loginProps) throws StopProcesingException {
LogonRequest req = new LogonRequest();
req.setCompanyId(loginProps.getCompanyId());
req.setUserName(loginProps.getUserName());
req.setPassword(loginProps.getPassword());
message("Logging in with companyId={} and userName={}", loginProps.getCompanyId(),
loginProps.getUserName());
String token = null;
try {
LogonResult res = rt.postForObject("/rest/Logon", req, LogonResult.class);
message("Executed the Logon request, the result is {}null", res == null ? "" : "not ");
Assert.notNull(res, "The response is null");
token = res.getToken();
Assert.notNull(token, "The returned token is null");
message("The token is: {}", token);
} catch (HttpServerErrorException ex) {
handleRestException("\nError logging on to the service", ex, true);
} catch (Exception e) {
handleError("\nError communication to the service", e.getMessage(), true);
}
return token;
}
protected void message(String template, Object... args) {
String msg = MessageFormatter.arrayFormat(template, args).getMessage();
System.out.println(msg);
}
protected void handleError(String msg, String errorMessage, boolean rethrow) throws StopProcesingException {
String resMsg = MessageFormatter.arrayFormat("{}{}{}", new String[] { msg, errorMessage == null ? " - " : ": ",
errorMessage == null ? "got a REST exception" : errorMessage }).getMessage();
System.out.println(resMsg);
if (rethrow) {
throw new StopProcesingException();
}
}
protected void handleRestException(String msg, HttpServerErrorException ex, boolean rethrow)
throws StopProcesingException {
String res = null;
try {
String obj = ex.getResponseBodyAsString();
ObjectMapper om = new ObjectMapper();
ErrorResult err = om.readValue(obj, ErrorResult.class);
res = err.getErrorMessage();
} catch (Exception e) {
}
handleError(msg, res, rethrow);
}
}
$(function () {
// please use URL for the service you have subscribed to
var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var url = serviceUrl + "/rest/Logon";
var postObj = {"companyId":"0000", "userName":"loginName","password":"pwd"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
// please use URL for the service you have subscribed to
var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var apiurl = serviceUrl + "/rest/Logon";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
companyId = "0000",
userName = "loginName",
password = "pwd"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
This method is used to authenticate a client/customer. A companyId, userName and password will be provided by Lyons. The call returns an entity containing a unique session token that will expire after 20 minutes of inactivity.
It is recommended to cache this token and keep it alive by calling the RequiredLogon method asynchronously every 15 minutes for as long as needed. If the RequiredLogon method returns true, the Logon method should be called again and the token re-cached.
This approach allows for fast service transactions (as the Logon and Logoff calls are not part of the overall transaction) and minimizes the load to the service.
HTTP Request
POST {base-url}/rest/Logon
Request
| Parameter | Type | Description |
|---|---|---|
| companyId | integer | The ID of the company the user is associated with |
| userName | string | the full username |
| password | string | the full password |
Response
| Parameter | Type | Description |
|---|---|---|
| errorMessage | string | Error message if the call failed; null on success |
| token | string | The session token used to access the service methods |
RequiredLogon
Sub Main(args As String())
''''''''''' Replace service url in below code with your service that you subscribed to in below VB code.
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/RequiredLogon"
Dim inputJson As String = "{""token"":""2274e0da-a70f-4f06-8304-c0938c4c6f75""}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
// Replace service url in below code with your service that you subscribed in below Python code.
serviceUrl = https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/RequiredLogon
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
response = requests.post(serviceUrl, json=data)
protected boolean checkRequiredLogon(RestTemplate rt, String token) throws StopProcesingException {
TokenRequest req = new TokenRequest(token);
boolean res = true;
try {
BooleanResult resObj = rt.postForObject("/rest/RequiredLogon", req, BooleanResult.class);
Assert.notNull(resObj, "The response is null");
res = resObj.isValue();
} catch (HttpServerErrorException ex) {
handleRestException("\nError logging on to the service", ex, true);
} catch (Exception e) {
handleError("\nError communication to the service", e.getMessage(), true);
}
return res;
}
$(function () {
// please use URL for the service you have subscribed to
var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var url = serviceUrl + "/rest/RequiredLogon";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
// please use URL for the service you have subscribed to
var serviceUrl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc"
var apiurl = serviceUrl + "/rest/RequiredLogon";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"value": true
}
This method does not have to be called to use the web services. It is available for client applications to determine if the session has expired.
HTTP Request
POST {base-url}/rest/RequiredLogon
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | the session token returned by the Logon call |
Response
| Parameter | Type | Description |
|---|---|---|
| errorMessage | string | Error message if the call failed; null on success |
| value | boolean | The activity status of the token |
Logoff
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx""}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {
"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
response = requests.post(
'https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff',
json=data)
protected void logoff(RestTemplate rt, String token) {
try {
TokenRequest req = new TokenRequest(token);
rt.postForObject("/rest/Logoff", req, Void.class);
} catch (Exception e) {
// swallowing the exception
}
}
$(function () {
var url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
This method is used to logoff from an authenticated login.
This approach allows for fast service transactions (as the Logon and Logoff calls are not part of the overall transaction) and minimizes the load to the service.
HTTP Request
POST {base-url}/rest/Logoff
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token used to access the service methods |
Account Ownership and Status Verification
/**
*
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
*/
/**
* You can download the binary form of the necessary Lyons Commons library here
* and AOA library here, and upload them in your Maven repository.
*
* Alternatively, you can build the libraries from the respective projects:
* Lyons Commons library project is here
* AOA library project is here
*
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
* Alternatively, Upload the binary form of the libraries here
*
*/
This web service returns a code and/or message to help you determine whether to Accept or Deny a payment transaction for a submitted checking or savings account number.
This web service returns a single, primary financial institution with detailed information for a submitted 9-digit bank routing number. Lyons will first verify the bank routing number as eligible by applying the industry standard Mod10 algorithm. Upon satisfying this requirement, Lyons will determine the existence of the routing/account number, and if found, will then verify the ownership and status of the account as being open and in good standing.
You will be able to download the AOA sample test accounts by clicking here.
Response Codes
| Code | Message |
|---|---|
| -999 | AOA Service failed |
| -70 | Account Ownership details Missing |
| -71 | The First Name is not provided |
| -72 | The Last Name is not provided |
| -73 | Either Business Name or First/Last Name must be provided |
| -75 | SSN length must be 4 or 9 digits |
| -76 | Date Of Birth must be 8 characters in length |
| -77 | Date Of Birth must be numeric |
| -78 | ID Type value must be one character in length. |
| -79 | Internal AOA failure. |
| -63 ~ -61 | Communication Error |
| -54 | Your AOA account preferences are not configured |
| -53 | Customer Present value must be 0 or 1. |
| -52 | Customer Present value must be one character in length. |
| -51 | Customer Present value must be numeric. |
| -43 | Invalid Amount field. |
| -42 | Amount value length (only digits including the cents) exceeds maximum of 12 characters. |
| -41 | Amount value must be numeric. |
| -33 | Account Number length must be 1 to 17 characters long. |
| -31 | Account Number value must be numeric. |
| -30 | Account Number must be entered. |
| -22 | ABA Number must be exactly 9 digits. |
| -21 | ABA value must be numeric. |
| -20 | ABA value must be entered. |
| -2 | Inquiry field length too short. |
| -3 | Inquiry field length too long. |
| -4 | Populated with improper data type or value. |
| -5 | Amount value cannot be zero or less than 0.01 |
| 101 | Accept |
| 103 | Deny |
| 104 | Deny |
| 198 | No Account Experience Available |
| 199 | Insufficient info to make a decision |
CheckAccountStatusWithDates
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountStatusWithDates"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""returnDetails"":""true"", ""accountStatusRequest"":{""rtn"":""xxxxxxxxx"", ""accountNo"":""58004820"", ""amount"":""132.45"", ""customerPresent"":""0"", ""denyNsf"":""0"", ""country"":""US""}}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX"
}
}
response = requests.post('https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountStatusWithDates', json=data)
/**
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param returnDetails Provide "1" or "true" to return primary institution details
* @param accountStatusRequest The account status request payload
* @throws StopProcesingException
*/
public int call(RestTemplate rt, String token, String returnDetails, AccountStatusRequest accountStatusRequest)
throws StopProcesingException {
CheckAccountStatusWithDates req = new CheckAccountStatusWithDates(token, returnDetails, accountStatusRequest);
DetailedStatusCodeResultWithDates res = null;
try {
res = rt.postForObject("/rest/CheckAccountStatusWithDates", req, DetailedStatusCodeResultWithDates.class);
Assert.notNull(res, "The returned DetailedStatusCodeResultWithDates is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling CheckAccountStatusWithDates on the AOA service", ex, false);
} catch (Exception e) {
handleError("\nError calling CheckAccountStatusWithDates on the AOA service", e.getMessage(), false);
}
return res.getStatusCode();
}
$(function () {
var url = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountStatusWithDates";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX"
}
};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountStatusWithDates";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
returnDetails: "XXXX",accountStatusRequest: { rtn: "XXXX",
accountNo: "XXXX",customerPresent: "XXXX",amount: "XXXX",denyNsf: "XXXX",country: "XXXX"
}});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"statusCode": 101,
"statusDescription": "Accept",
"validRtn": true,
"primaryInstitution": {
"name": "DEMO BANK",
"address": "123 MAIN ST",
"city": "ANYTOWN",
"state": "NY",
"postalCode": "10001",
"country": "US",
"phone": "212-555-1234"
},
"lastUpdate": "6 months",
"addClosedDate": "6 months"
}
Return the account status code for an account from the AOA network. When returnDetails is "1" or "true", primary institution details and account date fields are included.
HTTP Request
POST {base-url}/rest/CheckAccountStatusWithDates
Request
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| token | string | The session token returned by the Logon call |
Mandatory field |
| returnDetails | string | Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. | Optional field |
| accountStatusRequest | Object | Account status request details | Mandatory object |
| rtn | string | The routing number to search | Mandatory field |
| accountNo | string | The account number at the financial institution | Mandatory field |
| amount | string | The amount of the transaction.Format(no commas):NNN0.00 | Optional field |
| customerPresent | string | Flag whether the client is present at time of request (provide 1 or 0) | Optional field |
| denyNsf | string | Flag to deny non sufficient funds (provide 1 or 0) | Optional field |
| country | string | Two character country code. | Optional field |
| accountOwner | Object | Do not provide this object. |
Response
| Parameter | Type | Description |
|---|---|---|
| statusCode | number | Numeric representation of account verification |
| statusDescription | string | Description of status code representation of both Account status and Ownership Verification |
| validRtn | boolean | True if the provided routing number is verified. |
| primaryInstitution | Object | Primary financial institution if requested. |
| name | string | Complete name of the financial institution |
| address | string | Physical address line |
| city | string | City |
| state | string | State |
| postalCode | string | Address postal code |
| country | string | Two character country code. |
| phone | string | Main phone number |
| lastUpdate | string | Approximately how long ago the Account was updated |
| addClosedDate | string | Approximately how long ago a closed date was added to the Account |
Error Messages
| Message | Description |
|---|---|
| No Access | User does not have access to this product |
| Internal Error | Internal Application Error, contact system admin |
| Internal Error(Configuration) | No Vendor has been set for this customer product |
| Communication Error(ABA) | Error communicating with ABA web service |
CheckOverallAccountStatusWithOwnersipInfo
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckOverallAccountStatusWithOwnersipInfo"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"",""returnDetails"":""true"",""accountStatusRequest"":{""rtn"":""xxxxxxxxx"", ""accountNo"":""58004820"", ""amount"":""132.45"", ""customerPresent"":""0"", ""denyNsf"":""0"", ""country"":""US"",""accountOwner"":{ ""firstName"":""xxxxxxxxx"", ""lastName"":""XXXXX"", ""middleName"":""M"", ""namePfx"":""Mr"",""nameSfx"":""Jr"", ""businessName"":""XXXXX"", ""address1"":""123 Main St"", ""address2"":""Apt 1"", ""city"":""Anytown"", ""state"":""TX"",""zip"":""75001"", ""ssn"":""XXXXXXXXX"", ""dob"":""19800101"", ""idType"":""1"",""idNo"":""1"", ""idState"":""TX""}}}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX",
"accountOwner":
{
"firstName": "XXXX",
"lastName": "XXXX",
"middleName": "XXXX",
"namePfx": "XX",
"nameSfx": "XXXX",
"businessName": "XXXX",
"address1": "XXXX",
"address2": "XXXX",
"city": "XXXX",
"state": "XXXX",
"zip": "XXXX",
"ssn": "XXXX",
"dob": "XXXX",
"idType": "XXXX",
"idNo": "XXXX",
"idState": "XXXX"
}
}
}
response = requests.post('https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckOverallAccountStatusWithOwnersipInfo', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param returnDetails Provide "1" or "true" to return primary institution details
* @param accountStatusRequest The account status request payload (including accountOwner)
* @throws StopProcesingException
*/
public int call(RestTemplate rt, String token, String returnDetails, AccountStatusRequest accountStatusRequest)
throws StopProcesingException {
CheckOverallAccountStatusWithOwnersipInfo req = new CheckOverallAccountStatusWithOwnersipInfo(token, returnDetails, accountStatusRequest);
StatusCodeResult res = null;
try {
res = rt.postForObject("/rest/CheckOverallAccountStatusWithOwnersipInfo", req, StatusCodeResult.class);
Assert.notNull(res, "The returned StatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling CheckOverallAccountStatusWithOwnersipInfo on the AOA service", ex, false);
} catch (Exception e) {
handleError("\nError calling CheckOverallAccountStatusWithOwnersipInfo on the AOA service", e.getMessage(), false);
}
return res.getStatusCode();
}
$(function () {
var url = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckOverallAccountStatusWithOwnersipInfo";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX",
"accountOwner":
{
"firstName": "XXXX",
"lastName": "XXXX",
"middleName": "XXXX",
"namePfx": "XX",
"nameSfx": "XXXX",
"businessName": "XXXX",
"address1": "XXXX",
"address2": "XXXX",
"city": "XXXX",
"state": "XXXX",
"zip": "XXXX",
"ssn": "XXXX",
"dob": "XXXX",
"idType": "XXXX",
"idNo": "XXXX",
"idState": "XXXX"
}
}
};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckOverallAccountStatusWithOwnersipInfo";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
returnDetails: "XXXX",accountStatusRequest: { rtn: "XXXX",
accountNo: "XXXX",customerPresent: "XXXX",amount: "XXXX",denyNsf: "XXXX",country: "XXXX",
accountOwner: {firstName: "XXXX",lastName: "XXXX", middleName: "XXXX",namePfx: "XX",
nameSfx: "XXXX",businessName: "XXXX",address1: "XXXX",address2: "XXXX",city: "XXXX",
state: "XXXX",zip: "XXXX",ssn: "XXXX",dob: "XXXX",idType: "XXXX",idNo: "XXXX",
idState: "XXXX"}}});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": "",
"statusCode": 101,
"validRtn": true,
"overallStatusCode": 101,
"businessOrFullNameMatch": "Y",
"firstNameMatch": "U",
"lastNameMatch": "U",
"cityMatch": "Y",
"stateMatch": "Y",
"zipMatch": "Y",
"ssnOrDobMatch": "Y",
"idMatch": "U",
"primaryInstitution": {
"name": "XXXXXX_XXXXXX",
"address": "XXXXXXXXXXXXXXX",
"city": "XXXX",
"state": "MD",
"postalCode": "XXXXX-0000",
"country": "US",
"phone": "301-602-XXXX"
},
"lastUpdate": "6 months",
"addClosedDate": "6 months"
}
Returns both Account status code and Account Ownership Status code for an account from the AOA network.
HTTP Request
POST {base-url}/rest/CheckOverallAccountStatusWithOwnersipInfo
Request
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| token | string | The session token returned by the Logon call |
Mandatory field |
| returnDetails | string | Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. | Optional field |
| accountStatusRequest | Object | Account status request details | Mandatory object |
| rtn | string | The routing number to search | Mandatory field |
| accountNo | string | The account number at the financial institution | Mandatory field |
| amount | string | The amount of the transaction.Format(no commas):NNN0.00 | Optional field |
| customerPresent | string | Flag whether the client is present at time of request (provide 1 or 0) | Optional field |
| denyNsf | string | Flag to deny non sufficient funds (provide 1 or 0) | Optional field |
| country | string | Two character country code. | Optional field |
| accountOwner | Object | Account Owner details | Mandatory object |
| firstName | string | The first name of the Account owner | Mandatory field if Business Name not provided |
| lastName | string | The last name of the Account owner | Mandatory field if Business Name not provided |
| middleName | string | The middle name of the Account owner | Optional field |
| namePfx | string | The Name Prefix | Optional field |
| nameSfx | string | The Name Suffix | Optional field |
| businessName | string | The Business Name of Account owner | Mandatory field if First Name and Last name not provided |
| address1 | string | The Address Line 1 of Account owner | Optional field |
| address2 | string | The Address Line 2 of Account owner | Optional field |
| city | string | The City of Account owner | Optional field |
| state | string | The State abbreviation of the Account owner | Optional field |
| zip | string | The zip of the Account owner. Format: NNNNN[-NNNN] | Optional field |
| ssn | string | The SSN of the Account owner | Optional field |
| dob | string | The date of birth of the Account owner. Format: YYYYMMDD | Optional field |
| idType | string | The Valid ID Types | Optional field**1 |
| idNo | string | The ID Number | Optional field |
| idState | string | The ID state abbreviation | Optional field |
Notes: * 1 - Valid ID Types are
| ID Types | Value | Description |
|---|---|---|
| 0 | Drivers License USA | |
| 1 | Military USA | |
| 2 | Passport | |
| 3 | Resident Alien ID | |
| 4 | State identification | |
| 5 | Student identification | |
| 6 | Drivers License foreign | |
| 7 | Drivers License Canada | |
| 8 | Drivers License Mexico | |
| 9 | Other primary ID foreign | |
| A | Matricula Consular card | |
| B | South America Cedula |
Response
| Parameter | Type | Description |
|---|---|---|
| statusCode | number | Numeric representation of account verification |
| validRtn | boolean | True if the provided routing number is verified. |
| ownershipStatusCode | number | Numeric representation of account Ownership verification |
| overallStatusCode | number | Numeric representation of combined status(Account status and Ownership) verification |
| businessOrFullNameMatch | string | Indicates if Business or full name is matched |
| firstNameMatch | string | Indicates if first name is matched |
| lastNameMatch | string | Indicates if last name is matched |
| cityMatch | string | Indicates if city name is matched |
| stateMatch | string | Indicates if state name is matched |
| zipMatch | string | Indicates if zip code is matched |
| ssnOrDobMatch | string | Indicates if ssn or date of birth is matched |
| idMatch | string | Indicates if id is matched |
| primaryInstitution | Object | Primary financial institution if requested. |
| name | string | Complete name of the financial institution |
| address | string | Physical address line |
| city | string | City |
| state | string | State |
| postalCode | string | Address postal code |
| country | string | Two character country code. |
| phone | string | Main phone number |
| lastUpdate | string | Approximately how long ago the Account was updated |
| addClosedDate | string | Approximately how long ago a closed date was added to the Account |
Error Messages
| Message | Description |
|---|---|
| No Access | User does not have access to this product |
| Internal Error | Internal Application Error, contact system admin |
| Internal Error(Configuration) | No Vendor has been set for this customer product |
| Communication Error(AOA) | Error communicating with AOA web service |
CheckAccountOwnershipDetailsWithDates
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountOwnershipDetailsWithDates"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"",""returnDetails"":""true"",""accountStatusRequest"":{""rtn"":""xxxxxxxxx"", ""accountNo"":""58004820"", ""amount"":""132.45"", ""customerPresent"":""0"", ""denyNsf"":""0"", ""country"":""US"",""accountOwner"":{ ""firstName"":""xxxxxxxxx"", ""lastName"":""XXXXX"", ""middleName"":""M"", ""namePfx"":""Mr"",""nameSfx"":""Jr"", ""businessName"":""XXXXX"", ""address1"":""123 Main St"", ""address2"":""Apt 1"", ""city"":""Anytown"", ""state"":""TX"",""zip"":""75001"", ""ssn"":""XXXXXXXXX"", ""dob"":""19800101"", ""idType"":""1"",""idNo"":""1"", ""idState"":""TX""}}}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX",
"accountOwner":
{
"firstName": "XXXX",
"lastName": "XXXX",
"middleName": "XXXX",
"namePfx": "XX",
"nameSfx": "XXXX",
"businessName": "XXXX",
"address1": "XXXX",
"address2": "XXXX",
"city": "XXXX",
"state": "XXXX",
"zip": "XXXX",
"ssn": "XXXX",
"dob": "XXXX",
"idType": "XXXX",
"idNo": "XXXX",
"idState": "XXXX"
}
}
}
response = requests.post('https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountOwnershipDetailsWithDates', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param returnDetails Provide "1" or "true" to return primary institution details
* @param accountStatusRequest The account status request payload (including accountOwner)
* @throws StopProcesingException
*/
public int call(RestTemplate rt, String token, String returnDetails, AccountStatusRequest accountStatusRequest)
throws StopProcesingException {
CheckAccountOwnershipDetailsWithDates req = new CheckAccountOwnershipDetailsWithDates(token, returnDetails, accountStatusRequest);
StatusCodeResult res = null;
try {
res = rt.postForObject("/rest/CheckAccountOwnershipDetailsWithDates", req, StatusCodeResult.class);
Assert.notNull(res, "The returned StatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling CheckAccountOwnershipDetailsWithDates on the AOA service", ex, false);
} catch (Exception e) {
handleError("\nError calling CheckAccountOwnershipDetailsWithDates on the AOA service", e.getMessage(), false);
}
return res.getStatusCode();
}
$(function () {
var url = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountOwnershipDetailsWithDates";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "returnDetails": "XXXX", "accountStatusRequest": { "rtn": "XXXX",
"accountNo": "XXXX",
"customerPresent": "XXXX",
"amount": "XXXX",
"denyNsf": "XXXX",
"country": "XXXX",
"accountOwner":
{
"firstName": "XXXX",
"lastName": "XXXX",
"middleName": "XXXX",
"namePfx": "XX",
"nameSfx": "XXXX",
"businessName": "XXXX",
"address1": "XXXX",
"address2": "XXXX",
"city": "XXXX",
"state": "XXXX",
"zip": "XXXX",
"ssn": "XXXX",
"dob": "XXXX",
"idType": "XXXX",
"idNo": "XXXX",
"idState": "XXXX"
}
}
};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/aoa/AOAServiceWCF.svc/rest/CheckAccountOwnershipDetailsWithDates";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
returnDetails: "XXXX",accountStatusRequest: { rtn: "XXXX",
accountNo: "XXXX",customerPresent: "XXXX",amount: "XXXX",denyNsf: "XXXX",country: "XXXX",
accountOwner: {firstName: "XXXX",lastName: "XXXX", middleName: "XXXX",namePfx: "XX",
nameSfx: "XXXX",businessName: "XXXX",address1: "XXXX",address2: "XXXX",city: "XXXX",
state: "XXXX",zip: "XXXX",ssn: "XXXX",dob: "XXXX",idType: "XXXX",idNo: "XXXX",
idState: "XXXX"}}});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": "",
"statusCode": 101,
"validRtn": true,
"businessOrFullNameMatch": "Y",
"firstNameMatch": "U",
"lastNameMatch": "U",
"cityMatch": "Y",
"stateMatch": "Y",
"zipMatch": "Y",
"ssnOrDobMatch": "Y",
"idMatch": "U",
"primaryInstitution": {
"name": "XXXXXX_XXXXXX",
"address": "XXXXXXXXXXXXXXX",
"city": "XXXX",
"state": "MD",
"postalCode": "XXXXX-0000",
"country": "US",
"phone": "301-602-XXXX"
},
"lastUpdate": "6 months",
"addClosedDate": "6 months"
}
Returns both Account status code and Account Ownership Status code for an account from the AOA network.
HTTP Request
POST {base-url}/rest/CheckAccountOwnershipDetailsWithDates
Request
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| token | string | The session token returned by the Logon call |
Mandatory field |
| returnDetails | string | Provide 1 or true to return primary institution details.Provide 0 or false if you do not require primary institution details. | Optional field |
| accountStatusRequest | Object | Account status request details | Mandatory object |
| rtn | string | The routing number to search | Mandatory field |
| accountNo | string | The account number at the financial institution | Mandatory field |
| amount | string | The amount of the transaction.Format(no commas):NNN0.00 | Optional field |
| customerPresent | string | Flag whether the client is present at time of request (provide 1 or 0) | Optional field |
| denyNsf | string | Flag to deny non sufficient funds (provide 1 or 0) | Optional field |
| country | string | Two character country code. | Optional field |
| accountOwner | Object | Account Owner details | Mandatory object |
| firstName | string | The first name of the Account owner | Mandatory field if Business Name not provided |
| lastName | string | The last name of the Account owner | Mandatory field if Business Name not provided |
| middleName | string | The middle name of the Account owner | Optional field |
| namePfx | string | The Name Prefix | Optional field |
| nameSfx | string | The Name Suffix | Optional field |
| businessName | string | The Business Name of Account owner | Mandatory field if First Name and Last name not provided |
| address1 | string | The Address Line 1 of Account owner | Optional field |
| address2 | string | The Address Line 2 of Account owner | Optional field |
| city | string | The City of Account owner | Optional field |
| state | string | The State abbreviation of the Account owner | Optional field |
| zip | string | The zip of the Account owner. Format: NNNNN[-NNNN] | Optional field |
| ssn | string | The SSN of the Account owner | Optional field |
| dob | string | The date of birth of the Account owner. Format: YYYYMMDD | Optional field |
| idType | string | The Valid ID Types | Optional field**1 |
| idNo | string | The ID Number | Optional field |
| idState | string | The ID state abbreviation | Optional field |
Notes: * 1 - Valid ID Types are
| ID Types | Value | Description |
|---|---|---|
| 0 | Drivers License USA | |
| 1 | Military USA | |
| 2 | Passport | |
| 3 | Resident Alien ID | |
| 4 | State identification | |
| 5 | Student identification | |
| 6 | Drivers License foreign | |
| 7 | Drivers License Canada | |
| 8 | Drivers License Mexico | |
| 9 | Other primary ID foreign | |
| A | Matricula Consular card | |
| B | South America Cedula |
Response
| Parameter | Type | Description |
|---|---|---|
| statusCode | number | Numeric representation of account verification |
| validRtn | boolean | True if the provided routing number is verified. |
| businessOrFullNameMatch | string | Indicates if Business or full name is matched |
| firstNameMatch | string | Indicates if first name is matched |
| lastNameMatch | string | Indicates if last name is matched |
| cityMatch | string | Indicates if city name is matched |
| stateMatch | string | Indicates if state name is matched |
| zipMatch | string | Indicates if zip code is matched |
| ssnOrDobMatch | string | Indicates if ssn or date of birth is matched |
| idMatch | string | Indicates if id is matched |
| primaryInstitution | Object | Primary financial institution if requested. |
| name | string | Complete name of the financial institution |
| address | string | Physical address line |
| city | string | City |
| state | string | State |
| postalCode | string | Address postal code |
| country | string | Two character country code. |
| phone | string | Main phone number |
| lastUpdate | string | Approximately how long ago the Account was updated |
| addClosedDate | string | Approximately how long ago a closed date was added to the Account |
Error Messages
| Message | Description |
|---|---|
| No Access | User does not have access to this product |
| Internal Error | Internal Application Error, contact system admin |
| Internal Error(Configuration) | No Vendor has been set for this customer product |
| Communication Error(AOA) | Error communicating with AOA web service |
OFAC
/**
*
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
*/
/**
* You can download the binary form of the necessary Lyons Commons library here
* and OFAC library here, and upload them in your Maven repository.
*
* Alternativelly, you can build the libraries from the respectiv projects:
* Lyons Commons library project is here
* OFAC library project is here
*
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
* Alternativelly, Upload the binary form of the libraries here
*/
Returns results for a name scanned against the OFAC list This web service cross-references a submitted name against the Office of Foreign Asset Controls (OFAC) SDN watch list, the Bureau of Industry and Security (BIS) Denied Persons list, and the new Non-SDN list (NS-PLC). The function returns any potential matches along with a score, indicating the likelihood of an actual match. Lyons will scan the Specially Designated Nations (SDN) and the Bureau of Industry and Security (BIS) Denied Person List for your submitted names and/or country. The results are returned with a weighted score, aliases, the entity type and the list(s) where the name was found.
OFACLogonScanName
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACLogonScanName"
Dim inputJson As String = "{""companyId"":""xxxxxxxx"", ""userName"":""xxxxxxxxx"", ""password"":""XXXXXXXX"", ""name"":""XXXXXX"" }"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"companyId":"0000", "userName":"loginName","password":"pwd", "name":"testName"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACLogonScanName', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param companyID The ID of the company the user is associated with
* @param userName The full username
* @param password The full password
* @param name The full name to be scanned against the OFAC list
* @throws StopProcesingException
*/
public List<Entity> call(RestTemplate rt, String companyID, String userName, String password, String name)
throws StopProcesingException {
OFACLogonScanNameRequest req = new OFACLogonScanNameRequest(companyID, userName, password, name);
EntityListResult res = null;
try {
res = rt.postForObject("/rest/OFACLogonScanName", req, EntityListResult.class);
Assert.notNull(res, "The returned EntityListResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling OFACLogonScanName on the OFAC service", ex, false);
} catch (Exception e) {
handleError("\nError calling OFACLogonScanName on the OFAC service", e.getMessage(), false);
}
return res.getEntities();
}
$(function () {
var url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACLogonScanName";
var postObj = {"companyId":"0000", "userName":"loginName","password":"pwd", "name":"testName"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACLogonScanName";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
companyId:"0000",
userName:"loginName",
password:"pwd",
name:"testName"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"entities": [
{
"entityNumber": 12071,
"fullName": "HAAMI",
"entityType": "vessel",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 80
},
{
"entityNumber": 15051,
"fullName": "HAMOON",
"entityType": "fka",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 84.21052631578948
}
]
}
OFAC Logon to service and checks an individuals name or company's name against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Security (BIS) Denied Persons list and the Non-SDN list (NS-PLC).
HTTP Request
POST {base-url}/rest/OFACLogonScanName
Request
| Parameter | Type | Description |
|---|---|---|
| companyId | int | The ID of the company the user is associated with |
| userName | string | the full username |
| password | string | the full password |
| name | string | full name for search query |
Response
| Parameter | Type | Description |
|---|---|---|
| entityNumber | integer | A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name). |
| fullName | string | The full name of the entity. |
| nameForProcessing | string | The adjusted entity name that was used for matching. |
| nameInAscii | string | The ASCII equivalent of the name. |
| entityType | string | Identifies the entity as a person, business, vessel, etc. |
| country | string | Two character country code. |
| listType | string | The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc. |
| guid | string | A temporary globally unique identifier for referencing this entity. This identifier will changes hourly. |
| score | double | An indicator with values between 80 and 100 of the matching likelihood. |
Error Messages
| Message | Description |
|---|---|
| Internal system error - 67 | Internal system error, please contact system admin |
| Must pass a name when searching. | Empty search name |
OFACScanName
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanName"
Dim inputJson As String = "{""token"":""xxxxxxxx"", ""name"":""XXXXXX"" }"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanName', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param name The full name to be scanned against the OFAC list
* @throws StopProcesingException
*/
public List<Entity> call(RestTemplate rt, String token, String name)
throws StopProcesingException {
OFACScanNameRequest req = new OFACScanNameRequest(token, name);
EntityListResult res = null;
try {
res = rt.postForObject("/rest/OFACScanName", req, EntityListResult.class);
Assert.notNull(res, "The returned EntityListResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling OFACScanName on the OFAC service", ex, false);
} catch (Exception e) {
handleError("\nError calling OFACScanName on the OFAC service", e.getMessage(), false);
}
return res.getEntities();
}
$(function () {
var url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanName";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanName";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
name:"testName"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"entities": [
{
"entityNumber": 12071,
"fullName": "HAAMI",
"entityType": "vessel",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 80
},
{
"entityNumber": 15051,
"fullName": "HAMOON",
"entityType": "fka",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 84.21052631578948
}
]
}
Checks an individuals name or company's name against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Securitys (BIS) Denied Persons list and the Non-SDN list (NS-PLC).
HTTP Request
POST {base-url}/rest/OFACScanName
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | the session token returned by the Logon call |
| name | string | full name for search query |
Response
| Parameter | Type | Description |
|---|---|---|
| entityNumber | integer | A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name). |
| fullName | string | The full name of the entity. |
| nameForProcessing | string | The adjusted entity name that was used for matching. |
| nameInAscii | string | The ASCII equivalent of the name. |
| entityType | string | Identifies the entity as a person, business, vessel, etc. |
| country | string | Two character country code. |
| listType | string | The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc. |
| guid | string | A temporary globally unique identifier for referencing this entity. This identifier will changes hourly. |
| score | double | An indicator with values between 80 and 100 of the matching likelihood. |
Error Messages
| Message | Description |
|---|---|
| Internal system error - 89 | Internal system error, please contact system admin |
| Must pass a name when searching. | Empty search name |
OFACScanCountry
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanCountry"
Dim inputJson As String = "{""token"":""xxxxxxxx"", ""name"":""XXXXXX"", ""country"":""UNITED STATES"" }"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanCountry', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param name The full name to be scanned
* @param country The country name or 2-letter country code
* @throws StopProcesingException
*/
public List<Entity> call(RestTemplate rt, String token, String name, String country)
throws StopProcesingException {
OFACScanCountryRequest req = new OFACScanCountryRequest(token, name, country);
EntityListResult res = null;
try {
res = rt.postForObject("/rest/OFACScanCountry", req, EntityListResult.class);
Assert.notNull(res, "The returned EntityListResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling OFACScanCountry on the OFAC service", ex, false);
} catch (Exception e) {
handleError("\nError calling OFACScanCountry on the OFAC service", e.getMessage(), false);
}
return res.getEntities();
}
$(function () {
var url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanCountry";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanCountry";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
name:"testName",
country:"UNITED STATES"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"entities": [
{
"entityNumber": 12071,
"fullName": "HAAMI",
"entityType": "vessel",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 80
},
{
"entityNumber": 15051,
"fullName": "HAMOON",
"entityType": "fka",
"country": "",
"listType": "sdn",
"guid": "f67926ed-79b8-4fd8-b30f-d47b5032a23c",
"score": 84.21052631578948
}
]
}
Checks an individuals name or company's name along with country against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Security (BIS) Denied Persons list and the Non-SDN list (NS-PLC).
HTTP Request
POST {base-url}/rest/OFACScanCountry
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | the session token returned by the Logon call |
| name | string | full name for search query |
| country | string | Two character country code. |
Response
| Parameter | Type | Description |
|---|---|---|
| entityNumber | integer | A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name). |
| fullName | string | The full name of the entity. |
| nameForProcessing | string | The adjusted entity name that was used for matching. |
| nameInAscii | string | The ASCII equivalent of the name. |
| entityType | string | Identifies the entity as a person, business, vessel, etc. |
| country | string | Two character country code. |
| listType | string | The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc. |
| guid | string | A temporary globally unique identifier for referencing this entity. This identifier will changes hourly. |
| score | double | An indicator with values between 80 and 100 of the matching likelihood. |
Error Messages
| Message | Description |
|---|---|
| Internal system error - 162 | Internal system error, please contact system admin |
| Internal system error - 163 | Internal system error, please contact system admin |
| Internal system error - 214 | Error looking up country name |
| Internal system error - 240 | Error looking up country code |
| Must pass either a name and/or a valid country name or its 2-letter code when searching. [XX] is not a valid country code. | Invalid country code |
| Must pass a name when searching. | Empty search name |
| Must pass either a name and/or a valid country name or its 2-letter code when searching | invalid search parameters |
GetCountryList
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx""}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @throws StopProcesingException
*/
public List<Country> call(RestTemplate rt, String token)
throws StopProcesingException {
TokenRequest req = new TokenRequest(token);
CountryListResult res = null;
try {
res = rt.postForObject("/rest/GetCountryList", req, CountryListResult.class);
Assert.notNull(res, "The returned CountryListResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetCountryList on the OFAC service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetCountryList on the OFAC service", e.getMessage(), false);
}
return res.getCountries();
}
$(function () {
var url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"countries": [
{
"code": "AF",
"name": "AFGHANISTAN"
},
{
"code": "AL",
"name": "ALBANIA"
},
{
"code": "DZ",
"name": "ALGERIA"
},
{
"code": "AO",
"name": "ANGOLA"
},
{
"code": "AR",
"name": "ARGENTINA"
},
{
"code": "AM",
"name": "ARMENIA"
},
{
"code": "AW",
"name": "ARUBA"
}
]
}
Returns a list of countries from the OFAC database.
HTTP Request
POST {base-url}/rest/GetCountryList
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | the session token returned by the Logon call |
Response
| Parameter | Type | Description |
|---|---|---|
| code | string | Country 2 letter code |
| name | string | Full country name |
Error Messages
| Message | Description |
|---|---|
| Internal system error - 187 | Internal system error, please contact system admin |
| Internal system error - 188 | Internal system error, please contact system admin |
OFACScanNameFullRecord
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanNameFullRecord"
Dim inputJson As String = "{""token"":""xxxxxxxx"", ""name"":""XXXXXX"", ""country"":""UNITED STATES"" }"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanNameFullRecord', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param name The full name to be scanned
* @param country The country name or 2-letter country code
* @throws StopProcesingException
*/
public List<FullEntity> call(RestTemplate rt, String token, String name, String country)
throws StopProcesingException {
OFACScanNameFullRecordRequest req = new OFACScanNameFullRecordRequest(token, name, country);
FullEntityListResult res = null;
try {
res = rt.postForObject("/rest/OFACScanNameFullRecord", req, FullEntityListResult.class);
Assert.notNull(res, "The returned FullEntityListResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling OFACScanNameFullRecord on the OFAC service", ex, false);
} catch (Exception e) {
handleError("\nError calling OFACScanNameFullRecord on the OFAC service", e.getMessage(), false);
}
return res.getEntities();
}
$(function () {
var url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanNameFullRecord";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"};
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanNameFullRecord";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
name:"testName",
country:"UNITED STATES"
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"entities": [
{
"entityNumber": 419265,
"fullName": "Khalil Ben Ahmed Ben Mohamed Jarraya",
"entityType": "Individual",
"country": "Italy",
"listType": null,
"guid": "14d10643-ae9b-4e94-9b9b-311c3f47f531",
"score": 100,
"program": null,
"remarks": "Legal Basis: 787/2010 (OJ L234); 76/2006 (OJ L12) | Reg Date: 2010-09-03; 2006-01-18",
"sdnType": null,
"title": null,
"callSign": null,
"vessType": null,
"vessTonnage": null,
"vessGRT": null,
"vessFlag": null,
"vessOwner": null,
"dob": "1970-08-XX",
"passport": "K989895",
"additionalAddress": [
{
"address": null,
"city": "Nuoro",
"state": null,
"postalCode": null,
"country": "Italy",
"addrRemarks": null
}
],
"additionalAlias": [
{
"fullName": "Khalil Yarraya",
"entType": "AKA",
"remarks": "Legal Basis: 2145/2004 (OJ L370) | Reg Date: 2004-12-17"
},
{
"fullName": "Ben Narvan Abdel Aziz",
"entType": "AKA",
"remarks": "Legal Basis: 2145/2004 (OJ L370) | Reg Date: 2004-12-17"
},
{
"fullName": "Amro",
"entType": "AKA",
"remarks": "Legal Basis: 76/2006 (OJ L12) | Reg Date: 2006-01-18"
},
{
"fullName": "Omar",
"entType": "AKA",
"remarks": "Legal Basis: 76/2006 (OJ L12) | Reg Date: 2006-01-18"
},
{
"fullName": "Amrou",
"entType": "AKA",
"remarks": "Legal Basis: 76/2006 (OJ L12) | Reg Date: 2006-01-18"
},
{
"fullName": "Amr",
"entType": "AKA",
"remarks": "Legal Basis: 76/2006 (OJ L12) | Reg Date: 2006-01-18"
},
{
"fullName": "Abdel Aziz Ben Narvan",
"entType": "AKA",
"remarks": "Legal Basis: 1291/2007 (OJ L287) | Reg Date: 2007-11-01"
}
]
}
]
}
Checks an individuals name or company's name along with country against the Office of Foreign Assets Controls (OFAC) SDN watch list, Bureau of Industry and Security (BIS) Denied Persons list and the Non-SDN list (NS-PLC) and retrieve the full list information for that search.
HTTP Request
POST {base-url}/rest/OFACScanNameFullRecord
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | the session token returned by the Logon call |
| name | string | full name for search query |
| country | string | Two character country code. |
Response
| Parameter | Type | Description |
|---|---|---|
| entityNumber | integer | A unique number within the list or index of results list. Two records having the same entityNumber means the has addresses in two different countries or an entity has an alternative identity - the entity is known by another name). |
| fullName | string | The full name of the entity. |
| nameForProcessing | string | The adjusted entity name that was used for matching. |
| nameInAscii | string | The ASCII equivalent of the name. |
| entityType | string | Identifies the entity as an individual, aircraft, vessel, etc. |
| country | string | Two character country code. |
| listType | string | The list in which it appears. Abbreviations may be used, e.g. "SDN" for "Specially Designated Nationals", "bis_dpl" for "Denied Persons List", "PLC" for "Palestinian Legislative Council", etc. |
| guid | string | A temporary globally unique identifier for referencing this entity. This identifier will changes hourly. |
| score | double | An indicator with values between 80 and 100 of the matching likelihood. |
| program | string | The name/abbreviation of the sanction program. |
| remarks | string | Additional information, if any, about the entity. |
| sdnType | string | Currently it is the same as the entityType. |
| title | string | If the entity is an individual, the individual's title. |
| callSign | string | If the entity is a vessel, the vessel's call sign. |
| vessType | string | The vessel type, e.g. "Bulk Cargo", "Container Ship", "Ferry", etc. |
| vessTonnage | string | The vessel's tonnage. |
| vessGRT | string | The vessel's gross registered tonnage. |
| vessFlag | string | The vessel's flag. |
| vessOwner | string | The vessel's owner. |
| dob | string | date of birth of the entity (blank) |
| passport | string | If an entity is an individual, this is the passport number. |
| additionalAddress | Object List | A list of addresses the entity is known to possess. |
| - address | string | The full address for the additional address. |
| - city | string | The city for the additional address. |
| - state | string | The state for the additional address. |
| - postalCode | string | The postal code for the additional address. |
| - country | string | Two character country code. |
| - addrRemarks | string | Additional information about the address. |
| additionalAlias | Object List | A list of alternative identities of the entity. |
| - fullName | string | The full name of the entity. |
| - entType | string | Identifies the entity as a person, business, vessel, etc. |
| - remarks | string | Additional information about the address. |
Error Messages
| Message | Description |
|---|---|
| Internal system error - 167 | Internal system error, please contact system admin |
| Internal system error - 214 | Error looking up country name |
| Internal system error - 240 | Error looking up country code |
| [XX] is not a valid country code. | Invalid country code |
| Must pass a name when searching. | Empty search name |
| Must pass either a name or a valid country name or its 2-letter code when searching | invalid search parameters |
RTN
/**
*
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
*/
/**
* You can download the binary form of the necessary Lyons Commons library here
* and RTN library here, and upload them in your Maven repository.
*
* Alternatively, you can build the libraries from the respective projects:
* Lyons Commons library project is here
* RTN library project is here
* You can find fully functional example client project here.
* Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
*
* Alternativelly, Upload the binary form of the libraries here
*/
The RTN Web Service API provides the most information about each institution including main and branch information with institution names, routing numbers, addresses, phone numbers and much more. Currently the RTN service provides information for both US and Canadian financial institutions.
Lyons will determine if the routing number is currently active, and will return the routing and demographic information for the institution associated with the searched routing number.
Check under each code language tab for example projects that demonstrate how to correctly use the web service contracts and proper configurations for the service and the method calls.
Error Messages
| Message | Description |
|---|---|
| Internal server error | Internal Application Error, contact system admin |
| No financial institutions found | No financial institutions found for that ABA |
VerifyRTN
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyRTN"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""rtn"":""XXXXXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyRTN', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param rtn The routing number to verify
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public Boolean call(RestTemplate rt, String token, String rtn, String country, Boolean includeInactive, Boolean includeHistory)
throws StopProcesingException {
RtnRequest req = new RtnRequest(token, rtn, country, includeInactive, includeHistory);
BooleanResult res = null;
try {
res = rt.postForObject("/rest/VerifyRTN", req, BooleanResult.class);
Assert.notNull(res, "The returned Boolean is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling VerifyRTN on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling VerifyRTN on the RTN service", e.getMessage(), false);
}
return res.isValue();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyRTN";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":false, "includeHistory":false };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyRTN";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
rtn = "xxxxxxxxx",
country = "CA",
includeInactive = false,
includeHistory = false
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"value": true
}
Lookup Routing Number on Lyons Server and return true if found.
HTTP Request
POST {base-url}/rest/VerifyRTN
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| rtn | string | Routing number to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| value | boolean | true if the routing number was found |
VerifyWire(RTN)
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyWire"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""rtn"":""XXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyWire', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param rtn The wire routing number to verify
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public Boolean call(RestTemplate rt, String token, String rtn, String country, Boolean includeInactive, Boolean includeHistory)
throws StopProcesingException {
RtnRequest req = new RtnRequest(token, rtn, country, includeInactive, includeHistory);
BooleanResult res = null;
try {
res = rt.postForObject("/rest/VerifyWire", req, BooleanResult.class);
Assert.notNull(res, "The returned Boolean is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling VerifyWire on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling VerifyWire on the RTN service", e.getMessage(), false);
}
return res.isValue();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyWire";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":false,"includeHistory":false };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/VerifyWire";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
rtn = "xxxxxxxxx",
country = "CA",
includeInactive = false,
includeHistory = false
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"value": true
}
Lookup the Routing Number as a wire on Lyons Server and return true if found.
HTTP Request
POST {base-url}/rest/VerifyWire
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| rtn | string | Routing number to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| value | boolean | true if the routing number was found as a wire routing number |
GetInstitutionsDetailsPrimaryFirst(RTN)
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""rtn"":""XXXXXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeWireSearch"":true, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA","includeInactive":true, "includeWireSearch":true, "includeHistory":true }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param rtn The routing number to search
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeWireSearch If true, wire routing numbers are included in the search
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public List<Institution> call(RestTemplate rt, String token, String rtn, String country, Boolean includeInactive, Boolean includeWireSearch, Boolean includeHistory)
throws StopProcesingException {
RtnRequest req = new RtnRequest(token, rtn, country, includeInactive, includeWireSearch, includeHistory);
InstitutionListResult res = null;
try {
res = rt.postForObject("/rest/GetInstitutionsDetailsPrimaryFirst", req, InstitutionListResult.class);
Assert.notNull(res, "The returned Institution List is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetInstitutionsDetailsPrimaryFirst on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetInstitutionsDetailsPrimaryFirst on the RTN service", e.getMessage(), false);
}
return res.getInstitutions();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":true,"includeWireSearch":true,"includeHistory":true };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
rtn = "xxxxxxxxx",
country = "CA",
includeInactive = true,
includeWireSearch = true,
includeHistory = true
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"institutions": [
{
"institutionId": 1,
"legacyLyonsId": 1234,
"mainInstitutionId": null,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "STATE BANK OF MISSOURI",
"branchName": "STATE BANK OF MISSOURI",
"addressLine1": "101 NW 2ND ST",
"addressLine2": null,
"city": "CONCORDIA",
"state": "MO",
"country": "US",
"postalCode": "64020-0000",
"mailingAddr": "PO BOX 819; CONCORDIA, MO 64020",
"fedWire": false,
"swift": "",
"fax": "660-463-2196",
"telex": "",
"homePage": "www.gostatebank.com",
"notes": "",
"active": true,
"branchCount": 5,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXXX19",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:18:15.980-04:00"
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:17:15.390-04:00"
}
]
}
],
"contacts": [
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 1,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"account": null,
"institutionName": "UMB BANK, NA",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "XXXXXXX",
"participant": true,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
},
{
"institutionId": 2,
"legacyLyonsId": 5678,
"mainInstitutionId": 1,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "STATE BANK OF MISSOURI",
"branchName": "STATE BANK OF MISSOURI",
"addressLine1": "114 S COUNTY RD",
"addressLine2": null,
"city": "ALMA",
"state": "MO",
"country": "US",
"postalCode": "64001-0000",
"mailingAddr": "PO BOX 199; ALMA, MO 64001",
"fedWire": false,
"swift": "",
"fax": "660-674-2801",
"telex": "",
"homePage": "www.gostatebank.com",
"notes": "",
"active": true,
"branchCount": 0,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXXX19",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:23:21.830-04:00"
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:21:10.373-04:00"
}
]
}
],
"contacts": [
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 86699,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"account": null,
"institutionName": "UMB BANK, NA",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "UMKCUS44",
"participant": true,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
}
]
}
Returns a list of financial institutions with full details for an RTN sorted by main locations first.
The mainInstitutionId attribute in the returned institution objects has the following meaning:
- NULL - main location
- (Any ID) - branch location
HTTP Request
POST {base-url}/rest/GetInstitutionsDetailsPrimaryFirst
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| rtn | string | Routing number to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeWireSearch | boolean | If true, wire routing numbers are included in the search |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| legacyLyonsId | long (nullable) | Lyons legacy Lyons id (Institution.LegacyLyonsId) |
| mainInstitutionId | int (nullable) | Main institution id; null indicates a main location, otherwise a branch of that main (Institution.MainInstitutionId) |
| externalInstitutionId | string | Not used for US institutions; for Canadian institutions this is the FinancialInstitutionID (Institution.ExternalInstitutionId) |
| institutionType | string | Institution type (Institution.InstitutionType) |
| name | string | Institution name (Institution.Name) |
| branchName | string | Branch name (Institution.BranchName) |
| addressLine1 | string | Physical address line 1 (Institution.AddressLine1) |
| addressLine2 | string | Physical address line 2 (Institution.AddressLine2) |
| city | string | City (Institution.City) |
| state | string | State (Institution.State) |
| country | string | Country (Institution.Country) |
| postalCode | string | Postal or ZIP code (Institution.PostalCode) |
| mailingAddr | string | Mailing address (Institution.MailingAddr) |
| fedWire | boolean | Fedwire participation indicator (Institution.FedWire) |
| swift | string | SWIFT identifier (Institution.Swift) |
| fax | string | Fax number (Institution.Fax) |
| telex | string | Telex identifier (Institution.Telex) |
| homePage | string | Institution home page / URL (Institution.HomePage) |
| notes | string | Notes (Institution.Notes) |
| active | boolean | Whether the institution is active (Institution.Active) |
| branchCount | int | Number of branches defined by the mainInstitutionId relationship (Institution.BranchCount) |
| routingNumbers | array | Routing numbers for this institution (Institution.RoutingNumbers) |
| -- routingNumber | string | Routing number (InstitutionRoutingNumber.RoutingNumber) |
| -- purpose | string | Purpose of this routing number (e.g. ABA, ACH, Wire, Paper, Electronic) (InstitutionRoutingNumber.Purpose) |
| -- fractional | string | Fractional routing code (InstitutionRoutingNumber.Fractional) |
| -- correspondent | boolean | Whether the routing number is from a correspondent institution (InstitutionRoutingNumber.Correspondent) |
| -- active | boolean | Whether the routing number is active (InstitutionRoutingNumber.Active) |
| -- preferred | boolean | Whether this is the preferred routing number (InstitutionRoutingNumber.IsPreferred) |
| -- useForTransactions | boolean | Whether this routing number is used for transactions (InstitutionRoutingNumber.UseForTransactions) |
| -- notes | string | Notes for this routing number (InstitutionRoutingNumber.Notes) |
| -- history | array | Previous routing numbers for this record (InstitutionRoutingNumber.History) |
| ---- routingNumber | string | Historical routing number |
| ---- purpose | string | Historical purpose |
| ---- fractional | string | Historical fractional code |
| ---- correspondent | boolean | Historical correspondent flag |
| ---- active | boolean | Historical active flag |
| ---- preferred | boolean | Historical preferred flag |
| ---- useForTransactions | boolean | Historical use-for-transactions flag |
| ---- notes | string | Historical notes |
| ---- archivedDate | string | EST date and time the history record was archived |
| contacts | array | Contacts for this institution (Institution.Contacts) |
| -- contactType | string | Contact type (Institution, Return, Adjust, Wire, Customer Service, ACH, OFCR) (Contact.ContactType) |
| -- name | string | Contact name (Contact.Name) |
| -- title | string | Contact title (Contact.Title) |
| string | Contact email (Contact.Email) |
|
| -- phoneNumber | string | Contact phone number (Contact.PhoneNumber) |
| -- extension | string | Contact phone extension (Contact.Extension) |
| correspondents | array | Correspondent institutions (Institution.Correspondents) |
| -- correspondentInstitutionId | int | Correspondent institution id |
| -- institutionName | string | Correspondent institution name |
| -- routingNumber | string | Correspondent routing number |
| -- purpose | string | Purpose of the correspondent routing number |
| -- account | string | Correspondent account number |
| -- notes | string | Correspondent notes |
| internationalCorrespondents | array | International correspondent institutions (Institution.InternationalCorrespondents) |
| -- institutionName | string | International correspondent institution name |
| -- swift | string | SWIFT/BIC identifier |
| -- participant | boolean | Whether the institution is a participant |
| -- routingNumber | string | Routing number |
| -- purpose | string | Purpose of the routing number |
| -- accountNumber | string | International correspondent account number |
| tags | array | Institution tag name/value pairs (Institution.InstitutionTagValues) |
| -- name | string | Tag name (InstitutionTagValue.Name) |
| -- value | string | Tag value (InstitutionTagValue.Value) |
GetInstitutionsDetailsBySwift(RTN)
Sub Main(args As String())
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsBySwift"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""swift"":""XXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeRoutingNumberHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "swift":"xxxxxxxxx", "country":"CA","includeInactive":true, "includeRoutingNumberHistory":true }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsBySwift', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param swift The SWIFT identifier to search
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeRoutingNumberHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public List<Institution> call(RestTemplate rt, String token, String swift, String country, Boolean includeInactive, Boolean includeRoutingNumberHistory)
throws StopProcesingException {
SwiftRequest req = new SwiftRequest(token, swift, country, includeInactive, includeRoutingNumberHistory);
InstitutionListResult res = null;
try {
res = rt.postForObject("/rest/GetInstitutionsDetailsBySwift", req, InstitutionListResult.class);
Assert.notNull(res, "The returned Institution List is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetInstitutionsDetailsBySwift on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetInstitutionsDetailsBySwift on the RTN service", e.getMessage(), false);
}
return res.getInstitutions();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsBySwift";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "swift":"xxxxxxxxx", "country":"CA", "includeInactive":true,"includeRoutingNumberHistory":true };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionsDetailsBySwift";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
swift = "xxxxxxxxx",
country = "CA",
includeInactive = true,
includeRoutingNumberHistory = true
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"institutions": [
{
"institutionId": 1,
"legacyLyonsId": 1234,
"mainInstitutionId": null,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "STATE BANK OF MISSOURI",
"branchName": "STATE BANK OF MISSOURI",
"addressLine1": "101 NW 2ND ST",
"addressLine2": null,
"city": "CONCORDIA",
"state": "MO",
"country": "US",
"postalCode": "64020-0000",
"mailingAddr": "PO BOX 819; CONCORDIA, MO 64020",
"fedWire": false,
"swift": "",
"fax": "660-463-2196",
"telex": "",
"homePage": "www.gostatebank.com",
"notes": "",
"active": true,
"branchCount": 5,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXXX19",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:18:15.980-04:00"
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:17:15.390-04:00"
}
]
}
],
"contacts": [
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 1,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"account": null,
"institutionName": "UMB BANK, NA",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "XXXXXXX",
"participant": true,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
},
{
"institutionId": 2,
"legacyLyonsId": 5678,
"mainInstitutionId": 1,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "STATE BANK OF MISSOURI",
"branchName": "STATE BANK OF MISSOURI",
"addressLine1": "114 S COUNTY RD",
"addressLine2": null,
"city": "ALMA",
"state": "MO",
"country": "US",
"postalCode": "64001-0000",
"mailingAddr": "PO BOX 199; ALMA, MO 64001",
"fedWire": false,
"swift": "",
"fax": "660-674-2801",
"telex": "",
"homePage": "www.gostatebank.com",
"notes": "",
"active": true,
"branchCount": 0,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXXX19",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": null
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": true,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:23:21.830-04:00"
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": null,
"correspondent": false,
"active": true,
"preferred": false,
"useForTransactions": true,
"notes": null,
"archivedDate": "2019-04-18T15:21:10.373-04:00"
}
]
}
],
"contacts": [
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) 674-2216",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) 463-2194",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 86699,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"account": null,
"institutionName": "UMB BANK, NA",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "UMKCUS44",
"participant": true,
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
}
]
}
Returns a list of financial institutions with full details for an swift sorted by main locations first.
The mainInstitutionId attribute in the returned institution objects has the following meaning:
- NULL - main location
- (Any ID) - branch location
HTTP Request
POST {base-url}/rest/GetInstitutionsDetailsBySwift
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| swift | string | SWIFT/BIC code to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeRoutingNumberHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| legacyLyonsId | long (nullable) | Lyons legacy Lyons id (Institution.LegacyLyonsId) |
| mainInstitutionId | int (nullable) | Main institution id; null indicates a main location, otherwise a branch of that main (Institution.MainInstitutionId) |
| externalInstitutionId | string | Not used for US institutions; for Canadian institutions this is the FinancialInstitutionID (Institution.ExternalInstitutionId) |
| institutionType | string | Institution type (Institution.InstitutionType) |
| name | string | Institution name (Institution.Name) |
| branchName | string | Branch name (Institution.BranchName) |
| addressLine1 | string | Physical address line 1 (Institution.AddressLine1) |
| addressLine2 | string | Physical address line 2 (Institution.AddressLine2) |
| city | string | City (Institution.City) |
| state | string | State (Institution.State) |
| country | string | Country (Institution.Country) |
| postalCode | string | Postal or ZIP code (Institution.PostalCode) |
| mailingAddr | string | Mailing address (Institution.MailingAddr) |
| fedWire | boolean | Fedwire participation indicator (Institution.FedWire) |
| swift | string | SWIFT identifier (Institution.Swift) |
| fax | string | Fax number (Institution.Fax) |
| telex | string | Telex identifier (Institution.Telex) |
| homePage | string | Institution home page / URL (Institution.HomePage) |
| notes | string | Notes (Institution.Notes) |
| active | boolean | Whether the institution is active (Institution.Active) |
| branchCount | int | Number of branches defined by the mainInstitutionId relationship (Institution.BranchCount) |
| routingNumbers | array | Routing numbers for this institution (Institution.RoutingNumbers) |
| -- routingNumber | string | Routing number (InstitutionRoutingNumber.RoutingNumber) |
| -- purpose | string | Purpose of this routing number (e.g. ABA, ACH, Wire, Paper, Electronic) (InstitutionRoutingNumber.Purpose) |
| -- fractional | string | Fractional routing code (InstitutionRoutingNumber.Fractional) |
| -- correspondent | boolean | Whether the routing number is from a correspondent institution (InstitutionRoutingNumber.Correspondent) |
| -- active | boolean | Whether the routing number is active (InstitutionRoutingNumber.Active) |
| -- preferred | boolean | Whether this is the preferred routing number (InstitutionRoutingNumber.IsPreferred) |
| -- useForTransactions | boolean | Whether this routing number is used for transactions (InstitutionRoutingNumber.UseForTransactions) |
| -- notes | string | Notes for this routing number (InstitutionRoutingNumber.Notes) |
| -- history | array | Previous routing numbers for this record (InstitutionRoutingNumber.History) |
| ---- routingNumber | string | Historical routing number |
| ---- purpose | string | Historical purpose |
| ---- fractional | string | Historical fractional code |
| ---- correspondent | boolean | Historical correspondent flag |
| ---- active | boolean | Historical active flag |
| ---- preferred | boolean | Historical preferred flag |
| ---- useForTransactions | boolean | Historical use-for-transactions flag |
| ---- notes | string | Historical notes |
| ---- archivedDate | string | EST date and time the history record was archived |
| contacts | array | Contacts for this institution (Institution.Contacts) |
| -- contactType | string | Contact type (Institution, Return, Adjust, Wire, Customer Service, ACH, OFCR) (Contact.ContactType) |
| -- name | string | Contact name (Contact.Name) |
| -- title | string | Contact title (Contact.Title) |
| string | Contact email (Contact.Email) |
|
| -- phoneNumber | string | Contact phone number (Contact.PhoneNumber) |
| -- extension | string | Contact phone extension (Contact.Extension) |
| correspondents | array | Correspondent institutions (Institution.Correspondents) |
| -- correspondentInstitutionId | int | Correspondent institution id |
| -- institutionName | string | Correspondent institution name |
| -- routingNumber | string | Correspondent routing number |
| -- purpose | string | Purpose of the correspondent routing number |
| -- account | string | Correspondent account number |
| -- notes | string | Correspondent notes |
| internationalCorrespondents | array | International correspondent institutions (Institution.InternationalCorrespondents) |
| -- institutionName | string | International correspondent institution name |
| -- swift | string | SWIFT/BIC identifier |
| -- participant | boolean | Whether the institution is a participant |
| -- routingNumber | string | Routing number |
| -- purpose | string | Purpose of the routing number |
| -- accountNumber | string | International correspondent account number |
| tags | array | Institution tag name/value pairs (Institution.InstitutionTagValues) |
| -- name | string | Tag name (InstitutionTagValue.Name) |
| -- value | string | Tag value (InstitutionTagValue.Value) |
GetPrimaryInstitutionDetails(RTN)
Sub Main(args As String())
Try
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetPrimaryInstitutionDetails"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""rtn"":""XXXXXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeWireSearch"":true, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
Catch ex As WebException
Console.WriteLine(ex.ToString
)
End Try
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":true, "includeWireSearch":true, "includeHistory":true }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetPrimaryInstitutionDetails', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param rtn The routing number to search
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeWireSearch If true, wire routing numbers are included in the search
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public Institution call(RestTemplate rt, String token, String rtn, String country, Boolean includeInactive, Boolean includeWireSearch, Boolean includeHistory)
throws StopProcesingException {
RtnRequest req = new RtnRequest(token, rtn, country, includeInactive, includeWireSearch, includeHistory);
InstitutionResult res = null;
try {
res = rt.postForObject("/rest/GetPrimaryInstitutionDetails", req, InstitutionResult.class);
Assert.notNull(res, "The returned Institution is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetPrimaryInstitutionDetails on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetPrimaryInstitutionDetails on the RTN service", e.getMessage(), false);
}
return res.getInstitution();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetPrimaryInstitutionDetails";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":true,"includeWireSearch":true ,"includeHistory":true };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetPrimaryInstitutionDetails";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
rtn = "xxxxxxxxx",
country = "CA",
includeInactive = true,
includeWireSearch = true,
includeHistory = true
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"institution": {
"institutionId": 1,
"legacyLyonsId": 1,
"mainInstitutionId": null,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "CONNECTION BANK",
"branchName": "CONNECTION BANK",
"addressLine1": "636 AVE G",
"addressLine2": null,
"city": "FORT MADISON",
"state": "IA",
"country": "US",
"postalCode": "52627-0000",
"mailingAddr": "PO BOX 329; FORT MADISON, IA 52627-0329",
"fedWire": false,
"swift": "QUCTUS41",
"fax": "319-376-1227",
"telex": "",
"homePage": "www.myconnectionbank.com",
"notes": "FORMERLY FORT MADISON BANK & TRUST CO.",
"active": true,
"branchCount": 241,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": false,
"notes": null,
"archivedDate" :null
}
]
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
}
],
"contacts": [
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 1,
"routingNumber": "XXXXXXX",
"purpose": null,
"account": null,
"institutionName": "QUAD CITY BANK & TRUST CO",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "XXXXXXX",
"participant": true,
"routingNumber": "XXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
}
}
Get primary single institution with full details for an RTN.
The mainInstitutionId attribute in the returned institution object has the following meaning:
- NULL - main location
- (Any ID) - branch location
HTTP Request
POST {base-url}/rest/GetPrimaryInstitutionDetails
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| rtn | string | Routing number to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeWireSearch | boolean | If true, wire routing numbers are included in the search |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| legacyLyonsId | long (nullable) | Lyons legacy Lyons id (Institution.LegacyLyonsId) |
| mainInstitutionId | int (nullable) | Main institution id; null indicates a main location, otherwise a branch of that main (Institution.MainInstitutionId) |
| externalInstitutionId | string | Not used for US institutions; for Canadian institutions this is the FinancialInstitutionID (Institution.ExternalInstitutionId) |
| institutionType | string | Institution type (Institution.InstitutionType) |
| name | string | Institution name (Institution.Name) |
| branchName | string | Branch name (Institution.BranchName) |
| addressLine1 | string | Physical address line 1 (Institution.AddressLine1) |
| addressLine2 | string | Physical address line 2 (Institution.AddressLine2) |
| city | string | City (Institution.City) |
| state | string | State (Institution.State) |
| country | string | Country (Institution.Country) |
| postalCode | string | Postal or ZIP code (Institution.PostalCode) |
| mailingAddr | string | Mailing address (Institution.MailingAddr) |
| fedWire | boolean | Fedwire participation indicator (Institution.FedWire) |
| swift | string | SWIFT identifier (Institution.Swift) |
| fax | string | Fax number (Institution.Fax) |
| telex | string | Telex identifier (Institution.Telex) |
| homePage | string | Institution home page / URL (Institution.HomePage) |
| notes | string | Notes (Institution.Notes) |
| active | boolean | Whether the institution is active (Institution.Active) |
| branchCount | int | Number of branches defined by the mainInstitutionId relationship (Institution.BranchCount) |
| routingNumbers | array | Routing numbers for this institution (Institution.RoutingNumbers) |
| -- routingNumber | string | Routing number (InstitutionRoutingNumber.RoutingNumber) |
| -- purpose | string | Purpose of this routing number (e.g. ABA, ACH, Wire, Paper, Electronic) (InstitutionRoutingNumber.Purpose) |
| -- fractional | string | Fractional routing code (InstitutionRoutingNumber.Fractional) |
| -- correspondent | boolean | Whether the routing number is from a correspondent institution (InstitutionRoutingNumber.Correspondent) |
| -- active | boolean | Whether the routing number is active (InstitutionRoutingNumber.Active) |
| -- preferred | boolean | Whether this is the preferred routing number (InstitutionRoutingNumber.IsPreferred) |
| -- useForTransactions | boolean | Whether this routing number is used for transactions (InstitutionRoutingNumber.UseForTransactions) |
| -- notes | string | Notes for this routing number (InstitutionRoutingNumber.Notes) |
| -- history | array | Previous routing numbers for this record (InstitutionRoutingNumber.History) |
| ---- routingNumber | string | Historical routing number |
| ---- purpose | string | Historical purpose |
| ---- fractional | string | Historical fractional code |
| ---- correspondent | boolean | Historical correspondent flag |
| ---- active | boolean | Historical active flag |
| ---- preferred | boolean | Historical preferred flag |
| ---- useForTransactions | boolean | Historical use-for-transactions flag |
| ---- notes | string | Historical notes |
| ---- archivedDate | string | EST date and time the history record was archived |
| contacts | array | Contacts for this institution (Institution.Contacts) |
| -- contactType | string | Contact type (Institution, Return, Adjust, Wire, Customer Service, ACH, OFCR) (Contact.ContactType) |
| -- name | string | Contact name (Contact.Name) |
| -- title | string | Contact title (Contact.Title) |
| string | Contact email (Contact.Email) |
|
| -- phoneNumber | string | Contact phone number (Contact.PhoneNumber) |
| -- extension | string | Contact phone extension (Contact.Extension) |
| correspondents | array | Correspondent institutions (Institution.Correspondents) |
| -- correspondentInstitutionId | int | Correspondent institution id |
| -- institutionName | string | Correspondent institution name |
| -- routingNumber | string | Correspondent routing number |
| -- purpose | string | Purpose of the correspondent routing number |
| -- account | string | Correspondent account number |
| -- notes | string | Correspondent notes |
| internationalCorrespondents | array | International correspondent institutions (Institution.InternationalCorrespondents) |
| -- institutionName | string | International correspondent institution name |
| -- swift | string | SWIFT/BIC identifier |
| -- participant | boolean | Whether the institution is a participant |
| -- routingNumber | string | Routing number |
| -- purpose | string | Purpose of the routing number |
| -- accountNumber | string | International correspondent account number |
| tags | array | Institution tag name/value pairs (Institution.InstitutionTagValues) |
| -- name | string | Tag name (InstitutionTagValue.Name) |
| -- value | string | Tag value (InstitutionTagValue.Value) |
GetSingleInstitutionsDetailsPrimaryFirst(RTN)
Sub Main(args As String())
Try
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetSingleInstitutionsDetailsPrimaryFirst"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""rtn"":""XXXXXXXXX"", ""country"":""US"", ""includeInactive"":false, ""includeWireSearch"":true, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
Catch ex As WebException
Console.WriteLine(ex.ToString
)
End Try
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":true, "includeWireSearch":true, "includeHistory":true }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetSingleInstitutionsDetailsPrimaryFirst', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param rtn The routing number to search
* @param country The country code to search
* @param includeInactive If true, inactive institutions are included in the search
* @param includeWireSearch If true, wire routing numbers are included in the search
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public Institution call(RestTemplate rt, String token, String rtn, String country, Boolean includeInactive, Boolean includeWireSearch, Boolean includeHistory)
throws StopProcesingException {
RtnRequest req = new RtnRequest(token, rtn, country, includeInactive, includeWireSearch, includeHistory);
InstitutionResult res = null;
try {
res = rt.postForObject("/rest/GetSingleInstitutionsDetailsPrimaryFirst", req, InstitutionResult.class);
Assert.notNull(res, "The returned Institution is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetSingleInstitutionsDetailsPrimaryFirst on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetSingleInstitutionsDetailsPrimaryFirst on the RTN service", e.getMessage(), false);
}
return res.getInstitution();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetSingleInstitutionsDetailsPrimaryFirst";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactive":true,"includeWireSearch":true ,"includeHistory":true };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetSingleInstitutionsDetailsPrimaryFirst";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
rtn = "xxxxxxxxx",
country = "CA",
includeInactive = true,
includeWireSearch = true,
includeHistory = true
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"institution": {
"institutionId": 1,
"legacyLyonsId": 1,
"mainInstitutionId": null,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "CONNECTION BANK",
"branchName": "CONNECTION BANK",
"addressLine1": "636 AVE G",
"addressLine2": null,
"city": "FORT MADISON",
"state": "IA",
"country": "US",
"postalCode": "52627-0000",
"mailingAddr": "PO BOX 329; FORT MADISON, IA 52627-0329",
"fedWire": false,
"swift": "QUCTUS41",
"fax": "319-376-1227",
"telex": "",
"homePage": "www.myconnectionbank.com",
"notes": "FORMERLY FORT MADISON BANK & TRUST CO.",
"active": true,
"branchCount": 241,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": false,
"notes": null,
"archivedDate" :null
}
]
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
}
],
"contacts": [
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 1,
"routingNumber": "XXXXXXX",
"purpose": null,
"account": null,
"institutionName": "QUAD CITY BANK & TRUST CO",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "XXXXXXX",
"participant": true,
"routingNumber": "XXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
}
}
Get primary single institution with full details for an RTN if present else it will return non primary institution.
The mainInstitutionId attribute in the returned institution object has the following meaning:
- NULL - main location
- (Any ID) - branch location
HTTP Request
POST {base-url}/rest/GetSingleInstitutionsDetailsPrimaryFirst
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| rtn | string | Routing number to search |
| country | string | Two-character country code (US or CA) |
| includeInactive | boolean | If true, inactive institutions are included; otherwise only active institutions with active routing numbers (and active history when applicable) are considered |
| includeWireSearch | boolean | If true, wire routing numbers are included in the search |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| legacyLyonsId | long (nullable) | Lyons legacy Lyons id (Institution.LegacyLyonsId) |
| mainInstitutionId | int (nullable) | Main institution id; null indicates a main location, otherwise a branch of that main (Institution.MainInstitutionId) |
| externalInstitutionId | string | Not used for US institutions; for Canadian institutions this is the FinancialInstitutionID (Institution.ExternalInstitutionId) |
| institutionType | string | Institution type (Institution.InstitutionType) |
| name | string | Institution name (Institution.Name) |
| branchName | string | Branch name (Institution.BranchName) |
| addressLine1 | string | Physical address line 1 (Institution.AddressLine1) |
| addressLine2 | string | Physical address line 2 (Institution.AddressLine2) |
| city | string | City (Institution.City) |
| state | string | State (Institution.State) |
| country | string | Country (Institution.Country) |
| postalCode | string | Postal or ZIP code (Institution.PostalCode) |
| mailingAddr | string | Mailing address (Institution.MailingAddr) |
| fedWire | boolean | Fedwire participation indicator (Institution.FedWire) |
| swift | string | SWIFT identifier (Institution.Swift) |
| fax | string | Fax number (Institution.Fax) |
| telex | string | Telex identifier (Institution.Telex) |
| homePage | string | Institution home page / URL (Institution.HomePage) |
| notes | string | Notes (Institution.Notes) |
| active | boolean | Whether the institution is active (Institution.Active) |
| branchCount | int | Number of branches defined by the mainInstitutionId relationship (Institution.BranchCount) |
| routingNumbers | array | Routing numbers for this institution (Institution.RoutingNumbers) |
| -- routingNumber | string | Routing number (InstitutionRoutingNumber.RoutingNumber) |
| -- purpose | string | Purpose of this routing number (e.g. ABA, ACH, Wire, Paper, Electronic) (InstitutionRoutingNumber.Purpose) |
| -- fractional | string | Fractional routing code (InstitutionRoutingNumber.Fractional) |
| -- correspondent | boolean | Whether the routing number is from a correspondent institution (InstitutionRoutingNumber.Correspondent) |
| -- active | boolean | Whether the routing number is active (InstitutionRoutingNumber.Active) |
| -- preferred | boolean | Whether this is the preferred routing number (InstitutionRoutingNumber.IsPreferred) |
| -- useForTransactions | boolean | Whether this routing number is used for transactions (InstitutionRoutingNumber.UseForTransactions) |
| -- notes | string | Notes for this routing number (InstitutionRoutingNumber.Notes) |
| -- history | array | Previous routing numbers for this record (InstitutionRoutingNumber.History) |
| ---- routingNumber | string | Historical routing number |
| ---- purpose | string | Historical purpose |
| ---- fractional | string | Historical fractional code |
| ---- correspondent | boolean | Historical correspondent flag |
| ---- active | boolean | Historical active flag |
| ---- preferred | boolean | Historical preferred flag |
| ---- useForTransactions | boolean | Historical use-for-transactions flag |
| ---- notes | string | Historical notes |
| ---- archivedDate | string | EST date and time the history record was archived |
| contacts | array | Contacts for this institution (Institution.Contacts) |
| -- contactType | string | Contact type (Institution, Return, Adjust, Wire, Customer Service, ACH, OFCR) (Contact.ContactType) |
| -- name | string | Contact name (Contact.Name) |
| -- title | string | Contact title (Contact.Title) |
| string | Contact email (Contact.Email) |
|
| -- phoneNumber | string | Contact phone number (Contact.PhoneNumber) |
| -- extension | string | Contact phone extension (Contact.Extension) |
| correspondents | array | Correspondent institutions (Institution.Correspondents) |
| -- correspondentInstitutionId | int | Correspondent institution id |
| -- institutionName | string | Correspondent institution name |
| -- routingNumber | string | Correspondent routing number |
| -- purpose | string | Purpose of the correspondent routing number |
| -- account | string | Correspondent account number |
| -- notes | string | Correspondent notes |
| internationalCorrespondents | array | International correspondent institutions (Institution.InternationalCorrespondents) |
| -- institutionName | string | International correspondent institution name |
| -- swift | string | SWIFT/BIC identifier |
| -- participant | boolean | Whether the institution is a participant |
| -- routingNumber | string | Routing number |
| -- purpose | string | Purpose of the routing number |
| -- accountNumber | string | International correspondent account number |
| tags | array | Institution tag name/value pairs (Institution.InstitutionTagValues) |
| -- name | string | Tag name (InstitutionTagValue.Name) |
| -- value | string | Tag value (InstitutionTagValue.Value) |
GetInstitutionDetailsById(RTN)
Sub Main(args As String())
Try
Dim serviceUrl As String = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionDetailsById"
Dim inputJson As String = "{""token"":""xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"", ""institutionId"":1, ""includeHistory"":false}"
Dim client As New HttpClient()
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
RestStr = response.Content.ReadAsStringAsync().Result
Console.WriteLine(RestStr)
Console.ReadLine()
End If
Catch ex As WebException
Console.WriteLine(ex.ToString
)
End Try
End Sub
import requests
data = { "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "institutionId":1, "includeHistory":true }
response = requests.post('https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionDetailsById', json=data)
/**
*
*
* @param rt The RestTemplate created as shown in the main General Considerations section
* @param token The session token from the Logon method
* @param institutionId Lyons institution id to retrieve
* @param includeHistory If true, historical routing numbers are included in the search
* @throws StopProcesingException
*/
public Institution call(RestTemplate rt, String token, int institutionId, Boolean includeHistory)
throws StopProcesingException {
InstitutionIdRequest req = new InstitutionIdRequest(token, institutionId, includeHistory);
InstitutionResult res = null;
try {
res = rt.postForObject("/rest/GetInstitutionDetailsById", req, InstitutionResult.class);
Assert.notNull(res, "The returned Institution is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling GetInstitutionDetailsById on the RTN service", ex, false);
} catch (Exception e) {
handleError("\nError calling GetInstitutionDetailsById on the RTN service", e.getMessage(), false);
}
return res.getInstitution();
}
$(function () {
var url = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionDetailsById";
var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "institutionId":1, "includeHistory":false };
$.ajax({
type: "POST",
data :JSON.stringify(postObj),
url: url,
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lyonsreg.com/webservices/rtn2.1/RTNServiceWCF.svc/rest/GetInstitutionDetailsById";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new
{
token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
institutionId = 1,
includeHistory = true
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"errorMessage": null,
"institution": {
"institutionId": 1,
"legacyLyonsId": 1,
"mainInstitutionId": null,
"externalInstitutionId": null,
"institutionType": "Banks",
"name": "CONNECTION BANK",
"branchName": "CONNECTION BANK",
"addressLine1": "636 AVE G",
"addressLine2": null,
"city": "FORT MADISON",
"state": "IA",
"country": "US",
"postalCode": "52627-0000",
"mailingAddr": "PO BOX 329; FORT MADISON, IA 52627-0329",
"fedWire": false,
"swift": "QUCTUS41",
"fax": "319-376-1227",
"telex": "",
"homePage": "www.myconnectionbank.com",
"notes": "FORMERLY FORT MADISON BANK & TRUST CO.",
"active": true,
"branchCount": 241,
"routingNumbers": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": [
{
"routingNumber": "XXXXXXXXX",
"purpose": "ABA",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": false,
"notes": null,
"archivedDate" :null
}
]
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "ACH",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
},
{
"routingNumber": "XXXXXXXXX",
"purpose": "Wire",
"fractional": "XXXXXXXX",
"correspondent": false,
"active": true,
"preferred": true,
"useForTransactions": true,
"notes": null,
"history": []
}
],
"contacts": [
{
"contactType": "Institution",
"name": null,
"title": null,
"email": "[email protected]",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Return",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Adjust",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Customer Service",
"name": null,
"title": null,
"email": null,
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "ACH",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
},
{
"contactType": "Wire",
"name": "",
"title": null,
"email": "",
"phoneNumber": "(XXX) XXX-XXXX",
"extension": null
}
],
"correspondents": [
{
"correspondentInstitutionId": 1,
"routingNumber": "XXXXXXX",
"purpose": null,
"account": null,
"institutionName": "QUAD CITY BANK & TRUST CO",
"notes": null
}
],
"internationalCorrespondents": [
{
"institutionName": "UMB BANK, NA",
"swift": "XXXXXXX",
"participant": true,
"routingNumber": "XXXXXXX",
"purpose": "Wire",
"accountNumber": null
}
],
"tags": [
{
"name": "RTP",
"value": "true"
},
{
"name": "Master Bank Identifier",
"value": "XXXX"
},
{
"name": "FEDNow",
"value": "false"
}
]
}
}
Returns a single financial institution with full details, looked up by its Lyons institution id.
The mainInstitutionId attribute in the returned institution object has the following meaning:
- NULL - main location
- (Any ID) - branch location
HTTP Request
POST {base-url}/rest/GetInstitutionDetailsById
Request
| Parameter | Type | Description |
|---|---|---|
| token | string | The session token returned by the Logon call |
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| includeHistory | boolean | If true, historical routing numbers are included in the search |
Response
| Parameter | Type | Description |
|---|---|---|
| institutionId | int | Lyons institution id (Institution.InstitutionId) |
| legacyLyonsId | long (nullable) | Lyons legacy Lyons id (Institution.LegacyLyonsId) |
| mainInstitutionId | int (nullable) | Main institution id; null indicates a main location, otherwise a branch of that main (Institution.MainInstitutionId) |
| externalInstitutionId | string | Not used for US institutions; for Canadian institutions this is the FinancialInstitutionID (Institution.ExternalInstitutionId) |
| institutionType | string | Institution type (Institution.InstitutionType) |
| name | string | Institution name (Institution.Name) |
| branchName | string | Branch name (Institution.BranchName) |
| addressLine1 | string | Physical address line 1 (Institution.AddressLine1) |
| addressLine2 | string | Physical address line 2 (Institution.AddressLine2) |
| city | string | City (Institution.City) |
| state | string | State (Institution.State) |
| country | string | Country (Institution.Country) |
| postalCode | string | Postal or ZIP code (Institution.PostalCode) |
| mailingAddr | string | Mailing address (Institution.MailingAddr) |
| fedWire | boolean | Fedwire participation indicator (Institution.FedWire) |
| swift | string | SWIFT identifier (Institution.Swift) |
| fax | string | Fax number (Institution.Fax) |
| telex | string | Telex identifier (Institution.Telex) |
| homePage | string | Institution home page / URL (Institution.HomePage) |
| notes | string | Notes (Institution.Notes) |
| active | boolean | Whether the institution is active (Institution.Active) |
| branchCount | int | Number of branches defined by the mainInstitutionId relationship (Institution.BranchCount) |
| routingNumbers | array | Routing numbers for this institution (Institution.RoutingNumbers) |
| -- routingNumber | string | Routing number (InstitutionRoutingNumber.RoutingNumber) |
| -- purpose | string | Purpose of this routing number (e.g. ABA, ACH, Wire, Paper, Electronic) (InstitutionRoutingNumber.Purpose) |
| -- fractional | string | Fractional routing code (InstitutionRoutingNumber.Fractional) |
| -- correspondent | boolean | Whether the routing number is from a correspondent institution (InstitutionRoutingNumber.Correspondent) |
| -- active | boolean | Whether the routing number is active (InstitutionRoutingNumber.Active) |
| -- preferred | boolean | Whether this is the preferred routing number (InstitutionRoutingNumber.IsPreferred) |
| -- useForTransactions | boolean | Whether this routing number is used for transactions (InstitutionRoutingNumber.UseForTransactions) |
| -- notes | string | Notes for this routing number (InstitutionRoutingNumber.Notes) |
| -- history | array | Previous routing numbers for this record (InstitutionRoutingNumber.History) |
| ---- routingNumber | string | Historical routing number |
| ---- purpose | string | Historical purpose |
| ---- fractional | string | Historical fractional code |
| ---- correspondent | boolean | Historical correspondent flag |
| ---- active | boolean | Historical active flag |
| ---- preferred | boolean | Historical preferred flag |
| ---- useForTransactions | boolean | Historical use-for-transactions flag |
| ---- notes | string | Historical notes |
| ---- archivedDate | string | EST date and time the history record was archived |
| contacts | array | Contacts for this institution (Institution.Contacts) |
| -- contactType | string | Contact type (Institution, Return, Adjust, Wire, Customer Service, ACH, OFCR) (Contact.ContactType) |
| -- name | string | Contact name (Contact.Name) |
| -- title | string | Contact title (Contact.Title) |
| string | Contact email (Contact.Email) |
|
| -- phoneNumber | string | Contact phone number (Contact.PhoneNumber) |
| -- extension | string | Contact phone extension (Contact.Extension) |
| correspondents | array | Correspondent institutions (Institution.Correspondents) |
| -- correspondentInstitutionId | int | Correspondent institution id |
| -- institutionName | string | Correspondent institution name |
| -- routingNumber | string | Correspondent routing number |
| -- purpose | string | Purpose of the correspondent routing number |
| -- account | string | Correspondent account number |
| -- notes | string | Correspondent notes |
| internationalCorrespondents | array | International correspondent institutions (Institution.InternationalCorrespondents) |
| -- institutionName | string | International correspondent institution name |
| -- swift | string | SWIFT/BIC identifier |
| -- participant | boolean | Whether the institution is a participant |
| -- routingNumber | string | Routing number |
| -- purpose | string | Purpose of the routing number |
| -- accountNumber | string | International correspondent account number |
| tags | array | Institution tag name/value pairs (Institution.InstitutionTagValues) |
| -- name | string | Tag name (InstitutionTagValue.Name) |
| -- value | string | Tag value (InstitutionTagValue.Value) |
Lynx Account Verification Service
The Lynx Account Verification Service is a REST API that lets a merchant verify an account holder's bank account by submitting routing/account information to the Lynx service and receiving the result either synchronously or asynchronously.
Asynchronous calls return a responseId immediately. The final verification result is later delivered either via the merchant's callBackUrl or by polling data/v1/response/{responseId}.
The Lynx service uses the Lyons standard Logon flow on a separate, paired service (/api/v{version}/general/logon) to obtain the bearer token. Unlike the AOA/OFAC/RTN REST services described above, the Lynx methods take that token in the Authorization HTTP header, not in the request body.
Authentication header
All Lynx API calls require the bearer token returned by the Logon method.
| Header | Value |
|---|---|
| Authorization | Bearer {token} |
| Content-Type | application/json |
Response Codes
| Code | Meaning |
|---|---|
| 101 | Accept (account-check decision) |
| 103 | Deny (account-check decision) |
| 104 | Deny (account-check decision) |
| 198 | No Account Experience Available |
| 199 | Insufficient info to make a decision |
| 205 | Valid account structure |
| 206 | Invalid account structure |
| 600 | Session expired |
| 601 | External service down |
| 602-611 | Internal data / serialization errors |
| 630-635 | Internal validation errors |
| 670 | User cancelled the operation |
| 671 | User authentication / authorization failed |
| 672 | User authorization expired |
| 673 | User abandoned the request |
| 698 | General provider error |
| 699 | General error |
| 700 | Success - balance / account result available |
| 701 | Submitted - waiting for asynchronous result, call back with responseId |
| 800 | Provider connection error |
| 801 | Provider request timed out |
| 802 | Request already sent for this account holder |
| 803 | No or bad provider response |
| 804 | General provider error |
| 865 | Max verification attempts exceeded |
| -999 | AOA Service failed |
| -998 | Test account expected |
| -120 | Missing or unauthorized callback URL |
| -119 | Invalid response id |
| -118 | Lynx state not provided |
| -117 | Account holder id not provided |
| -116 | Account check request not provided |
| -115 | Balance refresh request (or the AccountHolderId or the AccountId) not provided |
| -114 | Bad remote account identifier |
| -113 | The account record does not exist |
| -112 | No accountId provided |
| -111 | You do not have access to this API method |
| -110 | AMEX Authorization Unavailable |
| -109 | Missing FSO RecID AO |
| -108 | Bad Layout or Format |
| -107 | The account holder record cannot be found |
| -106 | The response is not found or has timed out |
| -105 | No responseId provided |
| -104 | You are not onboarded to use the Lynx service |
| -103 | No token provided |
| -102 | The account check is already in progress for this account holder |
| -101 | The account holder id too long (or other format issues) |
| -100 | No account holder id provided |
| -79 | Internal AOA failure |
| -78 | ID Type value must be one character in length |
| -77 | Date Of Birth must be numeric |
| -76 | Date Of Birth must be 8 characters in length |
| -75 | SSN length must be 4 or 9 digits |
| -73 | Either Business Name or First/Last Name must be provided |
| -72 | The Last Name is not provided |
| -71 | The First Name is not provided |
| -70 | Account Ownership details missing |
| -33 | Account Number length must be 1 to 17 characters long |
| -31 | Account Number value must be numeric |
| -30 | Account Number must be entered |
| -22 | ABA Number must be exactly 9 digits |
| -21 | ABA value must be numeric |
| -20 | ABA value must be entered |
AccountCheckSync
Sub Main(args As String())
Dim serviceUrl As String = "https://lynx.lyonsreg.com/api/v1/account-check-sync"
Dim inputJson As String = "{""rtn"":""xxxxxxxxx"",""accountNo"":""58004820"",""country"":""US"",""returnDetails"":true,""accountOwner"":{""firstName"":""John"",""lastName"":""Doe"",""ssn"":""1234"",""dob"":""19800101"",""idType"":""D""}}"
Dim client As New HttpClient()
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
Dim resultJson = response.Content.ReadAsStringAsync().Result
Console.WriteLine(resultJson)
End If
End Sub
import requests
url = "https://lynx.lyonsreg.com/api/v1/account-check-sync"
headers = {"Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Content-Type": "application/json"}
data = {
"rtn": "xxxxxxxxx",
"accountNo": "58004820",
"country": "US",
"returnDetails": True,
"accountOwner": {
"firstName": "John",
"lastName": "Doe",
"ssn": "1234",
"dob": "19800101",
"idType": "D"
}
}
response = requests.post(url, headers=headers, json=data)
/**
* @param rt The RestTemplate already configured with the Bearer token in the Authorization header
* @param req The AccountStatusRequest with rtn / accountNo / accountOwner
*/
public AccountIdentityStatusCodeResult call(RestTemplate rt, AccountStatusRequest req)
throws StopProcesingException {
AccountIdentityStatusCodeResult res = null;
try {
res = rt.postForObject("/api/v1/account-check-sync", req, AccountIdentityStatusCodeResult.class);
Assert.notNull(res, "The returned AccountIdentityStatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling account-check-sync on the Lynx service", ex, false);
} catch (Exception e) {
handleError("\nError calling account-check-sync on the Lynx service", e.getMessage(), false);
}
return res;
}
$(function () {
var url = "https://lynx.lyonsreg.com/api/v1/account-check-sync";
var postObj = { "rtn": "xxxxxxxxx", "accountNo": "58004820", "country": "US",
"returnDetails": true,
"accountOwner": {"firstName":"John","lastName":"Doe","ssn":"1234","dob":"19800101","idType":"D"} };
$.ajax({
type: "POST",
url: url,
headers: { "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" },
data: JSON.stringify(postObj),
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lynx.lyonsreg.com/api/v1/account-check-sync";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new {
rtn = "xxxxxxxxx",
accountNo = "58004820",
country = "US",
returnDetails = true,
accountOwner = new {
firstName = "John", lastName = "Doe",
ssn = "1234", dob = "19800101", idType = "D"
}
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"responseId": "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8",
"primaryInstitution": {
"name": "DEMO BANK",
"address": "123 MAIN ST",
"city": "ANYTOWN",
"state": "NY",
"postalCode": "10001",
"country": "US",
"phone": "212-555-1234"
},
"validRtn": true,
"statusCode": 101,
"statusCodeDescription": "Accept",
"identityStatusCode": 101,
"identityStatusCodeDescription": "Accept",
"businessOrFullNameMatch": "Y",
"firstNameMatch": "Y",
"lastNameMatch": "Y",
"cityMatch": "Y",
"stateMatch": "Y",
"zipMatch": "Y",
"ssnMatch": "Y",
"dobMatch": "Y",
"idMatch": "Y",
"lastUpdate": "2 days",
"addClosedDate": null
}
Submits a back-end account ownership and status check and returns the result synchronously. The Lynx service performs the verification on the server thread, so this method blocks until the result is available (or the request times out).
HTTP Request
POST {base-url}/api/v1/account-check-sync
Request
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| Authorization (header) | string | Bearer {token} from the Logon call |
Mandatory |
| rtn | string | The 9-digit routing number to check | Mandatory |
| accountNo | string | The deposit account number at the financial institution | Mandatory |
| country | string | Two-character country code (defaults to US) |
Optional |
| amount | string | Transaction amount, format NNN0.00 |
Optional |
| returnDetails | boolean | If true, the response includes the primary institution details |
Optional |
| shouldCallBack | boolean | Reserved for callback variants | Optional |
| callBackUrl | string | Callback URL to override the merchant's onboarded URL | Optional |
| accountOwner | object | Account-ownership-and-account (AOA) details. Required for identity match. | Optional |
| firstName | string | First name of the account owner | Optional |
| lastName | string | Last name of the account owner | Optional |
| middleName | string | Middle name of the account owner | Optional |
| namePfx | string | Name prefix | Optional |
| nameSfx | string | Name suffix | Optional |
| businessName | string | Business name (if business account) | Optional |
| address1 | string | Street line 1 | Optional |
| address2 | string | Street line 2 | Optional |
| city | string | City | Optional |
| state | string | State / province | Optional |
| zip | string | Postal code | Optional |
| ssn | string | Last 4 or full 9 digits of SSN | Optional |
| dob | string | Date of birth as 8 numeric characters (YYYYMMDD) | Optional |
| idType | string | One-character ID type code | Optional |
| idNo | string | ID number | Optional |
| idState | string | ID issuing state | Optional |
Response
| Parameter | Type | Description |
|---|---|---|
| responseId | string | The id of the persisted response. Use it with data/v1/response/{responseId} to retrieve again. |
| statusCode | number | One of the response codes documented above. |
| statusCodeDescription | string | Human-readable description of the status code. |
| validRtn | boolean | true if the routing number was verified. |
| primaryInstitution | object | Present when returnDetails=true. Same shape as the AOA primaryInstitution. |
| identityStatusCode | number | If accountOwner is supplied, the result of the identity match. |
| identityStatusCodeDescription | string | Description of the identity status code. |
| businessOrFullNameMatch | string | Y / U (Yes / Unverified) for full-name or business-name match. |
| firstNameMatch | string | Y / U for first-name match. |
| lastNameMatch | string | Y / U for last-name match. |
| cityMatch / stateMatch / zipMatch | string | Y / U for the corresponding address fields. |
| ssnMatch / dobMatch / idMatch | string | Y / U for the corresponding identity fields. |
| lastUpdate | string | Approximately how long ago the account was last updated. |
| addClosedDate | string | Approximately how long ago a closed-date was added to the account. |
| errorMessage | string | Populated only on error. |
AccountCheckAsync
Sub Main(args As String())
Dim serviceUrl As String = "https://lynx.lyonsreg.com/api/v1/account-check-async"
Dim inputJson As String = "{""rtn"":""xxxxxxxxx"",""accountNo"":""58004820"",""country"":""US"",""returnDetails"":true,""shouldCallBack"":true,""callBackUrl"":""https://merchant.example.com/lynx/callback"",""accountOwner"":{""firstName"":""John"",""lastName"":""Doe""}}"
Dim client As New HttpClient()
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
Console.WriteLine(response.Content.ReadAsStringAsync().Result)
End If
End Sub
import requests
url = "https://lynx.lyonsreg.com/api/v1/account-check-async"
headers = {"Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Content-Type": "application/json"}
data = {
"rtn": "xxxxxxxxx",
"accountNo": "58004820",
"country": "US",
"returnDetails": True,
"shouldCallBack": True,
"callBackUrl": "https://merchant.example.com/lynx/callback",
"accountOwner": {"firstName": "John", "lastName": "Doe"}
}
response = requests.post(url, headers=headers, json=data)
public AccountIdentityStatusCodeResult call(RestTemplate rt, AccountStatusRequest req)
throws StopProcesingException {
AccountIdentityStatusCodeResult res = null;
try {
res = rt.postForObject("/api/v1/account-check-async", req, AccountIdentityStatusCodeResult.class);
Assert.notNull(res, "The returned AccountIdentityStatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling account-check-async on the Lynx service", ex, false);
} catch (Exception e) {
handleError("\nError calling account-check-async on the Lynx service", e.getMessage(), false);
}
return res;
}
$(function () {
var url = "https://lynx.lyonsreg.com/api/v1/account-check-async";
var postObj = { "rtn":"xxxxxxxxx", "accountNo":"58004820", "country":"US",
"returnDetails":true, "shouldCallBack":true,
"callBackUrl":"https://merchant.example.com/lynx/callback",
"accountOwner":{"firstName":"John","lastName":"Doe"} };
$.ajax({
type: "POST",
url: url,
headers: { "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" },
data: JSON.stringify(postObj),
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lynx.lyonsreg.com/api/v1/account-check-async";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new {
rtn = "xxxxxxxxx",
accountNo = "58004820",
country = "US",
returnDetails = true,
shouldCallBack = true,
callBackUrl = "https://merchant.example.com/lynx/callback",
accountOwner = new { firstName = "John", lastName = "Doe" }
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"responseId": "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8",
"validRtn": true,
"statusCode": 701,
"statusCodeDescription": "Submitted - waiting for response"
}
The customer is discouraged from using this method unless they are certain the routing number supports real-time payments. The customer is encouraged to use the AccountCheck endpoint instead.
Repeated verifications using AccountCheckAsync against the same account are also rate-limited by the Lynx service, and exceeding the limit returns response code 865 — Max verification attempts exceeded. The current configuration allows a client to send an MD to the same account at most 3 times in any rolling 30-day window and at most 12 times in any rolling 12-month window. Requests beyond either threshold are rejected with the 865 response and should not be retried until the window resets.
Submits a back-end account check that may complete asynchronously. When the final result is ready, the Lynx service POSTs the result to the merchant's callBackUrl. The merchant can also poll the result with data/v1/response/{responseId}.
The same AOA validation rules used by account-check-sync apply here. The contract of the request body is identical.
HTTP Request
POST {base-url}/api/v1/account-check-async
Request
Same body as AccountCheckSync, with one important field:
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| shouldCallBack | boolean | When true, the Lynx service will POST the asynchronous result to callBackUrl once the result is available. See Callback URL rules below. |
Optional |
| callBackUrl | string | URL on the merchant's side that receives the asynchronous result. Subject to the Callback URL rules below. | Optional |
Callback URL rules
The behavior of shouldCallBack and callBackUrl depends on the callback URL registered with Lyons Commercial Data at onboarding:
- If the request contains
shouldCallBack=trueand there is no callback URL registered with Lyons Commercial Data, a-120response code is returned. - If the request contains
shouldCallBack=trueand acallBackUrl, and thecallBackUrldoes not contain the callback URL registered with Lyons Commercial Data, a-120response code is returned. - If the request contains
shouldCallBack=trueand thecallBackUrlis not provided or is empty, the callback URL registered with Lyons Commercial Data is used.
Callback retry behavior
When shouldCallBack=true and the asynchronous result is ready, the Lynx service POSTs the result JSON to the resolved callback URL (see the rules above). If that delivery fails, Lynx will automatically retry it.
- What triggers a retry. Any exception raised while sending the callback — for example a DNS or TCP connection error, a TLS handshake failure, a request timeout, or a non-2xx HTTP response from the merchant's endpoint — counts as a failure and causes another attempt.
- How often Lynx retries. Both the number of additional attempts and the delay between them are controlled by Lyons-side configuration.
- Same payload, same
responseId. Every attempt re-sends the same JSON body, including the sameresponseId. Merchants should treat the callback as at-least-once and make the callback endpoint idempotent (de-duplicate byresponseId). - Fallback if all retries fail. The result is still persisted on the Lynx side regardless of whether the callback was delivered. The merchant can retrieve it at any time by calling
POST data/v1/response/{responseId}with theresponseIdreturned by the originalaccount-check-async(oraccount-check) call.
Response
| Parameter | Type | Description |
|---|---|---|
| responseId | string | The id with which to retrieve the final result via data/v1/response/{responseId}. |
| statusCode | number | Typically 701 (submitted, waiting). Errors are returned in this same field on validation failures. |
| statusCodeDescription | string | Description of the status code. |
| validRtn | boolean | true if the routing number was already verified before the asynchronous call. |
AccountCheck
Sub Main(args As String())
Dim serviceUrl As String = "https://lynx.lyonsreg.com/api/v1/account-check"
Dim inputJson As String = "{""rtn"":""xxxxxxxxx"",""accountNo"":""58004820"",""country"":""US"",""returnDetails"":true,""accountOwner"":{""firstName"":""John"",""lastName"":""Doe""}}"
Dim client As New HttpClient()
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
Dim inputContent As HttpContent = New StringContent(inputJson, Encoding.UTF8, "application/json")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, inputContent).Result
If response.IsSuccessStatusCode Then
Console.WriteLine(response.Content.ReadAsStringAsync().Result)
End If
End Sub
import requests
url = "https://lynx.lyonsreg.com/api/v1/account-check"
headers = {"Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Content-Type": "application/json"}
data = {
"rtn": "xxxxxxxxx",
"accountNo": "58004820",
"country": "US",
"returnDetails": True,
"accountOwner": {"firstName": "John", "lastName": "Doe"}
}
response = requests.post(url, headers=headers, json=data)
public AccountIdentityStatusCodeResult call(RestTemplate rt, AccountStatusRequest req)
throws StopProcesingException {
AccountIdentityStatusCodeResult res = null;
try {
res = rt.postForObject("/api/v1/account-check", req, AccountIdentityStatusCodeResult.class);
Assert.notNull(res, "The returned AccountIdentityStatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling account-check on the Lynx service", ex, false);
} catch (Exception e) {
handleError("\nError calling account-check on the Lynx service", e.getMessage(), false);
}
return res;
}
$(function () {
var url = "https://lynx.lyonsreg.com/api/v1/account-check";
var postObj = { "rtn":"xxxxxxxxx", "accountNo":"58004820", "country":"US",
"returnDetails":true,
"accountOwner":{"firstName":"John","lastName":"Doe"} };
$.ajax({
type: "POST",
url: url,
headers: { "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" },
data: JSON.stringify(postObj),
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var apiurl = "https://lynx.lyonsreg.com/api/v1/account-check";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = new JavaScriptSerializer().Serialize(new {
rtn = "xxxxxxxxx",
accountNo = "58004820",
country = "US",
returnDetails = true,
accountOwner = new { firstName = "John", lastName = "Doe" }
});
streamWriter.Write(json);
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"responseId": "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8",
"validRtn": true,
"statusCode": 101,
"statusCodeDescription": "Accept",
"identityStatusCode": 101,
"identityStatusCodeDescription": "Accept"
}
Combined call. It first runs the synchronous check (account-check-sync semantics). If the synchronous result is 199 (insufficient information to make a decision) and the routing number is a Real-Time-Payment participant, the service automatically falls back to a micro-deposit asynchronous check (account-check-async semantics with isMicroDeposit=true) and returns that final result.
The request and response shapes are the same as AccountCheckSync.
HTTP Request
POST {base-url}/api/v1/account-check
GetAccountIdentityStatusByResponseID
Sub Main(args As String())
Dim responseId As String = "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8"
Dim serviceUrl As String = "https://lynx.lyonsreg.com/data/v1/response/" & responseId
Dim client As New HttpClient()
client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
Dim response As HttpResponseMessage = client.PostAsync(serviceUrl, New StringContent("", Encoding.UTF8, "application/json")).Result
If response.IsSuccessStatusCode Then
Console.WriteLine(response.Content.ReadAsStringAsync().Result)
End If
End Sub
import requests
responseId = "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8"
url = "https://lynx.lyonsreg.com/data/v1/response/" + responseId
headers = {"Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
response = requests.post(url, headers=headers)
public AccountIdentityStatusCodeResult call(RestTemplate rt, String responseId)
throws StopProcesingException {
AccountIdentityStatusCodeResult res = null;
try {
res = rt.postForObject("/data/v1/response/" + responseId, null, AccountIdentityStatusCodeResult.class);
Assert.notNull(res, "The returned AccountIdentityStatusCodeResult is null");
} catch (HttpServerErrorException ex) {
handleRestException("\nError calling data/v1/response on the Lynx service", ex, false);
} catch (Exception e) {
handleError("\nError calling data/v1/response on the Lynx service", e.getMessage(), false);
}
return res;
}
$(function () {
var responseId = "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8";
var url = "https://lynx.lyonsreg.com/data/v1/response/" + responseId;
$.ajax({
type: "POST",
url: url,
headers: { "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" },
contentType: "application/json",
success: function (res) { var results = res; }
});
});
var responseId = "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8";
var apiurl = "https://lynx.lyonsreg.com/data/v1/response/" + responseId;
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.ContentLength = 0;
httpWebRequest.Headers.Add("Authorization", "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
The returned JSON is structured like this:
{
"responseId": "5d2e3a91-6f31-4a4f-9b28-37e8e1c1aab8",
"validRtn": true,
"statusCode": 101,
"statusCodeDescription": "Accept",
"identityStatusCode": 101,
"businessOrFullNameMatch": "Y",
"firstNameMatch": "Y",
"lastNameMatch": "Y"
}
Retrieves the latest result for an asynchronous account check (the response previously created by account-check-async or by an account-check that fell back to micro-deposit). Use this method to poll the result if the merchant did not configure a callback URL or wants to fetch the persisted result later.
HTTP Request
POST {base-url}/data/v1/response/{responseId}
Request
| Parameter | Type | Description | Field Status |
|---|---|---|---|
| Authorization (header) | string | Bearer {token} |
Mandatory |
| responseId (path) | string | The id returned by the asynchronous call | Mandatory |
Response
Same shape as the response of AccountCheckSync. The statusCode indicates whether the asynchronous result has arrived (final code) or not yet (701).
