Endpoint

POST https://solarproof.com.au/apidata.php
Send your API key as a query parameter: ?api_key=YOUR_KEY. Post a data field containing a JSON-encoded object with action=createproject.

Request Format

Submit as application/x-www-form-urlencoded with two POST fields:

FieldTypeDescription
action required string Must be createproject
data required JSON string JSON-encoded object containing the project fields listed below

Project Parameters

All fields inside the data JSON object. Fields marked auto are populated from your account defaults if omitted.

Core
ParameterTypeDefaultDescription
quotenickname required string Project name / label shown in the dashboard
username optional string API key owner Assign the project to a specific sales rep by their Solar Proof username. Must belong to the same company as the API key. If omitted, the project is assigned to the company root user.
is_draft optional integer 1 1 = draft, 0 = active project
project_notes auto string account default Internal notes for the project
Customer / Contact
Supply either customer_id or a contact object — not both. The contact block performs a smart lookup: if a customer with that email already exists in your company they are reused; if they exist in a different company a new record is created; if no match is found a new customer is created. The resolved customer_id is always returned in the response.
ParameterTypeDefaultDescription
customer_id optional integer null Link to an existing customer directly by ID. Ignored if contact is also supplied.
contact optional object Contact details for lookup / creation. See sub-fields below.
contact.email string Used as the lookup key. Omit to always create a new customer.
contact.firstname string First name
contact.surname string Surname
contact.phone string Primary phone number
contact.phone2 string Secondary phone number
contact.type string residential residential or commercial
Site Address
Provide at least site_street or site_suburb to store an address. Coordinates are geocoded automatically via Google Maps and embedded in the map project file.
ParameterTypeDefaultDescription
site_street_numberstringStreet number e.g. 42
site_streetstringStreet name e.g. Wallaby Way
site_suburbstringSuburb / city
site_statestringState / territory e.g. NSW
site_postcodestringPostcode e.g. 2000
site_country autostringaccount defaultCountry code e.g. AU
Energy & Usage
ParameterTypeDefaultDescription
dailykwhuse optionalfloatDaily energy consumption in kWh
costperkwh autofloataccount defaultElectricity tariff in $/kWh
powerpriceincrease autofloataccount defaultAnnual power price increase % for savings projections
exportvalue autofloataccount defaultFeed-in tariff $/kWh
exportlimit autointegeraccount defaultExport limit in kW (0 = no limit)
Solar Panels
ParameterTypeDefaultDescription
panel_id autointegeraccount defaultID from the Solar Proof panel database
paneltype autostringaccount defaultPanel type label e.g. Monocrystalline
panelqty autointegeraccount defaultNumber of panels
panelwattage optionalintegerWattage per panel e.g. 415
Inverter
ParameterTypeDefaultDescription
inverter_id autointegeraccount defaultID from the Solar Proof inverter database
invertertype autostringaccount defaultInverter type label
inverterqty autointegeraccount defaultNumber of inverters
Battery (optional)
ParameterTypeDefaultDescription
battery_id autointegeraccount defaultID from the Solar Proof battery database
batteryqty optionalintegerNumber of batteries
battery_only_project optionalinteger01 for battery-only (no solar panels)
STC / Incentives
ParameterTypeDefaultDescription
stcvalue autofloataccount defaultSTC value in $ per certificate
stcqty optionalintegerNumber of STCs — calculated automatically when the project is opened
Installation
ParameterTypeDefaultDescription
racking autostringaccount defaultRacking type e.g. Tin, Tile, Flat
rooftype optionalstringTinRoof material type
roofheight optionalstringSingle Storeye.g. Single Storey, Double Storey, Triple Storey
installation_type autostringaccount defaulte.g. new_system, additional_system, extension_system
phase_supply optionalinteger1 = single phase, 3 = three phase
Site Connection
ParameterTypeDefaultDescription
energyretailer optionalstringEnergy retailer name e.g. AGL
network_distributor optionalstringNetwork distributor / DNSP
nmi optionalstringNational Metering Identifier
meter_number optionalstringElectricity meter number
Finance
ParameterTypeDefaultDescription
financetype autostringaccount defaultcash or finance
quoteexpiry autointegeraccount defaultDays until quote expires
depositamount autofloataccount defaultDeposit amount in $

