Please refer API Dictionary URL for any clarifications related to API request/response attributes.
C# Client code is provided to make it easier to integrate to SBA APIs.
Usage #1: Use Services provided in the code to eliminate the complexity of creating Rest Clients to integrate with SBA API's
UsSbaForgiveness/sba-csharp-client/tree/master/service
Usage #2: Use domain objects to include in your code to make Rest API calls.
UsSbaForgiveness/sba-csharp-client/tree/master/domain
Usage #3: Use complete repository as a C# .NET Core Console Application for your integration.
Cloning the repository
Clone repository using SourceTree or Git Bash.
$git clone https://github.com/UsSbaForgiveness/sba-csharp-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 appSettings.json
with the API-TOKEN and Vendor-key
"api-token": "<API-TOKEN>",
"vendor-key": "<Vendor-Key>",
....
This example is part of a sample Use Case 1
SbaLoanForgivenessService.execute(SbaPPPLoanForgiveness request, , string loanForgivenessUrl)
You need to populate SbaPPPLoanForgiveness Request object with all the information provided in the 3508 and 3508EZ documents.
Please refer Document - API Field mapping diagrams
Response is same as Request Object SbaPPPLoanForgiveness
with id and slug are populated.
Please refer to Create Forgiveness Request API
This example is part of a sample Use Case 4
SbaLoanDocumentService.getDocumentTypes(Dictionary<string, string> reqParams, string loanDocumentTypesUrl)
reqParams: Please refer to GET Document Types API
This example is part of a sample Use Case 1
a. Need SbaPPPLoanForgiveness Details (Details can be derived from Step 1)
b. Need Document Type (Details can be derived 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(int page, string sbaNumber)
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
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.getForgivenessMessagesBySbaNumber(int page, String sbaNumber, bool isComplete, string loanForgivenessMessageUrl)
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.replyToSbaMessage(MessageReply request, string loanForgivenessMessageUrl)
Please refer to Reply SBA Messages Rest API