NAV undefined
undefined
bash python perl java javascript cSharp

Introduction

Lyons Commercial Data XML-based Web Services are hosted in a secure and fully redundant data center to provide near real-time account 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

General Considerations

Please check the individual language sections for setup instructions, libraries, sample projects and general assumptions for the code snippets that follow.

/**
 *    The code snippets below assume the use of spring-boot and maven as demonstrated
 *    in the example projects for each service. (An example project can be downloaded here )
 *    The snippets also assume the use of the client libraries provided in the General Considerations sections of each service.
 *    
 *    The libraries are provided both in binary (lyons-<svc>-<ver>-bin.zip - along with javadoc and source)
 *    and project (lyons-<svc>-<ver>-project.zip) form.
 *    If you have a Maven repository, you can upload the binary form of the libraries.
 *    Otherwise, use the project form - unzip the archive and follow the instructions in the "read me"
 *    file on how to build the library. 
 *
 *    The example client application projects (lyons-<svc>-client-<ver>-project.zip) contain "read me" files 
 *    on the dependent libraries, how to build and run the project.
 *    
 *    The snippet below is also from an example project and illustrates how create and configure
 *    a RestTemplate that is then used for all method calls.
 *    The values for the @Value("...") annotations come from an external properties file
 *    (src/main/external-resources/application.properties) that is copied to the target subfolder:
 */
 public interface LogonProperties {
    int getCompanyId();
    String getUserName();
    String getPassword();
}

@SpringBootApplication
public class App implements LogonProperties {

    @Value("${company.id}")
    private int companyId;
    @Value("${company.user.name}")
    private String userName;
    @Value("${company.user.password}")
    private String password;

    @Override
    public int getCompanyId() {
        return companyId;
    }
    @Override
    public String getUserName() {
        return userName;
    }
    @Override
    public String getPassword() {
        return password;
    }

    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder builder, @Value("${base.service.url}") String localBaseUrl) {
        return builder.rootUri(localBaseUrl).messageConverters(new MappingJackson2HttpMessageConverter()).build();
    }

}

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.

Logon

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logon
  -d '{"companyId":"0000", "userName":"loginName","password":"pwd"}'
import requests
data = {
  "companyId":"0000",
  "userName":"loginName",
  "password":"pwd"
}
response = requests.post(
  'https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logon',
  json=data)
my $url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc";
my %json = ("companyId"=>"0000", "userName"=>"loginName","password"=>"pwd");

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/Logon',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
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("/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 () {
    var url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/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; }
    });
});
    var apiurl = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/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 https://{service-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
token string The session token used to access the service methods

RequiredLogon

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/RequiredLogon
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
response = requests.post('https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/RequiredLogon', json=data)
my $url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/RequiredLogon',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    protected boolean login(RestTemplate rt, String token) throws StopProcesingException {
        TokenRequest req = new TokenRequest(token);
        boolean res = true;
        try {
            BooleanResult resObj = rt.postForObject("/logon", 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 () {
    var url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/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; }
    });
});
    var apiurl = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/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 https://{service-url}/rest/RequiredLogon

Request

Parameter Type Description
token string the session token returned by the Logon call

Response

Parameter Type Description
value string The activity status of the token

Logoff

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'
import requests
data = {
  "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
response = requests.post(
  'https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc/rest/Logoff',
  json=data)
my $url = "https://lyonsreg.com/webservices/aba/ABAServiceWCF.svc";
my %json = ("token" => "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/Logoff',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
$(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 https://{service-url}/rest/Logoff

Request

Parameter Type Description
token string The session token used to access the service methods

Account Verification

/**
 *    You can download the binary form of the necessary Lyons Commons library here
 *    and ATM 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
 *        ATM  library project is here
 *
 *    You can find fully functional example client project here
 *  Or the java file project here.
 * 
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */

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 status of the account as being open and in good standing.

Response Codes

Code Message
-99 Just do not know
-64 ~ -61 Communication Error
-60 Communication Error (Internal)
-54 Your ATM 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.
-50 Customer Present value must be entered.
-42 Amount value length exceeds maximum of 12 characters.
-41 Amount value must be numeric.
-40 Amount value must be entered.
-32 Account Number length must be 3 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.
-6 EVS has been disabled
-5 Amount value cannot be zero or less than 0.01
0 Progress OK, Final Decision Inconclusive
101 Accept
103 Deny
104 Deny
105 ABA Validated Only
106 Invalid account holder identification
107 Duplicate Check/Txn
117 ~ 126 Risk Warning
197 Ineligible For Conversion
198 No Account Experience Available
199 Insufficient info to make a decision

IsParticipant

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/IsParticipant
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx" }'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx" }
response = requests.post('https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/IsParticipant', json=data)
my $url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba"=>"xxxxxxxxx" };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/IsParticipant',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "IsParticipant"
     * @param atm The atm to search
     * @throws StopProcesingException
     */
    public Boolean call(RestTemplate rt, String token, String method, String aba)
            throws StopProcesingException {
        ParticipantRequest req = new ParticipantRequest(token, aba);
        BooleanResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, BooleanResult.class);
            Assert.notNull(res, "The returned Boolean is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the ATM service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the ATM service 2", e.getMessage(), false);
        }
        return res.isValue();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/IsParticipant";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx" };
    $.ajax({
        type: "POST",
        data :JSON.stringify(postObj),
        url: url,
        contentType: "application/json",
        success: function (res) { var results = res; }
    });
});
var apiurl = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/IsParticipant";
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",
          aba = "xxxxxxxxx"
        });

  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,
  "status": true
}

