# Pipe Solar API — Complete API Reference The Pipe Solar API allows you to manage solar panel installations, monitor energy production, handle billing, and receive real-time webhooks. ## Overview - **Base URL**: `https://pipe.solar/api/1.1/wf` - **Version**: 2.0 - **Authentication**: Include your API key as a Bearer token in the Authorization header Example: `Authorization: Bearer YOUR_API_KEY` - **Content-Type**: application/json for request and response bodies - **API Key**: Contact admin@pipe.solar to obtain your API key ## Quick Reference | Method | Endpoint | Description | |--------|----------|-------------| | GET | `/fetch_project` | Retrieve Project Data by ID | | POST | `/create_project` | Create Project | | POST | `/update_stage` | Update Project Stage | | POST | `/project_upload_file` | Upload File to Project | | GET | `/fetch_all_project_installer` | Fetch All Project (Installer) | | GET | `/fetch_all_project` | Fetch All Project (Org) | | POST | `/create_activity` | Create Activity Log | | POST | `/create-lead` | Create Lead | | POST | `/update_lead` | Update Lead | | GET | `/fetch_lead` | Retrieve Lead by ID | | GET | `/fetch_all_lead` | Fetch All Lead (org) | | GET | `/fetch_all_lead_installer` | Fetch All Lead (Installer) | | GET | `/fetch_all_panel` | Fetch All Panel | | GET | `/fetch_all_inverter` | Fetch All Inverter | | GET | `/fetch_all_adders` | Fetch All Adders | | GET | `/fetch_project_hi` | Retrieve Project Data by ID | | GET | `/fetch_all_project_installer_hi` | Fetch All Project (Installer) | | GET | `/fetch_all_project_hi` | Fetch All Project (Org) | | POST | `/update_stage_hi` | Update Project Stage | | POST | `/project_upload_file_hi` | Upload File to Project | | POST | `/create_activity_hi` | Create Activity Log | | GET | `/fetch_lead_hi` | Retrieve Lead by ID | | GET | `/fetch_all_lead_hi` | Fetch All Lead (org) | | GET | `/fetch_all_lead_hi_installer` | Fetch All Lead (Installer) | --- ## Projects ### GET `https://pipe.solar/api/1.1/wf/fetch_project` **Retrieve Project Data by ID** This API retrieves project-related data based on the provided Project ID and returns the project details if a matching Lead record exists. **Parameters:** - `id` (string) **required** - Unique identifier of the Project used to retrieve the associated project data. **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_project?id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Example Response:** ```json { "data": { "customerFirstName": "John", "customerLastName": "Doe", "customerPhoneNumber": "555-123-9876", "customerEmail": "john.doe@example.com", "customerAddress": "123 Solar St, Suite 100", "customerStreet": "123 Solar St", "customerCity": "Sunville", "customerState": "CA", "customerZip": "90210", "secondaryCustomerFirstName": "Jane", "secondaryCustomerLastName": "Doe", "secondaryCustomerPhoneNumber": "555-222-1111", "secondaryCustomerEmail": "jane.doe@example.com", "projectStatus": "Contract Signed", "contractSignedDate": "11/14/2025", "submittedDate": "11/14/2025", "projectSiteId": "3423523", "contractURL": "https://example.com/contract.pdf", "allFilesURL": { "surveyFiles": "https://example.com/files/survey_photos", "personalFiles": "https://example.com/files/personal", "utilityBills": "https://example.com/files/utility_bills", "insuranceFiles": "https://example.com/files/insurance_docs", "driverLicense": "https://example.com/files/license", "installationPhotos": "https://example.com/files/installation", "plansets": "https://example.com/files/plans", "materials": "https://example.com/files/materials", "otherDocuments": "https://example.com/files/other_docs", "interconnection": "https://example.com/files/interconnection", "permits": "https://example.com/files/permits", "internalDocuments": "https://example.com/files/internal_docs" }, "proposalURL": "https://example.com/proposal?id=12345", "projectURL": "https://example.com/project_dashboard?id=12345", "systemSize": "8.5", "estProduction": "15584.44", "numberOfPanel": "20", "panelModel": "QCells 400W", "numberOfInverter": "1", "inverterName": "Enphase IQ8 Microinverter", "contractPrice": "18,450.01", "numberOfBattery": "1", "batteryName": "Tesla Powerwall 3", "financeCompany": "GoodLeap", "financeAmount": "18,450.01", "financeAPR": "3.99", "financeTerm": "20", "financeType": "Loan", "basePPW": "2.15", "finalPPW": "2.35", "adders": [ "Main panel upgrade", "Roof work" ], "addersCost": "1,028.58", "salesRepName": "Michael Scott", "salesRepEmail": "michael.scott@pipesolar.com", "salesRepPhone": "555-789-4561", "setterName": "Dwight Schrute", "setterEmail": "dwight.schrute@pipesolar.com", "setterPhone": "555-777-1212", "siteSurveyorName": "dwight.schrute@pipesolar.com", "subContractorName": "555-777-1212" }, "id": "D4YR1VSK7K" } ``` ### POST `https://pipe.solar/api/1.1/wf/create_project` **Create Project** **Request Body (JSON):** - `address` (string) **required** - `first_name` (string) **required** - `last_name` (string) **required** - `email` (string) **required** - `phone_number` (string) **required** - `org_id` (string) **required** - `sales_rep` (string) **required** - `setter` (string) **required** - `system_size` (number) **required** - `annual_production` (number) **required** - `consumption` (number) **required** - `system_cost` (number) **required** - `final_ppw` (number) **required** - `base_ppw` (number) **required** - `adder_ppw` (number) **required** - `financing_type` (string) - `term_years` (string) - `apr` (number) - `project_stage` (string) - `panel_profile_id` (string) - `panel_count` (string) - `inverter_profile_id` (string) - `inverter_count` (string) - `lease_ppa_rate` (string) - `pre_itc_payment` (string) - `escalator_rate` (string) - `site_survey_photos` (array) - `adders` (array) **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/create_project" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "address": "value", "first_name": "value", "last_name": "value", "email": "value", "phone_number": "value", "org_id": "value", "sales_rep": "value", "setter": "value", "system_size": "0", "annual_production": "0", "consumption": "0", "system_cost": "0", "final_ppw": "0", "base_ppw": "0", "adder_ppw": "0", "financing_type": "value", "term_years": "value", "apr": "0", "project_stage": "value", "panel_profile_id": "value", "panel_count": "value", "inverter_profile_id": "value", "inverter_count": "value", "lease_ppa_rate": "value", "pre_itc_payment": "value", "escalator_rate": "value", "site_survey_photos": "value", "adders": "value" }' ``` ### POST `https://pipe.solar/api/1.1/wf/update_stage` **Update Project Stage** This endpoint updates the stage of an existing project. When the API is invoked, it searches for the project using the provided id and updates the project’s stage to the specified project_stage_name. The change is then reflected across the related project and deal records. **Parameters:** - `project_stage_name` (string) **required** - The target stage name to be assigned to the project. Must match a valid stage configured in the system. - `id` (string) **required** - Unique identifier of the Project record whose stage needs to be updated. **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/update_stage?project_stage_name=VALUE&id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Example Response:** ```json { "success": true, "message": "Project status updated successfully.", "data": { "project_id": "U7X5R0UG12", "new_status": "NTP" } } ``` ### POST `https://pipe.solar/api/1.1/wf/project_upload_file` **Upload File to Project** This API endpoint uploads and stores a file in the correct directory based on the provided folder_id within a specific project. **Request Body (JSON):** - `fileurl` (array) **required** - The publicly accessible URL of the file to be uploaded - `project_id` (string) **required** - The unique identifier of the target Project where the file will be stored - `folder_id` (string) **required** - This determines which document type directory the file will be uploaded to. Only supported predefined folder_id values are accepted. Allowed values: contract, utility_bill, drivers_license, materials, survey_photos, engineering_plansets, permits, interconnection, insurance, installation_photos, internal_documents **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/project_upload_file" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileurl": "value", "project_id": "value", "folder_id": "value" }' ``` **Example Response:** ```json { "success": true, "message": "File has been saved successfully" } ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_project_installer` **Fetch All Project (Installer)** **Parameters:** - `installer_id` (string) - `page` (number) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_project_installer?installer_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_project` **Fetch All Project (Org)** **Parameters:** - `org_id` (number) **required** - `page` (number) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_project?org_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### POST `https://pipe.solar/api/1.1/wf/create_activity` **Create Activity Log** **Request Body (JSON):** - `project_id` (string) **required** - Project ID for Solar Projects - `installer_id` (string) **required** - `notes` (string) **required** **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/create_activity" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "project_id": "value", "installer_id": "value", "notes": "value" }' ``` **Example Response:** ```json { "success": true, "message": "Activity created successfully", "data": { "project_id": "12345", "installer_id": "abc" } } ``` --- ## Leads ### POST `https://pipe.solar/api/1.1/wf/create-lead` **Create Lead** This API creates a new lead in the system by submitting customer and sales representative information. **Request Body (JSON):** - `firstName` (string) **required** - `lastName` (string) **required** - `email` (string) **required** - `phoneNumber` (string) **required** - `address` (string) **required** - `salesRepEmail` (string) **required** **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/create-lead" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "firstName": "value", "lastName": "value", "email": "value", "phoneNumber": "value", "address": "value", "salesRepEmail": "value" }' ``` **Example Response:** ```json { "status": 200, "leaduid": "USFHSH" } ``` ### POST `https://pipe.solar/api/1.1/wf/update_lead` **Update Lead** Updates an existing lead record. This call modifies contact details for the primary applicant and co-applicant. **Request Body (JSON):** - `id` (string) **required** - A unique 10-character alphanumeric string used to identify this specific lead record. - `home_improvement` (boolean) **required** - A boolean flag used for lead routing: True indicates a Home Improvement lead; False indicates a Solar lead. - `primary_first_name` (string) - The first name of the main applicant for the project. - `primary_last_name` (string) - The last name of the main applicant for the project. - `primary_email` (string) - The main contact email address for the primary applicant. - `primary_phone` (number) - The main contact phone number for the primary applicant. - `secondary_first_name` (string) - The first name of the co-applicant (e.g., a spouse or business partner). - `secondary_last_name` (string) - The last name of the co-applicant associated with the lead. - `secondary_email` (string) - The contact email address for the co-applicant. - `secondary_phone` (number) - The contact phone number for the co-applicant. **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/update_lead" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "value", "home_improvement": "true", "primary_first_name": "value", "primary_last_name": "value", "primary_email": "value", "primary_phone": "0", "secondary_first_name": "value", "secondary_last_name": "value", "secondary_email": "value", "secondary_phone": "0" }' ``` **Example Response:** ```json { "id": "ABCDE12345", "home_improvement": true, "primary_first_name": "Alex", "primary_last_name": "Rivers", "primary_email": "alex.rivers@example.com", "primary_phone": 5550101234, "secondary_first_name": "Jordan", "secondary_last_name": "Rivers", "secondary_email": "j.rivers@example.com", "secondary_phone": 5550105678 } ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_lead` **Retrieve Lead by ID** **Parameters:** - `id` (string) [query] **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_lead?id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_lead` **Fetch All Lead (org)** **Parameters:** - `org_id` (string) **required** - `page` (number) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead?org_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_lead_installer` **Fetch All Lead (Installer)** **Parameters:** - `installer_id` (string) **required** - `page` (number) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead_installer?installer_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` --- ## Equipments ### GET `https://pipe.solar/api/1.1/wf/fetch_all_panel` **Fetch All Panel** **Parameters:** - `installer_id` (string) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_panel?installer_id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_inverter` **Fetch All Inverter** **Parameters:** - `installer_id` (string) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_inverter?installer_id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_adders` **Fetch All Adders** **Parameters:** - `installer_id` (string) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_adders?installer_id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` --- ## Projects ### GET `https://pipe.solar/api/1.1/wf/fetch_project_hi` **Retrieve Project Data by ID** This API retrieves project-related data based on the provided Project ID and returns the project details if a matching Lead record exists. **Parameters:** - `id` (string) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_project_hi?id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Example Response:** ```json { "data": { "customerFirstName": "John", "customerLastName": "Doe", "customerPhoneNumber": "9876543210", "customerEmail": "john.doe@example.com", "customerAddress": "221B Baker Street, London, NW1 6XE, UK", "customerStreet": "221B Baker Street", "customerCity": "London", "customerState": "Greater London", "customerZip": "NW1 6XE", "secondaryCustomerFirstName": "Jane", "secondaryCustomerLastName": "Doe", "secondaryCustomerPhoneNumber": "9876500000", "secondaryCustomerEmail": "jane.doe@example.com", "customerNotes": "Customer prefers morning calls and is interested in energy savings.", "projectStatus": "NTP", "contractSignedDate": "03/15/26", "submittedDate": "03/20/26", "contractURL": [ "https://example.com/contracts/contract_12345.pdf" ], "allFilesURL": { "surveyFiles": [ "https://example.com/files/survey1.jpg" ], "personalFiles": [ "https://example.com/files/id_proof.jpg" ], "utilityBills": [ "https://example.com/files/utility_bill.pdf" ], "insuranceFiles": [], "driverLicense": [ "https://example.com/files/license.jpg" ], "installationPhotos": [ "https://example.com/files/install1.jpg" ], "plansets": [ "https://example.com/files/planset.pdf" ], "materials": [], "otherDocuments": [], "interconnection": [], "permits": [], "internalDocuments": [] }, "proposalURL": "https://example.com/proposal/12345", "projectURL": "https://example.com/project/12345", "financeCompany": "Test Finance Co", "financeAmount": "15000", "financeAPR": "5.5", "financeDealerFee": "10", "financeTerm": "60", "monthlyPayment": "285", "financeType": "Loan", "Products": [ { "product_name": "Windows A", "product_cost": "900" }, { "product_name": "Tesla Powerwall 3 13.5 kWh", "product_cost": "12000" }, { "product_name": "Solar Panel Kit 5kW", "product_cost": "7500" } ], "adjustments": "500", "contractPrice": "19900", "salesRepName": "Michael Scott", "salesRepEmail": "michael.scott@dundermifflin.com", "salesRepPhone": "1234567890", "setterName": "Dwight Schrute", "setterEmail": "dwight.schrute@dundermifflin.com", "setterPhone": "0987654321" }, "id": "TEST12345" } ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_project_installer_hi` **Fetch All Project (Installer)** **Parameters:** - `installer_id` (string) **required** - `page` (number) **required** **Request Body (JSON):** - `` (string) - `` (string) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_project_installer_hi?installer_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_project_hi` **Fetch All Project (Org)** **Parameters:** - `org_id` (string) **required** - `page` (number) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_project_hi?org_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### POST `https://pipe.solar/api/1.1/wf/update_stage_hi` **Update Project Stage** This endpoint updates the stage of an existing project. When the API is invoked, it searches for the project using the provided id and updates the project’s stage to the specified project_stage_name. The change is then reflected across the related project and deal records. **Parameters:** - `project_stage_name` (string) **required** - The target stage name to be assigned to the project. Must match a valid stage configured in the system. - `id` (string) **required** - Unique identifier of the Project record whose stage needs to be updated. **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/update_stage_hi?project_stage_name=VALUE&id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Example Response:** ```json { "success": true, "message": "Project status updated successfully.", "data": { "project_id": "U7X5R0UG12", "new_status": "NTP" } } ``` ### POST `https://pipe.solar/api/1.1/wf/project_upload_file_hi` **Upload File to Project** This API endpoint uploads and stores a file in the correct directory based on the provided folder_id within a specific project. **Request Body (JSON):** - `fileurl` (array) **required** - The publicly accessible URL of the file to be uploaded - `project_id` (string) **required** - The unique identifier of the target Project where the file will be stored - `folder_id` (string) **required** - This determines which document type directory the file will be uploaded to. Only supported predefined folder_id values are accepted. Allowed values: contract, utility_bill, drivers_license, materials, survey_photos, engineering_plansets, permits, interconnection, insurance, installation_photos, internal_documents **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/project_upload_file_hi" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileurl": "value", "project_id": "value", "folder_id": "value" }' ``` **Example Response:** ```json { "success": true, "message": "File has been saved successfully" } ``` ### POST `https://pipe.solar/api/1.1/wf/create_activity_hi` **Create Activity Log** **Request Body (JSON):** - `project_id` (string) **required** - Project ID for Home Improvement Projects - `installer_id` (string) **required** - `notes` (string) **required** **cURL Example:** ```bash curl -X POST "https://pipe.solar/api/1.1/wf/create_activity_hi" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "project_id": "value", "installer_id": "value", "notes": "value" }' ``` **Example Response:** ```json { "success": true, "message": "Activity created successfully", "data": { "project_id": "12345", "installer_id": "abc" } } ``` --- ## Leads ### GET `https://pipe.solar/api/1.1/wf/fetch_lead_hi` **Retrieve Lead by ID** **Parameters:** - `id` (string) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_lead_hi?id=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` **Example Response:** ```json { "customerFirstName": "John", "customerLastName": "Doe", "customerPhoneNumber": "7865550001", "customerEmail": "john.doe@example.com", "customerAddress": "500 Biscayne Blvd, Miami, FL 33132, USA", "customerStreet": "500 Biscayne Boulevard", "customerCity": "Miami", "customerState": "Florida", "customerZip": "33132", "secondaryCustomerFirstName": "Jane", "secondaryCustomerLastName": "Doe", "secondaryCustomerPhoneNumber": "7865550002", "secondaryCustomerEmail": "jane.doe@example.com", "customerNotes": "Customer interested in battery backup and lower monthly payments.", "projectStatus": "Contract Signed", "contractSignedDate": "03/28/26", "submittedDate": "03/30/26", "contractURL": [ "https://example.com/contracts/john_doe_contract.pdf" ], "proposalURL": "https://example.com/proposal/123456", "projectURL": "https://example.com/project/123456", "financeCompany": "LightReach", "financeAmount": "30000.00", "financeAPR": "1.49", "financeDealerFee": "7", "financeTerm": "18", "monthlyPayment": "1750.00", "financeType": "Lease", "Products": [ { "product_name": "Lion Energy 13.5 kWh", "product_cost": "15000" }, { "product_name": "Backup Gateway System", "product_cost": "4500" } ], "adjustments": "500", "contractPrice": "30500", "salesRepName": "Alex Bennett", "salesRepEmail": "admin@pipe.solar", "salesRepPhone": "6157856656", "setterName": "Alex Bennett", "setterEmail": "admin@pipe.solar", "setterPhone": "6157856656", "id": "JD12345" } ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_lead_hi` **Fetch All Lead (org)** **Parameters:** - `org_id` (string) **required** - `page` (string) **required** **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead_hi?org_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### GET `https://pipe.solar/api/1.1/wf/fetch_all_lead_hi_installer` **Fetch All Lead (Installer)** **Parameters:** - `installer_id` (string) **required** - `page` (string) **cURL Example:** ```bash curl -X GET "https://pipe.solar/api/1.1/wf/fetch_all_lead_hi_installer?installer_id=VALUE&page=VALUE" \ -H "Authorization: Bearer YOUR_API_KEY" ``` --- ## Authentication Example ```bash curl -X GET "https://pipe.solar/api/1.1/wf/YOUR_ENDPOINT" \ -H "Authorization: Bearer YOUR_API_KEY" ``` --- *This document is auto-generated from the Pipe Solar API database and always reflects the latest endpoints.*