Solar API v2 - Integration Specs


Post Overview

  1. Request is made as JSON to Post URL

Testing URLs

Post

http://smartleadstesting.com/api/v1/lead_create

Production URLs

Post

https://gopando.io/api/v1/lead_create

Request Headers

The request body may be formatted either as JSON (default) or XML. The API will determine how to parse the request by reading the Content-Type header. The two valid options are:

Content-Type: application/json
Content-Length: < calculated when request is sent >
Host: < calculated when request is sent >
User-Agent: PostmanRuntime/7.26.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

The response will be formatted either as JSON (default). The API will determine how to render the response by reading the Accept header. The two valid options are:

Accept: */*

Contact Variables

Name Data Type Required/ Optional Description
Name string required on POST Name
Email string required on POST Email address
Phone string required on POST phone Number
Publisher Email string required on PING Publisher Email
Country string optional country
country State optional State
State string optional State
Zipcode string optional Zipcode
Category Id string optional Category
City string optional City
Lead Cost string optional Lead Cost
BaseUrl string optional BaseUrl
Recommended_kw string optional Recommended_kw
Savings string optional Savings
Sunlight Per Year string optional Sunlight Per Year
Incentive string optional Incentive
Cost Without Solar string optional Cost Without Solar
Current Monthly Electricity Bill string optional State
Years string optional Years
Add Mid Value string optional Add Mid Value
Total Monthly Bill string optional Total Monthly Bill
Solar Payment Range string optional Solar Payment Range
System Cost string optional System Cost
Apr string optional Apr
Category Id integer optional Category Id
Company Id integer optional Company Id
Cost After Federal Incentive string optional Cost After Federal Incentive

JSON Post Request

POST https://smartleadstesting.com/api/v1/lead_create
Content-Type: application/json
Accept: */*

{
  "name":"josh",
  "lead_email":"josh@yopmail.com",
  "phone_number":"07045185715",
  "address":"",
  "country":"United States",
  "state":"AZ",
  "publisher_id":"publisher@smartlead.com",
  "zipcode":"85605",
  "category_id":"1",
  "city":"Bowie",
  "current_monthly_electricity_bill":"119",
  "lead_cost":"13",
  "baseUrl":"diyenergyreport.com",
  "recommended_kw":"0-1kW",
  "savings":"45,397",
  "sunlight_per_year":"1,543.95",
  "incentive":"75.82478988044573",
  "cost_without_solar":"45739.26800478172",
  "years":"25",
  "add_mid_value":"147.961542698964",
  "total_monthly_bill":"191.404032687552",
  "solar_payment_range":"0-1",
  "system_cost":"291.633807232484",
  "apr":"3.99",
  "category_id":"10",
  "company_id":"207",
  "cost_after_federal_incentive":"215.809017352038"
}

Post Responses

JSON - Success

{
  "succes": true,
  "message": "Lead was successfully Created.",
  "lead": {
      "id": 1151,
      "phone_number": "070145185715",
      "zipcode": "85605",
      "address": "",
      "created_at": "2021-04-15T06:32:18.543-06:00",
      "updated_at": "2021-04-15T06:32:18.543-06:00",
      "state": "AZ",
      "city": "Bowie",
      "country": "United States",
      "phone_verification_token": null,
      "company_id": null,
      "roof_type_id": null,
      "roof_shading_id": null,
      "roof_pitch_id": null,
      "status": null,
      "electricity_provider_id": null,
      "next_follow_up": null,
      "current_monthly_electricity_bill": 119.0,
      "square_feet": null,
      "single_family_home": null,
      "current_homeowner": null,
      "email": "josh1@yopmail.com",
      "name": "josh1",
      "email_confirmed": null,
      "confirm_token": null,
      "phone_verified": false,
      "category_id": 10,
      "partner_id": null,
      "lead_cost": 0,
      "shared_company_ids": null,
      "healthcoverage_id": null,
      "age": null,
      "gender": null,
      "tabacco_user": false,
      "currently_taking": false,
      "like_coverage": null,
      "first_name": null,
      "last_name": null,
      "baseUrl": null,
      "recommended_kw": "0-1kW",
      "savings": "45,397",
      "sunlight_per_year": "1,543.95",
      "solar_panels": null,
      "incentive": null,
      "cost_without_solar": null,
      "years": null,
      "add_mid_value": null,
      "total_monthly_bill": null,
      "solar_payment_range": null,
      "system_cost": null,
      "apr": null,
      "environmental_impact": null,
      "panels": null,
      "cost_after_federal_incentive": null,
      "publisher_id": 71,
      "is_duplicate": false,
      "duplicate_reason": null,
      "campaign_id": null
    }
}

JSON - Denied

{
  "succes": false,
  "message": "Phone number is too short (minimum is 10 characters)"
}