Is financial institution a participant in the ATM network?

HTTP Request

POST https://{service-url}/rest/IsParticipant

Request

Parameter Type Description
token string the session token returned by the Logon call
aba string main/branch identifier

Response

Parameter Type Description
status boolean Status of aba

Error Messages

Message Description
Bad params! ABA does not match correct format or length

VerifyAccount

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccount
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":"0" }'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":"0" }
response = requests.post('https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccount', json=data)
my $url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba"=>"xxxxxxxxx", "account"=>"58004820", "amount"=>"132.45", "customerPresent"=>"0" };


 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/VerifyAccount',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "VerifyAccount"
     * @param atm The atm to search
     * @throws StopProcesingException
     */
    public String call(RestTemplate rt, String token, String method, String aba, String account, String amount, String customerPresent)
            throws StopProcesingException {
        VerifyAccountRequest req = new VerifyAccountRequest(token, aba, account, amount, customerPresent);
        StatusCodeResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, StatusCodeResult.class);
            Assert.notNull(res, "The returned StatusCodeResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the ATM service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the ATM service 2", e.getMessage(), false);
        }
        return res.getStatusCode();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccount";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":"0" };
    $.ajax({
        type: "POST",
        data :JSON.stringify(postObj),
        url: url,
        contentType: "application/json",
        success: function (res) { var results = res; }
    });
});
var apiurl = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccount";
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",
          aba = "xxxxxxxxx",
          account:"58004820",
          amount:"132.45",
          customerPresent: "1"
        });

  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": "Communication Error(ABA)",
  "statusCode": 199
}

Return the status code of an account from the ATM network.

HTTP Request

POST https://{service-url}/rest/VerifyAccount

Request

Parameter Type Description
token string the session token returned by the Logon call
aba string main/branch identifier
account string the account number at the bank
amount string the amount of the transaction or 0 for enrollment
customerPresent string flag whether the client is present at time of request

Response

Parameter Type Description
statusCode boolean Numeric representation of account verification

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

DescribeStatusCode

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/DescribeStatusCode
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "statusCode":"199" }'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "code":"199" }
response = requests.post('https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccountWithDetails', json=data)
my $url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "statusCode"=>"199" };

  my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/DescribeStatusCode',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "VerifyAccountWithDetails"
     * @param atm The atm to search
     * @throws StopProcesingException
     */
    public String call(RestTemplate rt, String token, String method, String statusCode)
            throws StopProcesingException {
        DescribeStatusCodeRequest req = new DescribeStatusCodeRequest(token, statusCode);
        StatusDescriptionResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, StatusDescriptionResult.class);
            Assert.notNull(res, "The returned StatusDescriptionResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the ABA service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the ABA service 2", e.getMessage(), false);
        }
        return res.getStatusDescription();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/DescribeStatusCode";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "statusCode":"199" };
    $.ajax({
        type: "POST",
        data :JSON.stringify(postObj),
        url: url,
        contentType: "application/json",
        success: function (res) { var results = res; }
    });
});
var apiurl = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/DescribeStatusCode";
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",
          statusCode = "199"
        });

  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,
  "statusDescription": "Insufficient info to make a decision"
}

Return the status code translation of an account from the ATM network.

HTTP Request

POST https://{service-url}/rest/DescribeStatusCode

Request

Parameter Type Description
token string the session token returned by the Logon call
statusCode string status code to be translated

Response

Parameter Type Description
statusDescription boolean Desciption of status code representation of account verification

