For the complete documentation index, see llms.txt. This page is also available as Markdown.

Auto Insurance Marketplace

This page covers prefilling Engine's Auto Insurance marketplace by using our Prefill API.

It builds on the shared concepts in the Prefill API overview (how the flow works, token lifecycle, frontend options, best practices). Please start there if you haven't already!

API Request

Before you start: you'll need a bearer token from your Engine team scoped to your Auto Insurance subaccount, and your Auto Insurance experience configured and enabled by Engine.

Authentication

Every request must be authenticated with the bearer token provided by your Engine team.

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Your token is scoped to a specific subaccount by product category (e.g. Auto Insurance). Use the token your Engine team directs you to use for each product — the markup you get back is determined by the marketplace tied to that token plus the productTypes you send.

Request Body

Send a POST to the Prefills endpoint with a JSON body. The body carries the consumer's data plus a productTypes array that tells Engine which experience to return.

Request Component
Value

Endpoint

POST https://api.engine.tech/originator/prefills

Auth

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Content type

application/json

Accepted Fields (Shortform Experience)

Auto Insurance uses productTypes:"auto_insurance". This is the one required field, as it tells Engine which hosted experience (embed snippet + partner page URL) to return.

Parameter
Required
Notes

productTypes

Yes

Array. Accepted Values: auto_insurance.

All other fields, defined below, are completely optional. Data prepopulation is handled per funnel step - if one piece of data is missing for a given funnel screen, then the entire screen will be collected from the consumer regardless of what was sent as part of the initial API response.

Send only what you have - omitted fields are collected from the consumer in-flow:

Funnel Screen
Object
Field Name
Notes
  1. Zipcode

personalInformation

zipcode

US 5-digit numeric ZIP code, e.g. 10001. No leading/trailing whitespace

  1. Current Insurance Provider

autoInsuranceInformation

currentIssuer

Enums - endpoint?

hasAutoInsurance?

  1. Number of Vehicles

autoInsuranceInformation

numberOfVehicles

Integer between 1 and 5

  1. Homeowner?

autoInsuranceInformation.policyHodlerInformation

isHomeOwner

Boolean (true/false)

  1. Military Veteran?

autoInsuranceInformation.policyHodlerInformation

isMilitary

Boolean (true/false)

  1. DOB

personalInformation

dateOfBirth

Date string of the format YYYY-MM-DD

Sample Request Payload

API Response

A successful request returns 200 OK with the token and the markup you need to render the experience.

Field
Description

productTypes

Echoes the product types from your request.

prefillToken

The short-lived token that unlocks the prefilled data.

expiresInSeconds

Token time-to-live, in seconds (currently 180).

maxUses

How many times the token can be redeemed (currently 3).

partnerPageUrl

Hosted Engine landing page, with the prefillToken already appended.

embedSnippet

HTML/JS markup to embed the experience on your own site.

The exact shape of partnerPageUrl and embedSnippet depends on the product — see the product pages for examples.

Prefill Token Lifecycle

To keep consumer data secure, tokens have strict time and usage limits.

  • Time to live: tokens are valid for expiresInSeconds (currently ~3 minutes / 180s). Generate the token immediately before the consumer interacts with the flow.

  • Usage: tokens can be redeemed up to maxUses times (currently 3) to support retries. Do not cache or reuse a token across sessions.

If the token's TTL or use limit is exceeded, the consumer simply isn't prefilled — they'll fill out the required fields themselves to complete the product search. Nothing breaks.

Sample Response

A successful request returns the token plus the Auto Insurance specific syntax:

Frontend Integration Options

Engine must configure and enable your experiences before they can render, regardless of which path you choose. The only dynamic value in the returned markup is the prefillToken — everything else is scoped to your marketplace and the productTypes you sent. You can extract and use any of:

  • the full partnerPageUrl,

  • the full embedSnippet, or

  • just the prefillToken value (to drop into markup you already maintain).

Partner Page (Linkout)

Best for partners who want to hand the consumer off to a hosted MoneyLion landing page, or who want a lighter-lift integration.

  1. Extract partnerPageUrl from the response.

  2. Redirect the consumer there with a standard HTTP 302 or a client-side location change.

Embedded Experience

Best for partners who want to keep the consumer on their own property.

  1. Extract embedSnippet from the response.

  2. Unescape the snippet.

  3. Inject the snippet into your page where the component should appear.

  4. The script initializes automatically using the prefillToken to load the consumer's data.

The Consumer Experience

After the experience redeems the prefillToken, it patches the lead with the PII you sent and collects only what's missing:

  • If everything is missing, the consumer fills out all required fields.

  • If some data is missing, the consumer is prompted only for the missing required fields.

  • If nothing is missing, the consumer skips straight to a review screen for consent.

Review Screen

For compliance and security, the consumer is always shown a review screen before submission. It is fully editable, so they can correct anything that was prefilled.

  • Masking: sensitive fields like SSN are masked (e.g. ***-**-6789).

  • Confirmation: the consumer must explicitly confirm the prefilled information.

Fallback Behavior

If a token is invalid, expired, or fails to redeem, the consumer is not shown an error. The flow gracefully falls back to the standard manual application — they enter their information as if no data prefill had occurred.

Reporting

You can include Client Tags exactly as you would for a standard embedded experience; see Engine's Client Tags & Reporting documentation:

Best Practices

These practices keep consumer PII secure and prevent the most common integration mistakes. They apply to every Prefill API call, regardless of product.

Request Timing

Generate a token immediately before the consumer enters the Engine experience. It's only bvalid for 3 minutes and up to 3 uses.

Never Place PII in the Browser

You must never pass PII in query parameters or embed codes on the client side.

  • Don't append query-string parameters such as &firstName=Jane to URLs.

  • Don't print user data into the HTML source.

  • Always use the server-side API to exchange data for a prefillToken.

Omit Missing Data from Requests

Any field you omit won't be prefilled. If you omit a field that shares a screen with other fields, none of the fields on that screen are prefilled — they're all collected from the consumer instead.

For example, if you omit zipcode, the consumer is prompted for the full address in-flow, rather than being asked only for a ZIP code. This is a deliberate product decision to avoid confusing, partially-filled screens.

FAQ & Troubleshooting

For credentials, enabling experiences, or integration support, contact your Engine account team.

What happens if the token expires before the consumer loads the page?

The consumer lands on the standard application and enters their information manually. The experience doesn't break — it reverts to a non-prefilled state.

Can I update the data after generating a token?

No. If the consumer's data changes, call the endpoint again to generate a new token.

Why did I get a 400 Bad Request?

Make sure your JSON payload is well-formed! productTypes is present and set to a valid value (loan or credit_card), and every object field you include (e.g. personalInformation, loanInformation) is sent as a JSON object — not an array or a different type ("creditInformation": [] will fail; "creditInformation": {...} or omitting it entirely will not).

Last updated

Was this helpful?