Skip to content

The SBA C# Client Library used to interact with the REST API for SBA PPP Forgiveness.

Notifications You must be signed in to change notification settings

schnur90/sba-csharp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C# Client Code Usage

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>",
  ....

Below are the basic example steps for Submitting a Forgiveness request to the SBA System

Step 1: Create 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, , 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

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(Dictionary<string, string> reqParams, string loanDocumentTypesUrl)

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 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

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(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

Some more API Samples

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.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

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.replyToSbaMessage(MessageReply request, string loanForgivenessMessageUrl)

Please refer to Reply SBA Messages Rest API

About

The SBA C# Client Library used to interact with the REST API for SBA PPP Forgiveness.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages