> For the complete documentation index, see [llms.txt](https://even-financial.gitbook.io/developer-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://even-financial.gitbook.io/developer-center/embeddable-integrations/mobile-sdks/personal-loans/experimental/prefill.md).

# Prefill Lead Data

Prefill any user data you already have to reduce what the user has to type in-flow. Prefilled data is grouped into typed information objects, each passed as its own prop on the SDK component (e.g. `personalInformation`, `loanInformation`, `financialInformation`).

{% hint style="info" %}
Prefilling requires a `bearerToken`. Pass only the fields you have — omitted fields are collected from the user in-flow.
{% endhint %}

## Example

{% tabs %}
{% tab title="React Native" %}

```tsx
<WebWrapper
  channel="your-channel"
  zone="your-zone"
  bearerToken="{your_token}"
  productTypes={[ApiModels.ProductType.Loan]}
  personalInformation={{
    firstName: 'Bob',
    lastName: 'Dylan',
    email: 'bobdylan@gmail.com',
    dateOfBirth: '1990-01-01', // YYYY-MM-DD
    primaryPhone: '2325624852',
    address1: '1600 Pennsylvania Avenue',
    address2: 'Apt 2',
    city: 'Washington',
    state: 'DC',
    zipcode: '20500',
    ssn: '512-54-7862',
  }}
  loanInformation={{
    purpose: ApiModels.LoanPurpose.CreditCardRefi,
    loanAmount: 7500,
  }}
  mortgageInformation={{
    propertyStatus: ApiModels.PropertyStatus.OwnWithMortgage,
  }}
  creditInformation={{
    providedCreditRating: ApiModels.ProvidedCreditRating.Good,
  }}
  financialInformation={{
    employmentStatus: ApiModels.EmploymentStatus.EmployedFullTime,
    employmentPayFrequency: ApiModels.EmploymentPayFrequency.Biweekly,
    annualIncome: 20000,
    creditCardDebt: 5000,
    bankRoutingNumber: '123456789',
    bankAccountNumber: '55555555555',
  }}
  employmentInformation={{
    directDeposit: false,
  }}
  legalInformation={{
    consentsToSms: true,
  }}
  educationInformation={{
    educationLevel: ApiModels.EducationLevel.Associate,
  }}
  onExit={(evt) => console.log('onExit', evt)}
/>
```

{% endtab %}

{% tab title="Flutter" %}

```dart
EngineSDK(
  channel: 'your-channel',
  zone: 'your-zone',
  bearerToken: '{your_token}',
  productTypes: const [engine.ProductType.loan],
  personalInformation: engine.LeadPersonalInformation(
    firstName: 'Bob',
    lastName: 'Dylan',
    email: 'bobdylan@gmail.com',
    dateOfBirth: DateTime(1990, 1, 1),
    primaryPhone: '2325624852',
    address1: '1600 Pennsylvania Avenue',
    address2: 'Apt 2',
    city: 'Washington',
    state: engine.State.DC,
    zipcode: '20500',
    ssn: '512-54-7862',
  ),
  loanInformation: engine.LeadLoanInformationJson(
    purpose: engine.LoanPurpose.creditCardRefi,
    loanAmount: 7500,
  ),
  mortgageInformation: engine.LeadMortgageInformationJson(
    propertyStatus: engine.PropertyStatus.ownWithMortgage,
  ),
  creditInformation: engine.LeadCreditInformationJson(
    providedCreditRating: engine.ProvidedCreditRating.good,
  ),
  financialInformation: engine.LeadFinancialInformation(
    employmentStatus: engine.EmploymentStatus.employedFullTime,
    employmentPayFrequency: engine.EmploymentPayFrequency.biweekly,
    annualIncome: 20000,
    creditCardDebt: 5000,
    bankRoutingNumber: '123456789',
    bankAccountNumber: '55555555555',
  ),
  employmentInformation: engine.LeadEmploymentInformationJson(
    directDeposit: false,
  ),
  legalInformation: engine.LeadLegalInformationJson(
    consentsToSms: true,
  ),
  educationInformation: engine.LeadEducationInformationJson(
    educationLevel: engine.EducationLevel.associate,
  ),
  onExit: (_) {},
)
```

{% endtab %}
{% endtabs %}

## Type Definitions

Every prop and field is optional — pass only what you have.

{% tabs %}
{% tab title="React Native" %}

```ts
interface LeadPersonalInformation {
  firstName?: string;
  lastName?: string;
  email?: string;
  dateOfBirth?: string; // YYYY-MM-DD
  primaryPhone?: string; // 10 digits, no "+" or "-" chars
  address1?: string;
  address2?: string; // optional apartment / suite
  city?: string;
  state?: string; // 2-letter code, e.g. 'DC'
  zipcode?: string;
  ssn?: string; // 9 digits with or without hyphens
}

interface LeadLoanInformation {
  purpose?: ApiModels.LoanPurpose; // enum below
  loanAmount?: number; // whole numbers only
}

interface LeadMortgageInformation {
  propertyStatus?: ApiModels.PropertyStatus; // enum below
}

interface LeadCreditInformation {
  providedCreditRating?: ApiModels.ProvidedCreditRating; // enum below
}

interface LeadFinancialInformation {
  employmentStatus?: ApiModels.EmploymentStatus; // enum below
  employmentPayFrequency?: ApiModels.EmploymentPayFrequency; // enum below
  annualIncome?: number; // raw integer value (e.g. 20000)
  creditCardDebt?: number; // total credit card debt, raw integer value
  bankRoutingNumber?: string; // must be exactly 9 digits
  bankAccountNumber?: string;
}

interface LeadEmploymentInformation {
  directDeposit?: boolean;
}

interface LeadLegalInformation {
  consentsToSms?: boolean; // lead agrees to receive SMS
}

interface LeadEducationInformation {
  educationLevel?: ApiModels.EducationLevel; // enum below
}
```

{% endtab %}

{% tab title="Flutter" %}

```dart
class LeadPersonalInformation {
  final String? firstName;
  final String? lastName;
  final String? email;
  final DateTime? dateOfBirth;
  final String? primaryPhone; // 10 digits, no "+" or "-" chars
  final String? address1;
  final String? address2; // optional apartment / suite
  final String? city;
  final State? state; // enum, 2-letter (e.g. State.DC)
  final String? zipcode;
  final String? ssn; // 9 digits with or without hyphens
}

class LeadLoanInformationJson {
  final LoanPurpose? purpose; // enum below
  final int? loanAmount; // whole numbers only
}

class LeadMortgageInformationJson {
  final PropertyStatus? propertyStatus; // enum below
}

class LeadCreditInformationJson {
  final ProvidedCreditRating? providedCreditRating; // enum below
}

class LeadFinancialInformation {
  final EmploymentStatus? employmentStatus; // enum below
  final EmploymentPayFrequency? employmentPayFrequency; // enum below
  final int? annualIncome; // raw integer value (e.g. 20000)
  final int? creditCardDebt; // total credit card debt, raw integer value
  final String? bankRoutingNumber; // must be exactly 9 digits
  final String? bankAccountNumber;
}

class LeadEmploymentInformationJson {
  final bool? directDeposit;
}

class LeadLegalInformationJson {
  final bool? consentsToSms; // lead agrees to receive SMS
}

class LeadEducationInformationJson {
  final EducationLevel? educationLevel; // enum below
}
```

{% endtab %}
{% endtabs %}

## Enums / Accepted Values

Fields backed by an enum must use a valid value.

{% tabs %}
{% tab title="React Native" %}
Use a member of the corresponding `ApiModels` enum (access via the `ApiModels` namespace, e.g. `ApiModels.LoanPurpose.CreditCardRefi`):

```ts
enum LoanPurpose {
  Auto = 'auto',
  AutoPurchase = 'auto_purchase',
  AutoRefinance = 'auto_refinance',
  Baby = 'baby',
  Boat = 'boat',
  Business = 'business',
  CarRepair = 'car_repair',
  Cosmetic = 'cosmetic',
  CreditCardRefi = 'credit_card_refi',
  DebtConsolidation = 'debt_consolidation',
  Emergency = 'emergency',
  Engagement = 'engagement',
  Green = 'green',
  HomeImprovement = 'home_improvement',
  HomePurchase = 'home_purchase',
  HomeRefi = 'home_refi',
  HouseholdExpenses = 'household_expenses',
  LargePurchases = 'large_purchases',
  LifeEvent = 'life_event',
  MedicalDental = 'medical_dental',
  Motorcycle = 'motorcycle',
  MovingRelocation = 'moving_relocation',
  Other = 'other',
  Rv = 'rv',
  SpecialOccasion = 'special_occasion',
  StudentLoan = 'student_loan',
  StudentLoanRefi = 'student_loan_refi',
  Taxes = 'taxes',
  Vacation = 'vacation',
  Wedding = 'wedding',
}

enum ProvidedCreditRating {
  Excellent = 'excellent',
  Good = 'good',
  Fair = 'fair',
  Poor = 'poor',
  Limited = 'limited',
}

enum PropertyStatus {
  OwnOutright = 'own_outright',
  OwnWithMortgage = 'own_with_mortgage',
  Rent = 'rent',
}

enum EducationLevel {
  HighSchool = 'high_school',
  Associate = 'associate',
  Bachelors = 'bachelors',
  Masters = 'masters',
  Doctorate = 'doctorate',
  OtherGradDegree = 'other_grad_degree',
  Certificate = 'certificate',
  DidNotGraduate = 'did_not_graduate',
  StillEnrolled = 'still_enrolled',
  Other = 'other',
}

enum EmploymentStatus {
  Employed = 'employed',
  EmployedFullTime = 'employed_full_time',
  EmployedPartTime = 'employed_part_time',
  Military = 'military',
  NotEmployed = 'not_employed',
  SelfEmployed = 'self_employed',
  Retired = 'retired',
  Other = 'other',
}

enum EmploymentPayFrequency {
  Biweekly = 'biweekly',
  Monthly = 'monthly',
  TwiceMonthly = 'twice_monthly',
  Weekly = 'weekly',
}

// state is a 2-letter US state code, e.g. 'CA', 'DC', 'NY'
```

{% endtab %}

{% tab title="Flutter" %}

```dart
enum LoanPurpose {
  auto,
  autoPurchase,
  autoRefinance,
  baby,
  boat,
  business,
  carRepair,
  cosmetic,
  creditCardRefi,
  debtConsolidation,
  emergency,
  engagement,
  green,
  homeImprovement,
  homePurchase,
  homeRefi,
  householdExpenses,
  largePurchases,
  lifeEvent,
  medicalDental,
  motorcycle,
  movingRelocation,
  other,
  rv,
  specialOccasion,
  studentLoan,
  studentLoanRefi,
  taxes,
  vacation,
  wedding,
}

enum ProvidedCreditRating {
  excellent,
  good,
  fair,
  poor,
  limited,
}

enum PropertyStatus {
  ownOutright,
  ownWithMortgage,
  rent,
}

enum EducationLevel {
  highSchool,
  associate,
  bachelors,
  masters,
  doctorate,
  otherGradDegree,
  certificate,
  didNotGraduate,
  stillEnrolled,
  other,
}

enum EmploymentStatus {
  employed,
  employedFullTime,
  employedPartTime,
  military,
  notEmployed,
  selfEmployed,
  retired,
  other,
}

enum EmploymentPayFrequency {
  biweekly,
  monthly,
  twiceMonthly,
  weekly,
}

// State is a 2-letter US state enum, e.g. State.CA, State.DC, State.NY
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Do not prefill any fields that are empty or unavailable — omit them so the user is prompted in-flow. Prefilled data must match the type definitions above, and any field backed by an enum must use a valid value. If a value is invalid, that attribute is stripped and the user will have to enter it again manually.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://even-financial.gitbook.io/developer-center/embeddable-integrations/mobile-sdks/personal-loans/experimental/prefill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