Examples

Minimal — required field only

All system fields will be populated from your account defaults.

cURL curl -X POST "https://solarproof.com.au/apidata.php?api_key=YOUR_API_KEY" \ -d "action=createproject" \ -d 'data={"quotenickname":"New Lead - 42 Wallaby Way"}'

With sales rep and new contact

Creates a new customer if the email doesn't exist in your company, and assigns the project to a specific rep.

JSON payload { "quotenickname": "Smith Residence", "username": "jsmith", "contact": { "firstname": "Jane", "surname": "Smith", "email": "jane@example.com", "phone": "0411 000 000", "type": "residential" }, "site_street_number": "42", "site_street": "Wallaby Way", "site_suburb": "Sydney", "site_state": "NSW", "site_postcode": "2000", "dailykwhuse": 22, "is_draft": 1 }

Full — all fields specified

JSON payload { "quotenickname": "Smith Residence", "username": "jsmith", "customer_id": 1482, "site_street_number": "42", "site_street": "Wallaby Way", "site_suburb": "Sydney", "site_state": "NSW", "site_postcode": "2000", "site_country": "AU", "dailykwhuse": 22, "costperkwh": 0.28, "powerpriceincrease": 3.5, "exportvalue": 0.10, "exportlimit": 5, "panel_id": 142, "panelqty": 20, "panelwattage": 415, "inverter_id": 88, "inverterqty": 1, "battery_id": 31, "batteryqty": 1, "racking": "Tin", "roofheight": "Single Storey", "installation_type": "new_system", "phase_supply": 1, "energyretailer": "AGL", "nmi": "4102887856", "financetype": "cash", "stcvalue": 38, "project_notes": "Customer prefers morning installation", "is_draft": 0 }

Response

Success 200 OK

JSON { "Message": "Project created successfully!", "id": 2871, "uid": "a3f2c1..._1714000000_b4d9e2", "customer_id": 1482, "assigned_to_user_id": 44, // only present when username was supplied "warning": "Customer already exists and is assigned to a different sales rep..." // only present when applicable }
FieldTypeDescription
idintegerThe new project's ID (pkcustomerquotationid). Use this to link further API calls.
uidstringInternal unique identifier used for file paths
customer_idinteger|nullThe linked customer ID, or null if none was supplied or resolved
assigned_to_user_idintegerOnly present when username was supplied. The pkuserid of the assigned rep.
warningstringOnly present when a contact email matched a customer owned by a different rep within the same company. The project is still created successfully — this is informational only.

Validation Error 422

JSON { "status": 422, "Message": "Username 'jsmith' not found in your company." }

Server Error 500

JSON { "status": 500, "Message": "Failed to create project" }
A 500 error usually means a required database column is missing a value or your API key is invalid. Check your server's PHP error log for the full SQL error message.

Notes

  • Projects are created as drafts (is_draft=1) by default. Set is_draft=0 to create an active project.
  • The account's default quote template is automatically applied. If no project-specific template exists when the project is later opened, the dashboard will fall back to the account default.
  • Fields marked auto fall back to values configured in Account → Defaults. If no default is set, the field will be null.
  • Supply contact instead of customer_id when integrating with external CRMs or lead sources — customer deduplication is handled automatically by email.
  • The username field must match a Solar Proof username belonging to the same company as the API key. An invalid username returns a 422 error.
  • To create a battery-only project, set battery_only_project: 1 and supply a battery_id — omit panel and inverter fields.
  • The panel_id, inverter_id, and battery_id values correspond to IDs in the Solar Proof product database.
  • The project will appear immediately in your dashboard project list once created.