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.
Clone repository using SourceTree or Git Bash.
$git clone https://github.com/UsSbaForgiveness/sba-java-client.git
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}
....
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, 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.
This example is part of a sample Use Case 1
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
This example is part of a sample Use Case 4
SbaLoanDocumentService.getDocumentTypes(Map<String, String> reqParams)
reqParams -> Please refer to GET Document Types API
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
This example is part of a sample Use Case 3
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
This example is part of a sample Use Case 2
SbaLoanForgivenessService.deletePPPLoanRequest(UUID slug)
Please refer to Delete Forgiveness Request
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
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