How it works
Axle provides a consistent, single point integration to connect your users’ insurance accounts to your application. To do so, Axle closely follows the OAuth 2.0 Authorization Code flow which begins when your user wants to connect their insurance account to your application.Never send requests from your application’s client to the Axle API.
Instead, make requests from your application’s protected services to avoid
exposing your sensitive Axle API credentials.
Step 1: Generate an Ignition token
Make aPOST
request to /ignition
. In return, you’ll retrieve an ignitionToken which
you’ll need to pass to your application’s client. This token will be used to initialize
Ignition and allows us to create secure, trackable session with your user. Ignition tokens do not expire.
Request Sample: cURL
You can specify fields when generating an Ignition token to handle Ignition
events (see the guide on Ignition events for more
details) as well as attach user information or other metadata (see Start
Ignition for more details).
Response Example
Step 2: Initialize Ignition and process Ignition events
Here are some common ways you can present Ignition to your application’s users:- Recommended: display Ignition at the right step within your application’s user experience (such as before booking a rental or closing a loan application) via an iframe or webview
- Send Ignition URL in an asychronous user communication (such as email or push notification)
For guidance on specific implementations based on your application’s
requirements, refer to the Initialize Ignition and Optimizing conversion guides.
Step 3: Exchange tokens
Once the user successfully connects their account, you’ll receive an authorization code (authCode
) as an Ignition event via redirect parameters, Window MessageEvent, or webhook.
However, for additional security (particularly if the Ignition event is delivered to your application’s client), you’ll need to exchange the short-lived authCode
for a long-lived accessToken
in your application’s protected services.
Each
authCode
expires after 10 minutes so be sure you’re exchanging codes in
real time.POST
request with your authCode
to token/exchange
. In
return you’ll receive an accessToken
, account
identifier, and list of policy
identifiers.
Request Sample: cURL
Response Example
Step 4: Store access credentials
Store theaccessToken
, account
identifier, and list of policy
identifiers received in step 4 in your database - these values will be used to access account and policy information for the user going forward.
Congrats!You have now received an
accessToken
that represents consent from the user and
can now leverage the Axle API to access their insurance data 🎉🎉!Step 5: Retrieve the Policy
Now that you have anaccessToken
, you can retrieve the Policy object that was shared by the user by making a GET
request to policies/{id}
with
the accessToken
passed in the x-access-token
header.
Request Sample: cURL
Response Example
Well Done!Be sure to visit the full 📖 API Reference to learn more about each endpoint and resource!