Why use prequalification?
All products at once
Returns maximum affordability across all products in a single call, rather
than requiring separate calculations per product.
Guideline-aware
Validates against all encoded guidelines and pricing rules, ensuring
accurate qualification estimates.
Minimal input
Requires only 8 pieces of information to get comprehensive affordability
results.
Real-time pricing
Uses live rates and guidelines at the time of calculation, not static
assumptions.
How it works
Prequalification is an asynchronous operation. When you create a prequalification request, it returns a job ID that you must poll to get the results.Create prequalification
Submit a mutation with borrower information to create a prequalification
job.
Poll for completion
Poll the prequalification query endpoint until the job status indicates
completion.
Creating a prequalification
To create a prequalification, you need 8 pieces of information:Required input fields
| Field | Type | Description |
|---|---|---|
fipsCountyCode | String! | Five-digit FIPS county code for the property location |
qualifyingFicoScore | Int! | FICO score used for qualification |
qualifyingAssetsTotalAmount | NonNegativeInt! | Borrower’s total qualifying assets in dollars |
qualifyingMonthlyIncome | NonNegativeInt! | Borrower’s total qualifying monthly income |
qualifyingMonthlyExpenses | NonNegativeInt! | Borrower’s total qualifying monthly expenses |
Optional input fields
| Field | Type | Default | Description |
|---|---|---|---|
propertyUsageType | PropertyUsageType | PRIMARY_RESIDENCE | PRIMARY_RESIDENCE, SECOND_HOME, or INVESTMENT |
neighborhoodHousingType | NeighborhoodHousingType | SINGLE_FAMILY | Property type (e.g., SINGLE_FAMILY, CONDOMINIUM) |
hoaDues | NonNegativeInt | 0 | Monthly HOA dues in dollars |
maxDiscountPointsTotal | Float | 0 | Maximum total discount points |
Response
The mutation returns a job ID:Save the
id from the response. You’ll use it to poll for results.Polling for results
After creating a prequalification, poll the query endpoint to check the job status and retrieve results:Job status
Thestatus field indicates the current state of the prequalification:
| Status | Description | Action |
|---|---|---|
PROCESSING | Job is queued and processing | Continue polling |
SUCCEEDED | Calculation finished successfully | Read result field |
FAILED | Calculation encountered an error | Surface failure to user |
Polling strategy
Implement exponential backoff when polling to avoid excessive API calls:Understanding results
When the prequalification completes, theresult field contains maximum affordability information:
Result fields
Theresult field is the best eligible result across all products:
| Field | Description |
|---|---|
product | The loan product with the optimal prequalification result |
loanAmount | Maximum qualifying loan amount |
salesContractAmount | Maximum qualifying purchase price |
ltv | Loan-to-value ratio for the result |
rate | Interest rate for the result |
apr | Annual percentage rate for the result |
discountPointsTotal | Total discount points |
discountPointsTotalAmount | Total discount points in dollars |
The top-level
result represents the best eligible product. Use the
productBreakdown array to show borrowers per-product results, including
ineligibility details when a product does not qualify.Complete example
Here’s a complete TypeScript example that creates a prequalification and polls for results:Best practices
-
Handle errors gracefully: When
statusisFAILED, surface a meaningful message to borrowers and offer to retry. - Set reasonable timeouts: Most prequalifications complete within 30 seconds, but set a maximum timeout (e.g., 2-3 minutes) to avoid indefinite polling.
- Cache results: Prequalification results are valid for a period of time. Consider caching results with the input parameters as a key to avoid redundant calculations.
- Show product breakdown: Display results per product so borrowers can see which products offer the highest affordability.
- Explain limitations: Help borrowers understand that prequalification is an estimate and actual qualification may vary based on complete application details.
- Use for lead qualification: Prequalification is perfect for initial borrower conversations to quickly assess affordability before creating a full loan application.
Error handling
Common error scenarios and how to handle them:| Error Code | Description | Resolution |
|---|---|---|
INVALID_INPUT | One or more input fields are invalid | Validate inputs before submission |
GUIDELINE_VIOLATION | Borrower doesn’t meet minimum guidelines | Explain qualification requirements to borrower |
RATE_UNAVAILABLE | No rates available for the given parameters | Try adjusting inputs or explain market conditions |
TIMEOUT | Calculation took too long | Retry the prequalification request |
Related resources
- Pricing scenarios - Show detailed pricing options for specific loan amounts
- Tracking loan updates - Learn how to poll for asynchronous job status
- Marketing rates - Display competitive rates on your website