VerifyAccountWithDetails

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccountWithDetails
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":1, "denyNsf":1 }'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":1, "denyNsf":1  }
response = requests.post('https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccountWithDetails', json=data)
my $url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba"=>"xxxxxxxxx", "account"=>"58004820", "amount"=>"132.45", "customerPresent"=>'1', "denyNsf"=>'1' };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/VerifyAccountWithDetails',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "VerifyAccountWithDetails"
     * @param atm The atm to search
     * @throws StopProcesingException
     */
    public String call(RestTemplate rt, String token, String method, String aba, String account, String amount, String customerPresent, String denyNsf)
            throws StopProcesingException {
        VerifyAccountWithDetailsRequest req = new VerifyAccountWithDetailsRequest(token, aba, account, amount, customerPresent, denyNsf);
        DetailedStatusCodeResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, DetailedStatusCodeResult.class);
            Assert.notNull(res, "The returned DetailedStatusCodeResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the ATM service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the ATM service 2", e.getMessage(), false);
        }
    // return res.getPrimaryInstitution();
        return res.getStatusCode();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccountWithDetails";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "aba":"xxxxxxxxx", "account":"58004820", "amount":"132.45", "customerPresent":1, "denyNsf":1  };
    $.ajax({
        type: "POST",
        data :JSON.stringify(postObj),
        url: url,
        contentType: "application/json",
        success: function (res) { var results = res; }
    });
});
var apiurl = "https://lyonsreg.com/webservices/atm/ATMServiceWCF.svc/rest/VerifyAccountWithDetails";
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",
          aba = "xxxxxxxxx",
          account:"58004820",
          amount:"132.45",
          customerPresent:1,
          denyNsf:1
        });

  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": 199,
  "statusDescription": "Insufficient info to make a decision",
  "primaryInstitution": {
    "address": "304 HIGH ST",
    "city": "CAMBRIDGE",
    "name": "1880 BANK",
    "phone": "410-228-5600",
    "postalCode": "21613",
    "state": "MD"
  },
  "validAba": true
}

Return the status code along with the institution details of an account from the ATM network.

HTTP Request

POST https://{service-url}/rest/VerifyAccountWithDetails

Request

Parameter Type Description
token string the session token returned by the Logon call
aba string main/branch identifier
account string the account number at the bank
amount string the amount of the transaction or 0 for enrollment
customerPresent string flag whether the client is present at time of request
denyNsf string

Response

Parameter Type Description
statusCode boolean Numeric representation of account verification
statusDescription boolean Desciption of status code representation of account verification
primaryInstitution Object instituion information about the aba
address string Physical Address Line
city string City
name string Complete name of the financial institution
phone string Main Phone Number
postalCode string Address Postal Code
state string State
validABA boolean aba status

Error Messages

Message Description
No Access User does not have access to this product
Internal Error Internal Application Error, contact system admin
Internal Communication 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 service

OFAC

/**
 *    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
 *  Or the java file project here.
 * 
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */

