Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Credit Checker API Document:

 

 

This  This document provides the details on the steps of how to configure Credit Checker via a custom portal either outside or within Salesforce. We will be covering the below steps in the entire document. Please follow them to get a seamless experience of integrating Credit Checker with your portal.

Table of Content Zone
minLevel1
maxLevel7
outlinetrue
locationtop

Set up a Connected App

Once you have your developer account set up you’ll want to set up a Connected App.

...

  1. Select Access and manage your data (API).

  2. Click Add.

Image Added

Once you’ve set up your app, you’ll be given a Consumer Key and a Consumer Secret for your app.

...

The Refresh token is to be used to retrieve a valid access token (e.g. when the current access token expires). You can change the expiry settings on this but you can also set this never to expire, only when it is revoked.

Example API calls:

To make the initial authorization request for a user to grant your app access to their data (this is where your user is initially directed to a Saleforce.com authorization endpoint and logs in) you’d make the following request. The ClientID in the below call will be your consumer ID from the connected app. The redirect_url will be the Callback URL.

...

You’ll use this as the value for your code parameter when you make a request to Salesforce’s token endpoint to receive your Access and Refresh Token.

Example request:

Code Block
 
curl login.salesforce.com/services/oauth2/token?grant_type=authorization_code&redirect_uri=https://www.yourappname.com/api/callback&client_id=YOUR_CONSUMER_ID&client_secret=YOUR_CONSUMER_SECRET&code=aWekysIEeqM9PiThEfm0Cnr6MoLIfwWyRJcqOqHdF8f9INokharAS09ia7UNP
 

Example Response:

Code Block
 
{
  "access_token": "YOUR_ACCESS_TOKEN",
  "refresh_token": "YOUR_REFRESH_TOKEN",
  "signature": "signature",
  "scope": "refresh_token api id",
  "instance_url": "https://instance.salesforce.com",
  "id": "https://login.salesforce.com/id/id,
  "token_type": "Bearer",
  "issued_at": "timestamp"
}

...

Due to that, you’ll want to keep your access token up to date by making a call to the token endpoint and changing the grant_type to ‘refresh_token’ along with including the refresh token you had received in the previous call.

Example call:

curl https://login.salesforce.com/services/oauth2/token?=YOUR_REFRESH_TOKENgrant_type=refresh_token&client_id=YOUR_CONSUMER__ID&client_secret=YOUR_CONSUMER__SECRET&refresh_token

Example response:

Code Block
curl
{
  "access_token": "REFRESHED_ACCESS_TOKEN",
  "signature": "signature",
  "scope": "refresh_token id api",
  "instance_url": "https://INSTANCE.salesforce.com",
  "id": "https://login.salesforce.com/id/idE",
  "token_type": "Bearer",
  "issued_at": "timestamp"
}

Now we have a way to keep our access tokens valid and up to date, we’re set up and ready to start working with Salesforce objects.

Send data from your app to Salesforce

Creating a contact in salesforce is really straightforward. You just need to build the API url URL using the instance from your access token response and use the access token value as your bearer token in the header.

One thing to keep an eye out for through is for characters that need to be escaped in your access token.

For example, this access token should have the exclamation mark escaped

...

you can then make the below call to create a Credit Report.

Example request

Code Block
 
curl https://INSTANCE.salesforce.com/services/data/v42.0/sobjects/ creditchecker_Credit_Report__c -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"creditchecker__Applicants_First_Name__c" : "Johnny", 
" creditchecker__Applicants_Last_Name__c " : "Appleseed",
“creditchecker__Current_Line__c “:”220 Locust Ave”,
“creditchecker__Current_StateCode__c”:”MO”,
“creditchecker__Current_City__c “:”Anthill”,
“creditchecker__Current_Zip_Code__c “:”65488”,
“creditchecker__SSN__c “:”000000001”,
“creditchecker__Current_Country__c “:”United States”}'
 

(Your Credit Report will need these fields as the minimum for an entry to be created.)

Fields:

...

Name

...

Name

Value

creditchecker__Applicants_First_Name__c

Borrower’s First Name

creditchecker__Applicants_Last_Name__c

Borrower’s Last Name

creditchecker__Applicants_SSN__c

Borrower’s SSN

creditchecker__Current_Line__c

Borrower’s Street Address

creditchecker__Current_StateCode__c

Borrower’s State Code

creditchecker__Current_City__c

Borrower’s City

creditchecker__Current_Zip_Code__c

Borrower’s ZIP Code

creditchecker__Current_Country__c

Borrower’s Country

...

Which will also let you build a link directly to the Credit Report.

Code Block
 
https https://INSTANCE.salesforce.com/0031r000029NDckAAG

 

 

 

...

 

In case of any questions or concerns please feel free to reach out to us at support@cloudmaveninc.com