Skip to main content

Your first call - create a project

/projects/create

A common requirement is to create a new project from meta data that you already hold, such as a customer name, address and postcode.

You can create projects using the /projects/create endpoint.

Projects must have an "owner", which must be specified in the request POST. The owner email must be a member of the pro team that owns the API key. The owner can then subsequently share the project with other members of the team if they wish.

Fields you can pass across in the 'meta' object are: projectName customerName customerEmail customerPhone address postcode crmReference

crmReference can be used for your internal reference - it's likely that you will have a unique database ID that you want to be associated with the project. All fields are optional.

You can run this from the command line to try it out. Change the owner email to a user within the Easy PV team (probably your own if you want to be able to check it has been successful), and put your key in the X-API-KEY header.

curl -X 'POST'
  'https://sandbox.heatpunk.co.uk/api/v1/projects/create' 
  -H 'accept: application/json'
  -H 'X-API-KEY: **********KEY***********'
  -H 'Content-Type: application/json' -d '{
  "owner": "sales@midsummerenergy.co.uk",  
  "meta": {
      "customerName": "Joe Bloggs"
  }
}'

The endpoint will return a JSON object with a projectId property. You will almost certainly want to save this projectId within your own database.

https://heatpunk.co.uk/?project=872019

Congratulations! You've used our API to create a project. Read on to see how you can retrieve files and form data from a project.