Starting a new application
A new Application in Prime API represents the beginning of a loan request. The process starts after a successful pre-qualification check and requires two key pieces of information: an invitation ID (obtained from eligibility) and a user ID (Borrower identifier).
When creating an Application, the system automatically handles several critical setup tasks: validates the invitation, create the Application record, generates required documentation (e.g. consent forms and agreements), and provide a banking Link Token for secure bank account linking. Each Application receives a unique identifier which is used throughout the Borrower lifecycle.
Applications start in a 'draft' state and includes essential components like static documents that need signing, a banking Link Token, and initial metadata. The Application ID returned from this process is used to reference all future operations related to the loan request.
Code sample
# Sample code to create a new application
import requests
def create_application(access_token: str, invitation_id: str, user_id: str):
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
payload = {
"invitation_id": invitation_id,
"user_id": user_id
}
response = requests.post(
"https://api.primeft.com/v2/applications",
json=payload,
headers=headers
)
if response.status_code == 201:
result = response.json()
application_id = result["id"]
link_token = result["link_token"]
documents = result["documents"]
return {
"application_id": application_id,
"link_token": link_token, # Use this to setup bank connection
"documents": documents # Pre-generated consent documents
}
Updated about 2 months ago