Returns results for a name scanned against the OFAC list This web service cross-references a submitted name against the Office of Foreign Asset Contol’s (OFAC) SDN watch list, the Bureau of Industry and Security’s (BIS) Denied Person’s 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

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACLogonScanName
  -d '{"companyId":"0000", "userName":"loginName","password":"pwd", "name":"testName"}'
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)
my $url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc";
my %json = {"companyId"=>"0000", "userName"=>"loginName","password"=>"pwd", "name"=>"testName"};

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/OFACLogonScanName',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "OFACLogonScanName"
     * @param ofac The ofac to search
     * @throws StopProcesingException
     */
    public List<Entity> call(RestTemplate rt, String companyID, String method, String userName, String password, String name)
            throws StopProcesingException {
        OFACLogonScanNameRequest req = new OFACLogonScanNameRequest(companyID, userName, password, name);
        EntityListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, EntityListResult.class);
            Assert.notNull(res, "The returned EntityListResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the OFAC service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the OFAC service 2", 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 individual’s name or company’s name against the Office of Foreign Assets Control’s (OFAC) SDN watch list, Bureau of Industry and Security’s (BIS) Denied Person’s list and the Non-SDN list (NS-PLC).

HTTP Request

POST https://{service-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 coutries 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 The origin country.
listType string The list in which it apears. Abreviations 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 globaly 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
Internal system error - 214 Error looking up country
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

OFACScanName

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanName
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName"}'
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)
my $url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name"=>"testName"};

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/OFACScanName',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "OFACScanName"
     * @param ofac The ofac to search
     * @throws StopProcesingException
     */
    public List<Entity> call(RestTemplate rt, String token, String method, String name)
            throws StopProcesingException {
        OFACScanNameRequest req = new OFACScanNameRequest(token, name);
        EntityListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, EntityListResult.class);
            Assert.notNull(res, "The returned EntityListResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the OFAC service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the OFAC service 2", 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 individual’s name or company’s name against the Office of Foreign Assets Control’s (OFAC) SDN watch list, Bureau of Industry and Security’s (BIS) Denied Person’s list and the Non-SDN list (NS-PLC).

HTTP Request

POST https://{service-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 coutries 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 The origin country.
listType string The list in which it apears. Abreviations 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 globaly 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
Internal system error - 214 Error looking up country
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

OFACScanCountry

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanCountry
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"}'
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)
my $url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name"=>"testName", "country"=>"UNITED STATES"};

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/OFACScanCountry',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "OFACScanCountry"
     * @param ofac The ofac to search
     * @throws StopProcesingException
     */
    public List<Entity> call(RestTemplate rt, String token, String method, String name, STring country)
            throws StopProcesingException {
        OFACScanCountryRequest req = new OFACScanCountryRequest(token, name, country);
        EntityListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, EntityListResult.class);
            Assert.notNull(res, "The returned EntityListResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the OFAC service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the OFAC service 2", 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 individual’s name or company’s name along with country against the Office of Foreign Assets Control’s (OFAC) SDN watch list, Bureau of Industry and Security’s (BIS) Denied Person’s list and the Non-SDN list (NS-PLC).

HTTP Request

POST https://{service-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 country 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 coutries 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 The origin country.
listType string The list in which it apears. Abreviations 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 globaly 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

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}'
import requests
data = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"US"}
response = requests.post('https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/GetCountryList', json=data)
my $url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};


 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/GetCountryList',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "GetCountryList"
     * @param ofac The ofac to search
     * @throws StopProcesingException
     */
    public List<Contry> call(RestTemplate rt, String token, String method)
            throws StopProcesingException {
        TokenRequest req = new TokenRequest(token);
        CountryListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, CountryListResult.class);
            Assert.notNull(res, "The returned CountryListResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the OFAC service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the OFAC service 2", 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 https://{service-url}/rest/GetCountryList

Request

Parameter Type Description
token string the session token returned by the Logon call

Response

Parameter Type Description
code integer 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

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc/rest/OFACScanNameFullRecord
  -d '{"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name":"testName", "country":"UNITED STATES"}'
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)
my $url = "https://lyonsreg.com/webservices/ofac/OFACServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name"=>"testName", "country"=>"UNITED STATES"};

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/OFACScanNameFullRecord',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
/**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "OFACScanCountry"
     * @param ofac The ofac to search
     * @throws StopProcesingException
     */
    public List<FullEntity> call(RestTemplate rt, String token, String method, String name, STring country)
            throws StopProcesingException {
        OFACScanNameFullRecordRequest req = new OFACScanNameFullRecordRequest(token, name, country);
        FullEntityListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, FullEntityListResult.class);
            Assert.notNull(res, "The returned EntityListResult is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the OFAC service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the OFAC service 2", 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 individual’s name or company’s name along with country against the Office of Foreign Assets Control’s (OFAC) SDN watch list, Bureau of Industry and Security’s (BIS) Denied Person’s list and the Non-SDN list (NS-PLC) and retrieve the full list information for that search.

Request

Parameter Type Description
token string the session token returned by the Logon call
name string full name for search query
country string country 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 coutries 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 The origin country.
listType string The list in which it apears. Abreviations 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 globaly 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 entiry.
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 pasport number.
additionalAddress Object List A list of addresses the entity is known to posses.
- 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 The country for the additional address.
- 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
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

RTN

/**
 *    You can download the binary form of the necessary Lyons Commons library here
 *    and RTN 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
 *        RTN  library project is here
 *
 *    You can find fully functional example client project here
 *  Or the java file project here.
 * 
 *    Unzip the file and follow the instructions in the ReadMe.txt in the main folder.
 *
 */

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

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyRTN
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyRTN', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn"=>"xxxxxxxxx", "country"=>"CA","includeInactives"=>false, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/VerifyRTN',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "VerifyRTN"
     * @param rtn The rtn to search
   * @param country The country code to search
   * @param includeInactives flag to determine if inactive routing numbers should be included in the search
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public Boolean call(RestTemplate rt, String token, String method, String rtn, String country, Boolean includeInactives, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeHistory);
        BooleanResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, BooleanResult.class);
            Assert.notNull(res, "The returned Boolean is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.isValue();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyRTN";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":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/rtn/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",
          includeInactives = 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,
  "status": true
}

Lookup Routing Number on Lyons Server and return true if found.

HTTP Request

POST https://{service-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 country code to search ('US' or 'CA')
includeInactives boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
status boolean Status of routing number

VerifyWire(RTN)

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyWire
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyWire', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn"=>"xxxxxxxxx", "country"=>"CA", "includeInactives"=>false, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/VerifyWire',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "VerifyWire"
     * @param rtn The rtn to search
   * @param country The country code to search
   * @param includeInactives flag to determine if inactive routing numbers should be included in the search
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public Boolean call(RestTemplate rt, String token, String method, String rtn, String country, Boolean includeInactives, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeInactives, includeHistory);
        BooleanResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, BooleanResult.class);
            Assert.notNull(res, "The returned Boolean is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.isValue();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/VerifyWire";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":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/rtn/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",
          includeInactives = 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,
  "status": true
}

