Skip to main content

Get project details, bill of materials and order links

Easy PV and Heatpunk generate a full bill of materials for a project, and for our UK and Ireland sites you can very quickly place an order for the components from Midsummer. So you may like to import the shopping cart into your application and display an ordering link. Users love the ease of ordering all the kit for an installation.

The cart is based on the bill of materials generated by the software for a given project. The bill of materials for the project is refreshed every time the overview page of the project is opened by a user in Easy PV or Heatpunk.

To fetch project data, including the cart and order link, use the api/v1/projects/data endpoint. You need to pass in the project ID, and the user you are acting as. The user must have view rights to the project.

Sample request:

curl --location 'https://heatpunk.co.uk/api/v1/projects/data?projectId=[YOUR PROJECT ID]&userEmail=[YOUR USER EMAIL]' \
--header 'accept: application/json' \
--header 'X-API-KEY: [YOUR API KEY]'

What to expect in the response:

You will get back a projectData array which will include core project and customer information. For example:

{
    "status": "success",
    "projectData": {
        "lat": 52.23060119001846,
        "lng": 0.1403758374017583,
        "zoom": 21,
        "address": "91 Kings Hedges Rd, Cambridge , UK",
        "postcode": "CB4 2QD",
        "dateCreated": "2024-07-31 10:48:44",
        "dateModified": "2024-11-06 09:11:14",
        "projectName": "Clone of Tue Jul 30 2024",
        "customerName": "Mart",
        "buildDate": "pre2000",
        "customerPhone": "Ergnes",
        "customerEmail": "mart.ergnes@outlook.com",
        "projectType": "heat",
        "userID": "1316",
        "status": "Lead",
        "projectID": "25062",
        "altitude": 12.3244800567627,
        "geography": {
            "altitude": null,
            "distance": null,
            "hillSlope": null,
            "hillZone": null,
            "terrain": null,
            "topography": null,
            "windZone": null
        }
    }
}