Skip to content

The SBA Java Client Library used to interact with the REST API for SBA PPP Loans.

Notifications You must be signed in to change notification settings

UsSbaPPP/sba-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Client Code Usage

Please refer API Dictionary URL for any clarifications related to API request/response attributes.

Java Client code is provided to make it easier to integrate to SBA APIs.

Cloning the repository

Clone repository using SourceTree or Git Bash.

$git clone https://github.com/UsSbaForgiveness/sba-java-client.git

Setting up API Token and Vendor Key

The API-Token and Vendor-key is required for all the operations to be performed in the sandbox/production environment. Update the below properties in /src/main/resources/sandbox/application.yml with the api-token and Vendor-key

  api-token: {API_KEY}
  vendor-key: {VENDOR_KEY}
  ....

Installation

This is a maven project, so for building the project, browse to the parent directlry /sba-java-client-master and run the below maven command for building the project

mvn clean install

For running the project

For running the project, just execute the java application jar

java -jar sba-java-client-master/target/sba-ppp-loan-forgiveness-1.0.jar

The project is a sample Spring Boot web application. This application runs on port 9091 and URL: http://localhost:9091/sandbox. The complete set of URLs for different operation is part of the application.yml file.

Usage #1: Use Services provided in the code to eliminate the complexity of creating Rest Clients to integrate with SBA API's

src/main/java/com/sba/ppp/loanforgiveness/service

Usage #2: Use domain objects to include in your code to make Rest API calls.

src/main/java/com/sba/ppp/loanforgiveness/domain

Usage #3: Use complete repository as a Spring boot Application for your integration.

Example steps for a Forgiveness request

Step1: Submit Loan Forgiveness Request

This example is part of a sample Use Case 1

POST API Call using SbaLoanForgivenessService Service and SbaPPPLoanForgiveness Request.

SbaLoanForgivenessService.execute(SbaPPPLoanForgiveness request)

You need to populate SbaPPPLoanForgiveness Request object with all the information provided in the 3508 and 3508EZ documents. Response is same as Request Object "SbaPPPLoanForgiveness" with id and slug are populated.

Please refer Document - API Field mapping diagrams

Please refer to Create Forgiveness Request API

Step 2: Retrieve the document types required for uploading the documents

This example is part of a sample Use Case 4

To get Document Type make a GET API Call to

SbaLoanDocumentService.getDocumentTypes(Map<String, String> reqParams)

reqParams -> Please refer to GET Document Types API

Step 3: Upload Supporting Documentation for a Loan Forgiveness Request

This example is part of a sample Use Case 1

To upload the documents, a. Need SbaPPPLoanForgiveness Details (Details can be from Step 1) b. Need Document Type (Details can be from Step 2)

This is a POST API call to upload documents. SbaLoanDocumentService.submitLoanDocument(LoanDocument request)

Please refer to Upload Forgiveness Document API

Step 4: Retrieve Loan Forgiveness Request Status and detail

This example is part of a sample Use Case 3

This is a GET API Call to retrieve Sba PPP Loan Forgiveness details submitted in Step 1.

SbaLoanForgivenessService.getLoanStatus(Integer page) page is a query parameter ex: 1,2 etc

Response SbaPPPLoanForgivenessStatusResponse contains all the requests submitted as part of the Loan Forgiveness Process.

Please refer to Retrieve Forgiveness Request API

Some more API Samples

Delete Forgiveness Request

This API is used for deleting the existing Forgiveness request

This example is part of a sample Use Case 2

SbaLoanForgivenessService.deletePPPLoanRequest(UUID slug)

Please refer to Delete Forgiveness Request

Get SBA Messages

During review of a Forgiveness request, SBA may require additional information from lender. This API is used to retrieve all messages sent by SBA to lender.

This example is part of a sample Use Case 5

SbaLoanForgivenessMessageService.getSbaLoanMessages(Integer page,String sbaNumber, boolean isComplete)

Response SbaPPPLoanMessagesResponse contains all the messages exchanged between SBA and the lender Please refer to Get SBA Messages API

Reply SBA Messages

During review of a Forgiveness request, SBA may require additional information from lender. This API is used by lender to respond back to SBA by attaching requested documents.

This example is part of a sample Use Case 5

SbaLoanForgivenessMessageService.updateSbaLoanMessageReply(MessageReply request)

Please refer to Reply SBA Messages Rest API

About

The SBA Java Client Library used to interact with the REST API for SBA PPP Loans.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages