Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndersonZacharyT/a8bb93095c2b00cef867c69651577efd to your computer and use it in GitHub Desktop.
Save AndersonZacharyT/a8bb93095c2b00cef867c69651577efd to your computer and use it in GitHub Desktop.
Here's how our general-case direct lender integration works:
1.) Bankrate POSTs a JSON payload to the lender
2.) The lender receives the payload, and returns a JSON payload with an appropriate HTTP status code
Success Response:
expected HTTP status code: 200
expected JSON response:
{
redirectUrl: 'www.amerisave.com/application?id=1234`
}
Failure response codes:
400-499 (client errors): Return this only in case of an invalid/unusable payload
We would expect an empty JSON object payload to return a 400-level code (422)
To improve our partnership over the long term, we've found it very helpful if you can
return to us a JSON payload describing what went wrong in case of client errors. This is
an ask for our engineering team, so that we can investigate any client errors we may receive,
so there is no required format/schema for this case.
The below format is not required, but here's an example:
status code: 422
{
validationErrors: [{ email: 'email address is required.' }]
}
500-599 (server errors):
We ask you use these in accordance with the HTTP spec; we expect that these indicate an actual
problem and will likely reach out to inform you if we notice a trend/outage.
There is no Bankrate-imposed specification for the redirect URL itself: usually it's something like
the above example, but there is full liberty pathing/parameters to choose the best format for your case!
Thanks for working with us!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment