API – Error Responses


LoanPro has made an effort to standardize the error responses that are returned by the API. Error responses all have a format that is similar to the following:

"code": "401-CN0001",
"message": "Unauthorized",
"context": {
"ip": "",
"uri": "/authorize",
"user_id": 1,
"errors": ["Reason 1", "Reason 2" ]

The values for the properties in the object warrant some explanation. Here is what you can expect:

  • code – The code is a concatenation of a standard HTTP response code, a dash (-) character, an abbreviation for the product (e.g. LP for LoanPro), and a numeric code that is product specific.
  • message – The message is a brief message based on the HTTP response code. This is not intended as an explantion.
  • context – The value for the context property will vary, but it will be an object. It will usually contain properties like the IP address the request (not the error response) was sent from, the URI it was sent to, and the ID of the user that sent it. It may also include an array or object that will give more information about the specific error.

For more in-depth information, see API - Transaction Warnings Overview.

How did we do?

Powered by HelpDocs (opens in a new tab)