Communicating with the API
This article will go over the basic format for the HTTP request header used in communicating with the LoanPro API and will cover the general format of the request body.
The LoanPro API will look for three special headers to authenticate your request. They are the “Authorization”, “Autopal-Instance-ID”, and “Content-Type” headers.
The Authorization header has the following format:
Authorization: Bearer your_api_token
Remember to replace “your_api_token” with your actual token. The word “Bearer” is required before the API token; omitting it will lead to a 401 error.
The Autopal-Instance-ID header has the following format:
Remember to replace “your_tenant_id” with your actual tenant ID.
The specific API Token and Tenant Id for your company can be found inside of the UI of your LoanPro Tenant at Settings>Company>API>Overview. Please remember to NEVER share your API Token via email or any unsecured method.
Finally, the Content-Type header has the following format:
Sending data is done through the body of the request call. All data sent to LoanPro must be in a JSON format. Below is an example of a body that will send the information for a cat to the server (please note that there is no endpoint in LoanPro that will accept this data; this is an example of how JSON works):
"address":"123 Oak Ln",
The above will send information about a cat to the server. The server will then know the following information:
- The cat’s name is Fluffy
- The cat has four legs
- The cat does have fur
- The cat was born January 29, 2015
- The cat has an Owner named Janet who lives at 123 Oak Ln and has the phone number 5555555555
To see a list of all of the available endpoints and the JSON requests for them, visit https://loanpro.simnang.com/restler2/index.html.