Lookup the Routing Number as a wire on Lyons Server and return true if found.

HTTP Request

POST https://{service-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 country code to search ('US' or 'CA')
includeInactives boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
status boolean Status of routing number

GetInstitutionsDetails(RTN)

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetails
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeWireSearch":false, "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeWireSearch":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetails', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn"=>"xxxxxxxxx", "country"=>"CA", "includeInactives"=>false, "includeWireSearch"=>false, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/GetInstitutionsDetails',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "GetInstitutionsDetails"
     * @param rtn The rtn to search
   * @param country The country code to search
   * @param includeInactives flag to determine if inactive routing numbers should be included in the search
   * @param includeWireSearch flag to determine if Wire routing numbers should be included in the search
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public List<Institution> call(RestTemplate rt, String token, String method, String rtn, String country, Boolean includeInactives, Boolean includeWireSearch, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeInactives, includeWireSearch, includeHistory);
        InstitutionListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, InstitutionListResult.class);
            Assert.notNull(res, "The returned Institution List is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.getInstitutions();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetails";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeWireSearch":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/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetails";
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",
          includeInactives = false,
              includeWireSearch = 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,
    "institutions": [
        {
            "lyonsId": 1,
            "mainBranchId": null,
            "name": "AMEX BANK OF CANADA",
            "branchName": null,
            "address1": "101 McNabb Street",
            "address2": null,
            "city": "Markham",
            "state": "ON",
            "country": "CA",
            "postalCode": "L3R 4H8",
            "correspondents": [
                {
                    "account": "1234567890",
                    "name": "BANK OF CANADA",
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null
                }
            ],
            "routingNumbers": [
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "includeInactives":true,
                    "history": [
                        {
                            "archivedDate": "/Date(1507744109133-0400)/",
                            "datePublished": "/Date(1506963014010-0400)/",
                            "purpose": "Electronic",
                            "includeInactives":true,
                                          "useForTransactions": true,
                            "routingNumber": "xxxxxxxxx"
                        }                        
                    ]
                },
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "includeInactives":false,
                    "history": []
                },
                {
                    "routingNumber": "xxxxx-xxx",
                    "purpose": "Electronic",
                    "notes": null,
                    "useForTransactions": true,
                    "includeInactives":true,
                    "history": []
                }
            ],    
            "contacts": [
                {
                    "contactType": "Institution",
                    "name": null,
                    "email": "xxx.xxxxxxxxx@bankofca.com",
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Customer Service",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Return",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": ""
                }
            ],
            "fedWire": false,
            "swift": null,
            "fullFractional": null,
            "fax": null,            
            "telex": null,
            "homePage": null,
            "email": null,
            "notes": null,
            "lyonsNote": null,
            "financialInstitutionID": "303",
            "institutionType": "Banks"
        }
    ]
}

Returns a list of financial institutions with full details for an Routing number.

The mainBranchId attribute in the returned institution objects has the following meaning:

HTTP Request

POST https://{service-url}/rest/GetInstitutionsDetails

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
country string country code to search ('US' or 'CA')
includeInactives boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search
includeWireSearch boolean flag to determine if Wire routing numbers should be included in the search

Response

Parameter Type Description
lyonsId int The lyons idetification number associated with the institution
mainBranchId int The lyons idetification number associated with this institutions main branch
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
correspondents array list of correspondent institutions associated with this branches routing number
- account string Correspondent Account Number
- financialInstitutionName string Institution Name
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
routingNumbers array list of routingNumber objects that are connected with this institution
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
- useForTransactions boolean If this routing number is used for transactions
- active boolean If this routing number is active
- history Array A list of previous routing numbers for this record
-- archivedDate dateTime The date this routing number was changed
-- datePublished dateTime The date this routing number was originally entered in
-- lyonsId int The lyons idetification number associated with the institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- active boolean If this routing number is active
-- useForTransactions boolean If this routing number is used for transactions
contacts array list of contacts that are connected with this institution
- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
- name string name for contact
- email string Primary or corporate e-mail address for contact
- phoneNumber string phone number for contact
- Extension string phone number Extension for contact
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fullFractional string
fax string Main Fax Number
telex string TELEX identifier
homePage string Institution’s Internet home page / URL
notes string Account Notes
lyonsNote string Additional notes
financialInstitutionID int Special institution ID most commonly associated with Canadian Institutions
institutionType string The category for the institution Type

GetInstitutionsDetailsPrimaryFirst(RTN)

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false,"includeWireSearch":false, "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeWireSearch":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","rtn"=>"xxxxxxxxx", "country"=>"CA","includeInactives" =>false,"includeWireSearch"=>false, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/GetInstitutionsDetailsPrimaryFirst',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "GetInstitutionsDetailsPrimaryFirst"
     * @param rtn The rtn to search
   * @param country The country code to search
   * @param includeInactives flag to determine if inactive routing numbers should be included in the search   
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public List<Institution> call(RestTemplate rt, String token, String method, String rtn, String country, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeHistory);
        InstitutionListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, InstitutionListResult.class);
            Assert.notNull(res, "The returned Institution List is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.getInstitutions();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionsDetailsPrimaryFirst";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":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/rtn/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",         
          includeInactives = 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,
    "institutions": [
        {
            "lyonsId": 1,
            "mainBranchId": null,
            "name": "AMEX BANK OF CANADA",
            "branchName": null,
            "address1": "101 McNabb Street",
            "address2": null,
            "city": "Markham",
            "state": "ON",
            "country": "CA",
            "postalCode": "L3R 4H8",
            "correspondents": [
                {
                    "account": "1234567890",
                    "name": "BANK OF CANADA",
                    "routingNumber": "xxxxxxxxx",
                              "purpose": "Paper",
                    "notes": null
                }
            ],
            "routingNumbers": [
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": [
                        {
                            "archivedDate": "/Date(1507744109133-0400)/",
                            "datePublished": "/Date(1506963014010-0400)/",
                            "purpose": "Electronic",
                            "useForTransactions": true,
                            "active":true,
                            "routingNumber": "xxxxxxxxx"
                        }                        
                    ]
                },
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": []
                },
                {
                    "routingNumber": "xxxxx-xxx",
                    "purpose": "Electronic",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": []
                }
            ],    
            "contacts": [
                {
                    "contactType": "Institution",
                    "name": null,
                    "email": "xxx.xxxxxxxxx@bankofca.com",
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Customer Service",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Return",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": ""
                }
            ],
            "fedWire": false,
            "swift": null,
            "fullFractional": null,
            "fax": null,            
            "telex": null,
            "homePage": null,
            "email": null,
            "notes": null,
            "lyonsNote": null,
            "financialInstitutionID": "303",
            "institutionType": "Banks"
        }
    ]
}

Returns a list of financial institutions with full details for an RTN sorted by main locations first.

The mainBranchId attribute in the returned institution objects has the following meaning:

HTTP Request

POST https://{service-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 country code to search ('US' or 'CA')
includeInactives boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
lyonsId int The lyons idetification number associated with the institution
mainBranchId int The lyons idetification number associated with this institutions main branch
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
correspondents array list of correspondent institutions associated with this branches routing number
- account string Correspondent Account Number
- financialInstitutionName string Institution Name
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
routingNumbers array list of routingNumber objects that are connected with this institution
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
- useForTransactions boolean If this routing number is used for transactions
- active boolean If this routing number is active
- history Array A list of previous routing numbers for this record
-- archivedDate dateTime The date this routing number was changed
-- datePublished dateTime The date this routing number was originally entered in
-- lyonsId int The lyons idetification number associated with the institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- active boolean If this routing number is active
-- useForTransactions boolean If this routing number is used for transactions
contacts array list of contacts that are connected with this institution
- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
- name string name for contact
- email string Primary or corporate e-mail address for contact
- phoneNumber string phone number for contact
- Extension string phone number Extension for contact
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fullFractional string
fax string Main Fax Number
telex string TELEX identifier
homePage string Institution’s Internet home page / URL
notes string Account Notes
lyonsNote string Additional notes
financialInstitutionID int Special institution ID most commonly associated with Canadian Institutions
institutionType string The category for the institution Type

GetUSPrimaryInstitutionDetails(RTN)

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetUSPrimaryInstitutionDetails
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeWireSearch":false, "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetUSPrimaryInstitutionDetails', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn"=>"xxxxxxxxx", "country"=>"CA", "includeInactives"=>false, "includeWireSearch"=> false, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/GetUSPrimaryInstitutionDetails',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "GetUSPrimaryInstitutionDetails"
     * @param rtn The rtn to search
   * @param country The country code to search
   * @param includeInactives flag to determine if inactive routing numbers should be included in the search
   * @param includeWireSearch flag to determine if Wire routing numbers should be included in the search
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public List<Institution> call(RestTemplate rt, String token, String method, String rtn, String country, Boolean includeInactives, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeInactives, includeWireSearch, includeHistory);
        InstitutionListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, InstitutionListResult.class);
            Assert.notNull(res, "The returned Institution List is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.getInstitutions();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetUSPrimaryInstitutionDetails";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "rtn":"xxxxxxxxx", "country":"CA", "includeInactives":false,"includeWireSearch":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/rtn/RTNServiceWCF.svc/rest/GetUSPrimaryInstitutionDetails";
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",
              includeWireSearch = false,
          includeInactives = 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,
    "institutions": [
        {
            "lyonsId": 1,
            "mainBranchId": null,
            "name": "AMEX BANK OF CANADA",
            "branchName": null,
            "address1": "101 McNabb Street",
            "address2": null,
            "city": "Markham",
            "state": "ON",
            "country": "CA",
            "postalCode": "L3R 4H8",
            "correspondents": [
                {
                    "account": "1234567890",
                    "name": "BANK OF CANADA",
                    "routingNumber": "xxxxxxxxx",
                              "purpose": "Paper",
                    "notes": null
                }
            ],
            "routingNumbers": [
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": [
                        {
                            "archivedDate": "/Date(1507744109133-0400)/",
                            "datePublished": "/Date(1506963014010-0400)/",
                            "purpose": "Electronic",
                            "useForTransactions": true,
                            "active":true,
                            "routingNumber": "xxxxxxxxx"
                        }                        
                    ]
                },
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": []
                },
                {
                    "routingNumber": "xxxxx-xxx",
                    "purpose": "Electronic",
                    "notes": null,
                    "useForTransactions": true,
                    "active":true,
                    "history": []
                }
            ],    
            "contacts": [
                {
                    "contactType": "Institution",
                    "name": null,
                    "email": "xxx.xxxxxxxxx@bankofca.com",
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Customer Service",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Return",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": ""
                }
            ],
            "fedWire": false,
            "swift": null,
            "fullFractional": null,
            "fax": null,            
            "telex": null,
            "homePage": null,
            "email": null,
            "notes": null,
            "lyonsNote": null,
            "financialInstitutionID": "303",
            "institutionType": "Banks"
        }
    ]
}

Returns a list of main locations for US financial institutions with full details for an Routing Numbers.

The mainBranchId attribute in the returned institution objects has the following meaning:

HTTP Request

POST https://{service-url}/rest/GetUSPrimaryInstitutionDetails

Request

Parameter Type Description
token string the session token returned by the Logon call
rtn string routing number to search
includeInactives boolean flag to determine if inactive routing numbers should be included in the search
includeHistory boolean flag to determine if old routing numbers should be included in search
includeWireSearch boolean flag to determine if Wire routing numbers should be included in the search

Response

Parameter Type Description
lyonsId int The lyons idetification number associated with the institution
mainBranchId int The lyons idetification number associated with this institutions main branch
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
correspondents array list of correspondent institutions associated with this branches routing number
- account string Correspondent Account Number
- financialInstitutionName string Institution Name
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
routingNumbers array list of routingNumber objects that are connected with this institution
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
- useForTransactions boolean If this routing number is used for transactions
- active boolean If this routing number is active
- history Array A list of previous routing numbers for this record
-- archivedDate dateTime The date this routing number was changed
-- datePublished dateTime The date this routing number was originally entered in
-- lyonsId int The lyons idetification number associated with the institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- active boolean If this routing number is active
-- useForTransactions boolean If this routing number is used for transactions
contacts array list of contacts that are connected with this institution
- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
- name string name for contact
- email string Primary or corporate e-mail address for contact
- phoneNumber string phone number for contact
- Extension string phone number Extension for contact
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fullFractional string
fax string Main Fax Number
telex string TELEX identifier
homePage string Institution’s Internet home page / URL
notes string Account Notes
lyonsNote string Additional notes
financialInstitutionID int Special institution ID most commonly associated with Canadian Institutions
institutionType string The category for the institution Type

GetInstitutionDetailsByLyonsId(RTN)

curl -H "Content-type: application/json"
  -X POST https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionDetailsByLyonsId
  -d '{    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "lyonsId":0, "includeHistory":false }'
