Determining which Element to use
Check the loan’ssubmitted property:
- If
submitted: false→ Use the Loan Application Element - If
submitted: true→ Use the Borrower Dashboard Element
Retrieving loans
Retrieve all loans for a user using theborrowerUser GraphQL query:
Example implementation
Starting a new loan
To start a new loan application, load the Loan Application Element without aloanId:
Pre-filling data with the GraphQL API
You can use the GraphQL API to pre-fill borrower information before initializing Elements. This is useful when you already have borrower data from your system or want to create a more streamlined experience.How it works
- Create a loan via API - Use the GraphQL API to create a loan and add borrower information (personal details, income, assets, property information, etc.)
- Initialize the Element - Pass the
loanIdto the Element - Data is pre-filled - The Element automatically displays all the data you added via the API, pre-filled on behalf of the borrower
Example: Pre-filling a loan application
You can continue to add or update data via the GraphQL API even after the Element is initialized. The Element will reflect the latest data from the API automatically.
Next steps
- Loan Application Element - For new applications
- Borrower Dashboard Element - For submitted applications
- Complete integration guide - Learn how to use the GraphQL API to create loans and manage borrower data