Leads

5 endpoints|Base URL: https://pipe.solar/api/1.1/wf

Create Lead

POST/create-lead

This API creates a new lead in the system by submitting customer and sales representative information.

Body Params

application/json

firstNamestringrequired
lastNamestringrequired
emailstringrequired
phoneNumberstringrequired
addressstringrequired
salesRepEmailstringrequired
1curl -X POST "https://pipe.solar/api/1.1/wf/create-lead" \
2 -H "Authorization: Bearer ps_live_..." \
3 -H "Content-Type: application/json" \
4 -d '{
5 "firstName": "First name of the customer",
6 "lastName": "Last name of the customer",
7 "email": "Email address of the customer",
8 "phoneNumber": "Phone number of the customer",
9 "address": "Full address of the customer",
10 "salesRepEmail": "Email address of the assigned sales representative"
11}'
Response
1{
2 "status": 200,
3 "leaduid": "USFHSH"
4}

Update Lead

POST/update_lead

Updates an existing lead record. This call modifies contact details for the primary applicant and co-applicant.

Body Params

application/json

idstringrequired

A unique 10-character alphanumeric string used to identify this specific lead record.

home_improvementbooleanrequired

A boolean flag used for lead routing: True indicates a Home Improvement lead; False indicates a Solar lead.

primary_first_namestring

The first name of the main applicant for the project.

primary_last_namestring

The last name of the main applicant for the project.

primary_emailstring

The main contact email address for the primary applicant.

primary_phonenumber

The main contact phone number for the primary applicant.

secondary_first_namestring

The first name of the co-applicant (e.g., a spouse or business partner).

secondary_last_namestring

The last name of the co-applicant associated with the lead.

1curl -X POST "https://pipe.solar/api/1.1/wf/update_lead" \
2 -H "Authorization: Bearer ps_live_..." \
3 -H "Content-Type: application/json" \
4 -d '{
5 "id": "example",
6 "home_improvement": true,
7 "primary_first_name": "example",
8 "primary_last_name": "example",
9 "primary_email": "example",
10 "primary_phone": 1,
11 "secondary_first_name": "example",
12 "secondary_last_name": "example",
13 "secondary_email": "example",
14 "secondary_phone": 1
15}'
Response
1{
2 "id": "ABCDE12345",
3 "home_improvement": true,
4 "primary_first_name": "Alex",
5 "primary_last_name": "Rivers",
6 "primary_email": "alex.rivers@example.com",
7 "primary_phone": 5550101234,
8 "secondary_first_name": "Jordan",
9 "secondary_last_name": "Rivers",
10 "secondary_email": "j.rivers@example.com",
11 "secondary_phone": 5550105678
12}

Retrieve Lead by ID

GET/fetch_lead

Query Params

idstringqueryrequired
1curl -X GET "https://pipe.solar/api/1.1/wf/fetch_lead?id=value" \
2 -H "Authorization: Bearer ps_live_..." \
3 -H "Content-Type: application/json"
Response
Successful response

Fetch All Lead (org)

GET/fetch_all_lead

Query Params

org_idstringqueryrequired
pagenumberquery
1curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead?org_id=value" \
2 -H "Authorization: Bearer ps_live_..." \
3 -H "Content-Type: application/json"
Response
Successful response

Fetch All Lead (Installer)

GET/fetch_all_lead_installer

Query Params

installer_idstringqueryrequired
pagenumberquery
1curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead_installer?installer_id=value" \
2 -H "Authorization: Bearer ps_live_..." \
3 -H "Content-Type: application/json"
Response
Successful response