Complete walkthrough of using the Perch API to submit leads and monitor their progress through the mortgage application lifecycle
x-api-key
: A UUID V4 which grants you access to the Perch APIFirm.id
: The unique identifier of your firmReferralCode.id
: The unique identifier of your firm’s referral codeGET
and update via PATCH
lead
object will be updated with a convertedAt
date, a deletedAt
date (the lead is automatically archived upon conversion) and if Plan
data was included in the lead
’s clientData
object then the plan(s) will be created and the lead will be updated with the related plan_ids
so that you can either join the Plans
on the leads (with an optional param: includes=Plans
) or look them up directlyLead
data, the client must sign up using the same email address that was used to create the Lead
.Plan
is simply the name we’ve given to the resource which contains details related to one or more mortgage applications (e.g. home buying plan, refinancing plan, etc.). Since it is possible for a client to have simultaneous mortgage applications (e.g 1st & 2nd position mortgage / 1st position mortgage + HELOC), we created the Plans
resource to allow for the bucketing of the related applications. You can assume that 90% of the time a Plan has only one mortgage application.
To create a Lead, make a POST
request to the endpoint /firms//leads. Upon successful creation of a Lead we recommend storing the Lead.id primary key in your own system so that you can periodically check for updates on the Lead’s conversion (i.e. did they actually sign up, where are they at in their process, etc.).
Lead
associated with your firm, with details like email, name, and client data. Firms
is the resource used to denote partner organizations. In this case the :id
will be your firm’s unique Firm.id
value which will be provided by your Perch account representative.
Lead
by making a GET request to /leads/. The convertedAt
parameter in the response indicates if/when the lead was converted for a ClientProfile
.
Please make sure you use ?scope=withDeleted
to ensure that the endpoint returns even deleted Leads
.
convertedAt
datetime value denotes the time at which the Lead
was promoted from a Lead
to a ClientProfile
. In most cases, this is when the client completes the Perch registration process.
The deletedAt
datetime value is set at the same time as convertedAt
to automatically archive the lead record by setting the deletedAt
value. If a Perch Representative archives a Lead
the deletedAt
value will be populated, but the convertedAt
value will not.
Lead
record will receive a one time update in which the convertedAt
and deletedAt
value will be setFirm Member
owners associated with the Firm
, who have an active Perch Notification subscription will receive an email alert letting them know the lead has converted. Your Perch Account Manager can help you set this upPlans
were included in the ClientData
of the Lead
, a planId
will also be set in the Plan object response. You can extend your GET request to fetch Leads to include Plan data or use this plan_id
to access the Plan
details via the Plan endpoint. You can learn more about including Plan
data in your Lead
in section 4 belowLeads
created by the provided Firm
. The default list limit
is 50 and offset
is 0. Please refer to our detailed API documentation to learn about the use of params like limit
and offset
to page through results.
Plan
data as part of your Lead
submission, we will automatically make you an owner of that plan upon conversion which means you’ll be able to access the Plan via API should you wish to monitor the Client’s application progress. You’ll also be subscribed to email updates for Plans where you are an owner.
Plans
created by a client after registration will not automatically be accessible by the Lead
owner.Plan
data when creating a lead is simple as seen in the example below. Notice the inclusion of Plans
array in the clientData object in request body. In this case we are including one plan with the deal purpose of Buying
(Please make note of the various Plan types
in our full API documentation). Plans
is an array and can accept one or more values (e.g. the client is looking to Buy and Renew an existing mortgage).
Plan
object to contain a plan.id
value which you can use to retrieve that plan’s details. The plan is automatically created during the lead conversion workflow (i.e. when the lead accepts the invitation and signs up for Perch).
Lead
with one or more Plans
, you are automatically granted access to those plans THROUGH your ownership of the Lead. The simplest way to access those Plans is to simply join the Plans
data onto a GET
Leads
request as seen below. Include the withDeleted scope to ensure that both converted and unconverted Leads are returned in your response.
firmId
. This response provides a snapshot of the current mortgage applications that you are able to access.
The response will contain an array of Leads
owned by the provided firmId
and any associated Plans
. The default list limit
is 50 and offset
is 0. Please refer to our detailed API documentation to learn about the use of params like limit
and offset
to page through results.
Lead
with additional details up until the point where the lead has converted (as denoted by the convertedAt
and deletedAt
datetime value being set). Updating a Lead
after conversion is not advantageous as the conversion process whereby lead data populates the client’s profile will have already taken place.
You can update a lead through the PATCH /leads/.
Lead
. To disable this default messaging when creating a Lead
, you can use the disableClientOutreach
parameter in your POST /firms//leads/.
You may wish to apply this flag if you want to manage your own automated lead outreach messaging strategy.
withDeleted
scope in your GET /firms//leads: