Your first call - create a project
/projects/create
You can create a new project using the projects/create endpoint.
Constructing your API request
All 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.
Additional information needs to be included in the meta
object. This can include: projectName
customerName
customerEmail
customerPhone
address
postcode
crmReference
projectType
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.
projectType
can be used to set the design mode for the project (three-d-model
, quick-roof
, roof-outline
). For 3D projects you can also enable automatic roof scanning functionality by including "magicMode" : "true"
.
You can run this from the command line or using a tool like postman 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.easy-pv.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.
You can link directly to a project with a link of the following format:
https://easy-pv.co.uk/?project=872019
Congratulations! You've used our API to create a project within Easy PV. Read on to see how you can retrieve files and form data from an Easy PV project.