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 (a raw application/json body with the same fields under a data key is also accepted):
| Field | Type | Description |
| 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
| Parameter | Type | Default | Description |
| 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.
| Parameter | Type | Default | Description |
| 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.
| Parameter | Type | Default | Description |
| site_street_number | string | — | Street number e.g. 42 |
| site_street | string | — | Street name e.g. Wallaby Way |
| site_suburb | string | — | Suburb / city |
| site_state | string | — | State / territory e.g. NSW |
| site_postcode | string | — | Postcode e.g. 2000 |
| site_country auto | string | account default | Country code e.g. AU |
Energy & Usage
| Parameter | Type | Default | Description |
| dailykwhuse optional | float | — | Daily energy consumption in kWh |
| costperkwh auto | float | account default | Electricity tariff in $/kWh |
| powerpriceincrease auto | float | account default | Annual power price increase % for savings projections |
| exportvalue auto | float | account default | Feed-in tariff $/kWh |
| exportlimit auto | integer | account default | Export limit in kW (0 = no limit) |
Solar Panels
| Parameter | Type | Default | Description |
| panel_id auto | integer | account default | ID from the Solar Proof panel database |
| paneltype auto | string | account default | Panel type label e.g. Monocrystalline |
| panelqty auto | integer | account default | Number of panels |
| panelwattage optional | integer | — | Wattage per panel e.g. 415 |
Inverter
| Parameter | Type | Default | Description |
| inverter_id auto | integer | account default | ID from the Solar Proof inverter database |
| invertertype auto | string | account default | Inverter type label |
| inverterqty auto | integer | account default | Number of inverters |
Battery (optional)
| Parameter | Type | Default | Description |
| battery_id auto | integer | account default | ID from the Solar Proof battery database |
| batteryqty optional | integer | — | Number of batteries |
| battery_only_project optional | integer | 0 | 1 for battery-only (no solar panels) |
STC / Incentives
| Parameter | Type | Default | Description |
| stcvalue auto | float | account default | STC value in $ per certificate |
| stcqty optional | integer | — | Number of STCs — calculated automatically when the project is opened |
Installation
| Parameter | Type | Default | Description |
| racking auto | string | account default | Racking type e.g. Tin, Tile, Flat |
| rooftype optional | string | Tin | Roof material type |
| roofheight optional | string | Single Storey | e.g. Single Storey, Double Storey, Triple Storey |
| installation_type auto | string | account default | e.g. new_system, additional_system, extension_system |
| phase_supply optional | integer | — | 1 = single phase, 3 = three phase |
Site Connection
| Parameter | Type | Default | Description |
| energyretailer optional | string | — | Energy retailer name e.g. AGL |
| network_distributor optional | string | — | Network distributor / DNSP |
| nmi optional | string | — | National Metering Identifier |
| meter_number optional | string | — | Electricity meter number |
Finance
| Parameter | Type | Default | Description |
| financetype auto | string | account default | cash or finance |
| quoteexpiry auto | integer | account default | Days until quote expires |
| depositamount auto | float | account default | Deposit 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
}
| Field | Type | Description |
| id | integer | The new project's ID (pkcustomerquotationid). Use this to link further API calls. |
| uid | string | Internal unique identifier used for file paths |
| customer_id | integer|null | The linked customer ID, or null if none was supplied or resolved |
| assigned_to_user_id | integer | Only present when username was supplied. The pkuserid of the assigned rep. |
| warning | string | Only 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.