GET https://solarproof.com.au/apidata.php?action=getprojectlineitems

Description

Returns the line items exactly as they appear in the project's price builder, one entry per quote line. Items built from your price list also resolve their linked product — the product type (panel, inverter, battery, heatpump, accessory, racking), brand and model. Custom ad-hoc items (added directly on the quote, not from the price list) return is_custom_item: "Yes" with empty product link fields, so a downstream system can treat them as free-form lines.

Project-scoped, sell-side only: This endpoint only ever returns the items of the one project you request, and the project must belong to your company (requests for another company's project return 403). Your company price list is not exposed through the API, and cost prices are never included in any response.
Also available: The same line_items array is included in the Get Project response, and in the contract_signed webhook payload.

Request Parameters

Query Parameters

Parameter Type Required Description
api_key string Required Your Solar Proof API key
action string Required Must be set to "getprojectlineitems"
project_id integer Required The ID of the project whose line items you want

The Line Item Object

Field Type Description
description string The line's description as shown on the quote
sell_price string Unit sell price
quantity string Quantity of units on the line
units string Unit label, e.g. "panels", "each", "hours"
line_total string Line total (quantity × unit sell price)
applied_rebate string Rebate applied to the line, as shown on the proposal (empty when none is set)
is_custom_item string "Yes" for an ad-hoc line added directly on the quote (not from the price list); "No" for a price-list item
visible_on_proposal string "Yes"/"No" — whether the line is shown on the itemised proposal (hidden lines still count toward the total)
product_type string Linked product type: panel, inverter, battery, heatpump, accessory or racking. Empty for custom/unlinked items.
product_brand string Brand of the linked product from the product catalogue. Empty for custom/unlinked items (and for racking, which has no brand).
product_model string Model of the linked product from the product catalogue. Empty for custom/unlinked items.
Note: Numeric values are returned as strings for Zapier compatibility.

Example Response

Response Body JSON
{
  "status": 200,
  "project_id": 2143,
  "count": 3,
  "line_items": [
    {
      "description": "365W LONGI Solar Panel",
      "sell_price": "210.00",
      "quantity": "33",
      "units": "panels",
      "line_total": "6930.00",
      "applied_rebate": "0",
      "is_custom_item": "No",
      "visible_on_proposal": "Yes",
      "product_type": "panel",
      "product_brand": "LONGI Solar",
      "product_model": "LR6-72PE-365M"
    },
    {
      "description": "GOODWE 5kW Inverter",
      "sell_price": "1450.00",
      "quantity": "1",
      "units": "each",
      "line_total": "1450.00",
      "applied_rebate": "0",
      "is_custom_item": "No",
      "visible_on_proposal": "Yes",
      "product_type": "inverter",
      "product_brand": "GOODWE",
      "product_model": "GW5000-DT"
    },
    {
      "description": "Switchboard upgrade",
      "sell_price": "450.00",
      "quantity": "1",
      "units": "each",
      "line_total": "450.00",
      "applied_rebate": "",
      "is_custom_item": "Yes",
      "visible_on_proposal": "Yes",
      "product_type": "",
      "product_brand": "",
      "product_model": ""
    }
  ]
}

Error Responses

Status Meaning
401 Missing or invalid api_key
403 The project does not belong to your company
422 Missing project_id

A valid project with no priced items returns status 200 with count: 0 and an empty line_items array.

Example Requests

cURL bash
curl -X GET "https://solarproof.com.au/apidata.php?action=getprojectlineitems&project_id=2143&api_key=YOUR_API_KEY"
JavaScript (Fetch) javascript
const apiKey = 'YOUR_API_KEY';
const projectId = 2143;
const url = `https://solarproof.com.au/apidata.php?action=getprojectlineitems&project_id=${projectId}&api_key=${apiKey}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    data.line_items.forEach(item => {
      console.log(`${item.quantity} x ${item.description} @ $${item.sell_price} = $${item.line_total}`);
      if (item.is_custom_item === 'No') {
        console.log(`  Linked product: ${item.product_type} - ${item.product_brand} ${item.product_model}`);
      }
    });
  })
  .catch(error => console.error('Error:', error));
Python python
import requests

api_key = 'YOUR_API_KEY'
project_id = 2143

params = {
    'action': 'getprojectlineitems',
    'project_id': project_id,
    'api_key': api_key
}

response = requests.get('https://solarproof.com.au/apidata.php', params=params)
data = response.json()

for item in data['line_items']:
    print(f"{item['quantity']} x {item['description']} @ ${item['sell_price']} = ${item['line_total']}")
    if item['is_custom_item'] == 'No':
        print(f"  Linked product: {item['product_type']} - {item['product_brand']} {item['product_model']}")

Common Use Cases

Invoicing & Accounting

Recreate the quote line-by-line in your accounting or invoicing system after a contract is signed.

Job Management & Procurement

Push the bill of materials into field-service or job-management platforms — the linked product type/brand/model identifies exactly which hardware to order.

Related Endpoints

Related Webhook Events

contract_signed

Includes the signed project's line_items in the payload