{
  "openapi": "3.0.3",
  "info": {
    "title": "Pipe Solar API",
    "version": "2.0",
    "description": "The Pipe Solar API allows you to manage solar panel installations, monitor energy production, handle billing, and receive real-time webhooks."
  },
  "servers": [
    {
      "url": "https://pipe.solar/api/1.1/wf"
    }
  ],
  "tags": [
    {
      "name": "Projects"
    },
    {
      "name": "Leads"
    },
    {
      "name": "Equipments"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Leads"
    }
  ],
  "paths": {
    "/fetch_project": {
      "get": {
        "operationId": "2farv66w",
        "summary": "Retrieve Project Data by ID",
        "description": "This API retrieves project-related data based on the provided Project ID and returns the project details if a matching Lead record exists.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Unique identifier of the Project used to retrieve the associated project data.",
            "schema": {
              "type": "string",
              "description": "Unique identifier of the Project used to retrieve the associated project data.",
              "example": "D4YR1VSK7K"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "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"
                }
              }
            }
          }
        }
      }
    },
    "/create_project": {
      "post": {
        "operationId": "ig7ndm6g",
        "summary": "Create Project",
        "description": "",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  },
                  "first_name": {
                    "type": "string"
                  },
                  "last_name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone_number": {
                    "type": "string"
                  },
                  "org_id": {
                    "type": "string"
                  },
                  "sales_rep": {
                    "type": "string"
                  },
                  "setter": {
                    "type": "string"
                  },
                  "system_size": {
                    "type": "number"
                  },
                  "annual_production": {
                    "type": "number"
                  },
                  "consumption": {
                    "type": "number"
                  },
                  "system_cost": {
                    "type": "number"
                  },
                  "final_ppw": {
                    "type": "number"
                  },
                  "base_ppw": {
                    "type": "number"
                  },
                  "adder_ppw": {
                    "type": "number"
                  },
                  "financing_type": {
                    "type": "string"
                  },
                  "term_years": {
                    "type": "string"
                  },
                  "apr": {
                    "type": "number"
                  },
                  "project_stage": {
                    "type": "string"
                  },
                  "panel_profile_id": {
                    "type": "string"
                  },
                  "panel_count": {
                    "type": "string"
                  },
                  "inverter_profile_id": {
                    "type": "string"
                  },
                  "inverter_count": {
                    "type": "string"
                  },
                  "lease_ppa_rate": {
                    "type": "string"
                  },
                  "pre_itc_payment": {
                    "type": "string"
                  },
                  "escalator_rate": {
                    "type": "string"
                  },
                  "site_survey_photos": {
                    "type": "array"
                  },
                  "adders": {
                    "type": "array"
                  }
                },
                "required": [
                  "address",
                  "first_name",
                  "last_name",
                  "email",
                  "phone_number",
                  "org_id",
                  "sales_rep",
                  "setter",
                  "system_size",
                  "annual_production",
                  "consumption",
                  "system_cost",
                  "final_ppw",
                  "base_ppw",
                  "adder_ppw"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/update_stage": {
      "post": {
        "operationId": "w6dtxrep",
        "summary": "Update Project Stage",
        "description": "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.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "project_stage_name",
            "in": "query",
            "required": true,
            "description": "The target stage name to be assigned to the project. Must match a valid stage configured in the system.",
            "schema": {
              "type": "string",
              "description": "The target stage name to be assigned to the project. Must match a valid stage configured in the system.",
              "example": "NTP"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Unique identifier of the Project record whose stage needs to be updated.",
            "schema": {
              "type": "string",
              "description": "Unique identifier of the Project record whose stage needs to be updated.",
              "example": "U7X5R0UG12"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "Project status updated successfully.",
                  "data": {
                    "project_id": "U7X5R0UG12",
                    "new_status": "NTP"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/project_upload_file": {
      "post": {
        "operationId": "626y0i08",
        "summary": "Upload File to Project",
        "description": "This API endpoint uploads and stores a file in the correct directory based on the provided folder_id within a specific project.",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileurl": {
                    "type": "array",
                    "description": "The publicly accessible URL of the file to be uploaded"
                  },
                  "project_id": {
                    "type": "string",
                    "description": "The unique identifier of the target Project where the file will be stored",
                    "example": "U7X5R0UG12"
                  },
                  "folder_id": {
                    "type": "string",
                    "description": "This determines which document type directory the file will be uploaded to. Only supported predefined folder_id values are accepted.",
                    "example": "installation_photos",
                    "enum": [
                      "contract",
                      "utility_bill",
                      "drivers_license",
                      "materials",
                      "survey_photos",
                      "engineering_plansets",
                      "permits",
                      "interconnection",
                      "insurance",
                      "installation_photos",
                      "internal_documents"
                    ]
                  }
                },
                "required": [
                  "fileurl",
                  "project_id",
                  "folder_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "File has been saved successfully"
                }
              }
            }
          }
        }
      }
    },
    "/fetch_all_project_installer": {
      "get": {
        "operationId": "j0ow7gdl",
        "summary": "Fetch All Project (Installer)",
        "description": "",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_project": {
      "get": {
        "operationId": "x4hf1x89",
        "summary": "Fetch All Project (Org)",
        "description": "",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/create_activity": {
      "post": {
        "operationId": "zf0dm02f",
        "summary": "Create Activity Log",
        "description": "",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "description": "Project ID for Solar Projects"
                  },
                  "installer_id": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "project_id",
                  "installer_id",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "Activity created successfully",
                  "data": {
                    "project_id": "12345",
                    "installer_id": "abc"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/create-lead": {
      "post": {
        "operationId": "ki1ai1yb",
        "summary": "Create Lead",
        "description": "This API creates a new lead in the system by submitting customer and sales representative information.",
        "tags": [
          "Leads"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string",
                    "example": "First name of the customer"
                  },
                  "lastName": {
                    "type": "string",
                    "example": "Last name of the customer"
                  },
                  "email": {
                    "type": "string",
                    "example": "Email address of the customer"
                  },
                  "phoneNumber": {
                    "type": "string",
                    "example": "Phone number of the customer"
                  },
                  "address": {
                    "type": "string",
                    "example": "Full address of the customer"
                  },
                  "salesRepEmail": {
                    "type": "string",
                    "example": "Email address of the assigned sales representative"
                  }
                },
                "required": [
                  "firstName",
                  "lastName",
                  "email",
                  "phoneNumber",
                  "address",
                  "salesRepEmail"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "status": 200,
                  "leaduid": "USFHSH"
                }
              }
            }
          }
        }
      }
    },
    "/update_lead": {
      "post": {
        "operationId": "v19b3oqi",
        "summary": "Update Lead",
        "description": "Updates an existing lead record. This call modifies contact details for the primary applicant and co-applicant.",
        "tags": [
          "Leads"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "A unique 10-character alphanumeric string used to identify this specific lead record."
                  },
                  "home_improvement": {
                    "type": "boolean",
                    "description": "A boolean flag used for lead routing: True indicates a Home Improvement lead; False indicates a Solar lead."
                  },
                  "primary_first_name": {
                    "type": "string",
                    "description": "The first name of the main applicant for the project."
                  },
                  "primary_last_name": {
                    "type": "string",
                    "description": "The last name of the main applicant for the project."
                  },
                  "primary_email": {
                    "type": "string",
                    "description": "The main contact email address for the primary applicant."
                  },
                  "primary_phone": {
                    "type": "number",
                    "description": "The main contact phone number for the primary applicant."
                  },
                  "secondary_first_name": {
                    "type": "string",
                    "description": "The first name of the co-applicant (e.g., a spouse or business partner)."
                  },
                  "secondary_last_name": {
                    "type": "string",
                    "description": "The last name of the co-applicant associated with the lead."
                  },
                  "secondary_email": {
                    "type": "string",
                    "description": "The contact email address for the co-applicant."
                  },
                  "secondary_phone": {
                    "type": "number",
                    "description": "The contact phone number for the co-applicant."
                  }
                },
                "required": [
                  "id",
                  "home_improvement"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "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
                }
              }
            }
          }
        }
      }
    },
    "/fetch_lead": {
      "get": {
        "operationId": "qx22nfi5",
        "summary": "Retrieve Lead by ID",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_lead": {
      "get": {
        "operationId": "lu2m8pya",
        "summary": "Fetch All Lead (org)",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_lead_installer": {
      "get": {
        "operationId": "u1dda0ml",
        "summary": "Fetch All Lead (Installer)",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_panel": {
      "get": {
        "operationId": "qxwp3m7i",
        "summary": "Fetch All Panel",
        "description": "",
        "tags": [
          "Equipments"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_inverter": {
      "get": {
        "operationId": "5ncwk6ly",
        "summary": "Fetch All Inverter",
        "description": "",
        "tags": [
          "Equipments"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_adders": {
      "get": {
        "operationId": "sdti6rjm",
        "summary": "Fetch All Adders",
        "description": "",
        "tags": [
          "Equipments"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_project_hi": {
      "get": {
        "operationId": "tf94aqui",
        "summary": "Retrieve Project Data by ID",
        "description": "This API retrieves project-related data based on the provided Project ID and returns the project details if a matching Lead record exists.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "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"
                }
              }
            }
          }
        }
      }
    },
    "/fetch_all_project_installer_hi": {
      "get": {
        "operationId": "s2krmjpz",
        "summary": "Fetch All Project (Installer)",
        "description": "",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_project_hi": {
      "get": {
        "operationId": "iflbdsux",
        "summary": "Fetch All Project (Org)",
        "description": "",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/update_stage_hi": {
      "post": {
        "operationId": "azkuh4gm",
        "summary": "Update Project Stage",
        "description": "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.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "project_stage_name",
            "in": "query",
            "required": true,
            "description": "The target stage name to be assigned to the project. Must match a valid stage configured in the system.",
            "schema": {
              "type": "string",
              "description": "The target stage name to be assigned to the project. Must match a valid stage configured in the system."
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Unique identifier of the Project record whose stage needs to be updated.",
            "schema": {
              "type": "string",
              "description": "Unique identifier of the Project record whose stage needs to be updated."
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "Project status updated successfully.",
                  "data": {
                    "project_id": "U7X5R0UG12",
                    "new_status": "NTP"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/project_upload_file_hi": {
      "post": {
        "operationId": "s66w6hh2",
        "summary": "Upload File to Project",
        "description": "This API endpoint uploads and stores a file in the correct directory based on the provided folder_id within a specific project.",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileurl": {
                    "type": "array",
                    "description": "The publicly accessible URL of the file to be uploaded"
                  },
                  "project_id": {
                    "type": "string",
                    "description": "The unique identifier of the target Project where the file will be stored"
                  },
                  "folder_id": {
                    "type": "string",
                    "description": "This determines which document type directory the file will be uploaded to. Only supported predefined folder_id values are accepted.",
                    "enum": [
                      "contract",
                      "utility_bill",
                      "drivers_license",
                      "materials",
                      "survey_photos",
                      "engineering_plansets",
                      "permits",
                      "interconnection",
                      "insurance",
                      "installation_photos",
                      "internal_documents"
                    ]
                  }
                },
                "required": [
                  "fileurl",
                  "project_id",
                  "folder_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "File has been saved successfully"
                }
              }
            }
          }
        }
      }
    },
    "/create_activity_hi": {
      "post": {
        "operationId": "8gzidwco",
        "summary": "Create Activity Log",
        "description": "",
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "description": "Project ID for Home Improvement Projects"
                  },
                  "installer_id": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "project_id",
                  "installer_id",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": "Activity created successfully",
                  "data": {
                    "project_id": "12345",
                    "installer_id": "abc"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fetch_lead_hi": {
      "get": {
        "operationId": "572ocft8",
        "summary": "Retrieve Lead by ID",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "example": {
                  "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"
                }
              }
            }
          }
        }
      }
    },
    "/fetch_all_lead_hi": {
      "get": {
        "operationId": "vyj0u36t",
        "summary": "Fetch All Lead (org)",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/fetch_all_lead_hi_installer": {
      "get": {
        "operationId": "ov4jlc23",
        "summary": "Fetch All Lead (Installer)",
        "description": "",
        "tags": [
          "Leads"
        ],
        "parameters": [
          {
            "name": "installer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    }
  }
}