The Experian Java library provides convenient access to the RESTful Experian BIS APIs from Applications written in Java. This package is for use with Java Application (Core Java/ J2EE or any similar Java Enabled Platform like Android) that uses Experian client_id, client_secret, username, password and subcode (if applicable).
For Detailed documentation of Experian APIs, visit Experian Developers Portal
Authentication service must be invoked before making a call to Experian BIS APIs. The Authentication service provides access token, which is used internally by the API Service classes to access corresponding APIs.
BISAuthenticationService authService = new BISAuthenticationService(proxy);
BISServiceCredential serviceCredential = authService.getSandboxServiceCredential("username", "password", "clientId", "clientSecret");
{
SearchService service = new SearchService(serviceCredential, proxy);
SearchServiceRequest request = new SearchServiceRequest();
request.setName("EXPERIAN & CONSUMER DIRECT");
request.setCity("Costa Mesa");
request.setState("CA");
request.setSubcode("0517614");
request.setZip("92626");
request.setGeo(true);
SearchServiceResponse response = (SearchServiceResponse) service.execute(request);
}
{
BankruptcyService service = new BankruptcyService(serviceCredential);
BankruptcyServiceRequest request = new BankruptcyServiceRequest();
request.setBankruptcyDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
BankruptcyServiceResponse response = (BankruptcyServiceResponse) service.execute(request);
}
{
BusinessFactsService service = new BusinessFactsService(serviceCredential);
BusinessFactsServiceRequest request = new BusinessFactsServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
BusinessFactsServiceResponse response = (BusinessFactsServiceResponse) service.execute(request);
}
{
CollectionsService service = new CollectionsService(serviceCredential);
CollectionsServiceRequest request = new CollectionsServiceRequest();
request.setCollectionsSummary(true);
request.setCollectionsDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
CollectionsServiceResponse response = (CollectionsServiceResponse) service.execute(request);
}
{
CorporateLinkageService service = new CorporateLinkageService(serviceCredential);
CorporateLinkageServiceRequest request = new CorporateLinkageServiceRequest();
request.setCorporateLinkagePartial(true);
request.setCorporateLinkageFull(true);
request.setBin("807205801");
request.setSubcode("0517614");
CorporateLinkageServiceResponse response = (CorporateLinkageServiceResponse) service.execute(request);
}
{
CorporateRegistrationsService service = new CorporateRegistrationsService(serviceCredential);
CorporateRegistrationsServiceRequest request = new CorporateRegistrationsServiceRequest();
request.setStatusDescriptionDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
CorporateRegistrationsServiceResponse response = (CorporateRegistrationsServiceResponse) service.execute(request);
}
{
CreditStatusService service = new CreditStatusService(serviceCredential);
CreditStatusServiceRequest request = new CreditStatusServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
CreditStatusServiceResponse response = (CreditStatusServiceResponse) service.execute(request);
}
{
FraudShieldsService service = new FraudShieldsService(serviceCredential);
FraudShieldsServiceRequest request = new FraudShieldsServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
FraudShieldsServiceResponse response = (FraudShieldsServiceResponse) service.execute(request);
}
{
HeadersService service = new HeadersService(serviceCredential);
HeadersServiceRequest request = new HeadersServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
HeadersServiceResponse response = (HeadersServiceResponse) service.execute(request);
}
{
JudgmentsService service = new JudgmentsService(serviceCredential);
JudgmentsServiceRequest request = new JudgmentsServiceRequest();
request.setJudgmentSummary(true);
request.setJudgmentDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
JudgmentsServiceResponse response = (JudgmentsServiceResponse) service.execute(request);
}
{
LegalCollectionsSummariesService service = new LegalCollectionsSummariesService(serviceCredential);
LegalCollectionsSummariesServiceRequest request = new LegalCollectionsSummariesServiceRequest();
request.setLegalFilingsCollectionsSummary(true);
request.setLegalFilingsSummary(true);
request.setBin("807205801");
request.setSubcode("0517614");
LegalCollectionsSummariesServiceResponse response = (LegalCollectionsSummariesServiceResponse) service.execute(request);
}
{
LiensService service = new LiensService(serviceCredential);
LiensServiceRequest request = new LiensServiceRequest();
request.setLienSummary(true);
request.setLienDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
LiensServiceResponse response = (LiensServiceResponse) service.execute(request);
}
{
RiskDashboardsService service = new RiskDashboardsService(serviceCredential);
RiskDashboardsServiceRequest request = new RiskDashboardsServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
RiskDashboardsServiceResponse response = (RiskDashboardsServiceResponse) service.execute(request);
}
{
ScoresService service = new ScoresService(serviceCredential);
ScoresServiceRequest request = new ScoresServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
request.setModelCode("000224");
request.setCommercialScore(true);
request.setFsrScore(true);
ScoresServiceResponse response = (ScoresServiceResponse) service.execute(request);
}
{
TradesService service = new TradesService(serviceCredential);
TradesServiceRequest request = new TradesServiceRequest();
request.setTradePaymentSummary(true);
request.setTradePaymentTotals(false);
request.setTradePaymentExperiences(false);
request.setTradePaymentTrends(false);
request.setBin("807205801");
request.setSubcode("0517614");
TradesServiceResponse response = (TradesServiceResponse) service.execute(request);
}
{
UCCFilingsService service = new UCCFilingsService(serviceCredential);
UCCFilingsServiceRequest request = new UCCFilingsServiceRequest();
request.setUccFilingsSummary(true);
request.setUccFilingsDetail(true);
request.setBin("807205801");
request.setSubcode("0517614");
UCCFilingsServiceResponse response = (UCCFilingsServiceResponse) service.execute(request);
}
{
ReverseAddressesService service = new ReverseAddressesService(serviceCredential);
ReverseAddressesServiceRequest request = new ReverseAddressesServiceRequest();
request.setSubcode("0517614");
request.setStreet("475 ANTON BLVD");
request.setCity("Costa Mesa");
request.setState("CA");
request.setZip("92626");
ReverseAddressesServiceResponse response = (ReverseAddressesServiceResponse) service.execute(request);
}
{
ReversePhonesService service = new ReversePhonesService(serviceCredential);
ReversePhonesServiceRequest request = new ReversePhonesServiceRequest();
request.setSubcode("0517614");
request.setPhone("8008888888");
ReversePhonesServiceResponse response = (ReversePhonesServiceResponse) service.execute(request);
}
{
ReverseTaxIDsService service = new ReverseTaxIDsService(serviceCredential);
ReverseTaxIDsServiceRequest request = new ReverseTaxIDsServiceRequest();
request.setSubcode("0517614");
request.setTaxId("222152871");
ReverseTaxIDsServiceResponse response = (ReverseTaxIDsServiceResponse) service.execute(request);
}
{
BusinessContactsService service = new BusinessContactsService(serviceCredential);
BusinessContactsServiceRequest request = new BusinessContactsServiceRequest();
request.setBin("807205801");
request.setSubcode("0517614");
BusinessContactsServiceResponse response = (BusinessContactsServiceResponse) service.execute(request);
}
{
ScoresSearchService service = new ScoresSearchService(serviceCredential);
ScoresSearchServiceRequest request = new ScoresSearchServiceRequest();
request.setName("EXPERIAN");
request.setCity("Costa Mesa");
request.setState("CA");
request.setSubcode("0517614");
request.setZip("92626");
request.setGeo(true);
request.setMatchReliabilityCode(83);
request.setCommercialScore(true);
request.setFsrScore(true);
ScoresSearchServiceResponse response = (ScoresSearchServiceResponse) service.execute(request);
}
{
PremierProfilesService service = new PremierProfilesService(serviceCredential);
PremierProfilesServiceRequest request = new PremierProfilesServiceRequest();
request.setBin("700003839");
request.setSubcode("0563776");
PremierProfilesServiceResponse response = (PremierProfilesServiceResponse) service.execute(request);
}
{
AggregatesService service = new AggregatesService(serviceCredential);
BusinessAggregatesServiceRequest request = new BusinessAggregatesServiceRequest();
request.setBin("700003839");
request.setSubcode("0563776");
AggregatesServiceResponse response = (AggregatesServiceResponse) service.execute(request);
}
public SocialMediaAttributesResponse getSMIAttributesSampleResponse(){
SocialMediaAttributesService service = new SocialMediaAttributesService(serviceCredential);
SocialMediaAttributesRequest request = new SocialMediaAttributesRequest();
request.setName("Apple");
request.setStreet("1 Infinite");
request.setCity("Cupertino");
request.setState("CA");
request.setSubcode("0563736");
SocialMediaAttributesResponse response = null;
try {
@SuppressWarnings("unused")
response = (SocialMediaAttributesResponse) service.execute(request);
}
catch(BISValidationException vex) {
//Custom validation for invalid data
System.out.println((new ObjectMapper()).writeValueAsString(vex.getServiceError()));
}
catch(BISServiceException ex) {
//Custom validation for service error
System.out.println((new ObjectMapper()).writeValueAsString(ex.getServiceError()));
}
return response;
}
Experian BIS Java Library has built in support for HTTP Proxy. If the Java Library is being used in a API Client which is expected to run on a system, where Proxy is required to access the Experian API URLs, you can easily configure it while using the Java Library. Use the following lines of code to set a proxy.
System.setProperty("javax.net.useSystemProxies", "false");
int port = 8080; //provide your proxy port here
String proxyHost = "hostname"; //provide your proxy host address here
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, port));
BISAuthenticationService authService = new BISAuthenticationService(proxy);
BISServiceCredential serviceCredential = authService.getSandboxServiceCredential("username", "password", "clientId", "clientSecret");
and then create the Service Class as following:
BusinessFactsService service = new BusinessFactsService(serviceCredential, proxy);
However this proxy configuration is absolutely optional. You should only pass the second parameter (proxy) to the API Service Classes when your code is running behind a proxy server.
There are two Custom Exceptions thrown by various Service Classes of the Java Library. These Custom Exceptions are:
Thrown by various service methods when a validation error occurs. Some common reasons for validation errors are datatype mismatch, incorrect format, presence of disallowed characters, value boundary overflow/underflow of various Request Parameters supplied to the service methods. This Custom Exception class is a subclass of BISServiceException
class.
Thrown by service methods when anything but a validation error occurs. These scenarios may include but not limited to Experian API outage, wrong credentials supplied, an unsual Runtime exception etc. All runtime exceptions are wrapped by this Custom Exception. This Custom Exception class is the superclass of BISValidationException
class.
response
object{
"requestId": "XXXX-XXXX-XXXX-XXXX",
"success": true,
"results": [...]
}
error
object{
"success": false,
"requestId": "XXXX-XXXX-XXXX-XXXX",
"errors": [
{
"errorCode": XXXX,
"errorType": "Error Type",
"message": "Error Message"
}
]
}