import requests
data = {    "token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "lyonsId":0, "includeHistory":false }
response = requests.post('https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionDetailsByLyonsId', json=data)
my $url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc";
my %json = {"token"=>"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "lyonsId"=>0, "includeHistory"=>false };

 my $client = REST::Client->new(host => $url);

 # POST to the incident table
 $client->POST('/rest/GetInstitutionDetailsByLyonsId',
               encode_json(\%json),
               {'Content-Type' => 'application/json'});

 print 'Response: ' . $client->responseContent() . "\n";
    /**
     *    
     *    
     * @param rt The RestTemplate created as shown in the main General Considerations section
     * @param token The sesion token from the Logon method
     * @param method Must be "GetInstitutionDetailsByLyonsId"
     * @param lyonsId The lyonsId to search
   * @param includeHistory flag to include routing number history in search
     * @throws StopProcesingException
     */
    public List<Institution> call(RestTemplate rt, String token, String method, String lyonsId, Boolean includeHistory)
            throws StopProcesingException {
        RtnRequest req = new RtnRequest(token, rtn, country, includeHistory);
        InstitutionListResult res = null;
        try {
            res = rt.postForObject("/".concat(method), req, InstitutionListResult.class);
            Assert.notNull(res, "The returned InstitutionList is null");
        } catch (HttpServerErrorException ex) {
            handleRestException("\nError calling " + method + " on the RTN service 1", ex, false);
        } catch (Exception e) {
            handleError("\nError calling " + method + " on the RTN service 2", e.getMessage(), false);
        }
        return res.getInstitutions();
    }
$(function () {
    var url = "https://lyonsreg.com/webservices/rtn/RTNServiceWCF.svc/rest/GetInstitutionDetailsByLyonsId";
    var postObj = {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "lyonsId":0, "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/rtn/RTNServiceWCF.svc/rest/GetInstitutionDetailsByLyonsId";
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",
          lyonsId = 0,
          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,
    "institutions": [
        {
            "lyonsId": 1,
            "mainBranchId": null,
            "name": "AMEX BANK OF CANADA",
            "branchName": null,
            "address1": "101 McNabb Street",
            "address2": null,
            "city": "Markham",
            "state": "ON",
            "country": "CA",
            "postalCode": "L3R 4H8",
            "correspondents": [
                {
                    "account": "1234567890",
                    "name": "BANK OF CANADA",
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null
                }
            ],
            "routingNumbers": [
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "history": [
                        {
                            "archivedDate": "/Date(1507744109133-0400)/",
                            "datePublished": "/Date(1506963014010-0400)/",
                            "purpose": "Electronic",
                            "useForTransactions": true,
                            "routingNumber": "xxxxxxxxx"
                        }                        
                    ]
                },
                {
                    "routingNumber": "xxxxxxxxx",
                    "purpose": "Paper",
                    "notes": null,
                    "useForTransactions": true,
                    "history": []
                },
                {
                    "routingNumber": "xxxxx-xxx",
                    "purpose": "Electronic",
                    "notes": null,
                    "useForTransactions": true,
                    "history": []
                }
            ],    
            "contacts": [
                {
                    "contactType": "Institution",
                    "name": null,
                    "email": "xxx.xxxxxxxxx@bankofca.com",
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Customer Service",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": null
                },
                {
                    "contactType": "Return",
                    "name": null,
                    "email": null,
                    "phoneNumber": "xxx-xxx-xxxx",
                    "Extension": ""
                }
            ],
            "fedWire": false,
            "swift": null,
            "fullFractional": null,
            "fax": null,            
            "telex": null,
            "homePage": null,
            "email": null,
            "notes": null,
            "lyonsNote": null,
            "financialInstitutionID": "303",
            "institutionType": "Banks"
        }
    ]
}

Returns a list of financial institutions with full details. Both Routing Number and wire routing numbers will be searched.

The mainBranchId attribute in the returned institution objects has the following meaning:

HTTP Request

POST https://{service-url}/rest/GetInstitutionDetailsByLyonsId

Request

Parameter Type Description
token string the session token returned by the Logon call
lyonId long LyonsId of institution
includeHistory boolean flag to determine if old routing numbers should be included in search

Response

Parameter Type Description
lyonsId int The lyons idetification number associated with the institution
mainBranchId int The lyons idetification number associated with this institutions main branch
name string Complete name of the financial institution
branchName string individual branch name of the financial institution
address1 string Physical Address Line 1
address2 string Physical Address Line 2
city string City or Province
state string State
country string Country
postalCode string Zip Code or Postal Code
correspondents array list of correspondent institutions associated with this branches routing number
- account string Correspondent Account Number
- financialInstitutionName string Institution Name
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
routingNumbers array list of routingNumber objects that are connected with this institution
- routingNumber string Routing Number
- purpose string The application of this routing number Electronic, Paper, or Wire
- notes string Notes for particular routing number
- useForTransactions boolean If this routing number is used for transactions
- history Array A list of previous routing numbers for this record
-- archivedDate dateTime The date this routing number was changed
-- datePublished dateTime The date this routing number was originally entered in
-- lyonsId int The lyons idetification number associated with the institution
-- routingNumber string Routing Number
-- purpose string The application of this routing number Electronic, Paper, or Wire
-- useForTransactions boolean If this routing number is used for transactions
contacts array list of contacts that are connected with this institution
- contactType string Contact Type (Institution, Return, Adjust, Wire, Customer Service, ACH, Wire, OFCR)
- name string name for contact
- email string Primary or corporate e-mail address for contact
- phoneNumber string phone number for contact
- Extension string phone number Extension for contact
fedWire boolean FedWire participation indicator
swift string SWIFT identifier
fullFractional string
fax string Main Fax Number
telex string TELEX identifier
homePage string Institution’s Internet home page / URL
notes string Account Notes
lyonsNote string Additional notes
financialInstitutionID int Special institution ID most commonly associated with Canadian Institutions
institutionType string The category for the institution Type