Skip to main content

Your first call - create a project

This guide walks you through creating a new Easy PV project using our Open API. 


Authentication

Endpoint:  

POST https://[DOMAIN]/api/v1/projects/create

Headers:

  • accept: application/json
  • X-API-KEY: YOUR_API_KEY     (Replace YOUR_API_KEY with your actual API key.)
  • Content-Type: application/json

Request structure

Every project request must include the following:

Owner field:

The owner should be a valid email address of an Easy PV Pro team member. This email will become the primary project owner.    

Meta object: 

Use the meta object to set additional project settings and information.

  • projectType Sets the design mode for the project. Allowed values: 
    • "three-d-model"
    • "quick-roof"
    • "roof-outline"
  • "magicMode" : true   Enable automatic roof scanning - only available for three-d-model projects
  • customerName
  • customerEmail
  • customerPhone
  • address
  • postcode
  • lat and lng - provide the latitude and longitude in the decimal degrees format
  • zoom - set the zoom level of the satellite map imagery
  • status - set the status of the project. Allowed values:
    • "Lead"
    • "Quote"
    • "Sale"
    • "Install"
    • "Completed"
    • "Rejected"
  • crmReference - include an ID or reference to the customer record or project in your CRM

Example API Request

Below is an example using curl that demonstrates how to create a project with the required fields:

curl -X POST 'https://sandbox.easy-pv.co.uk/api/v1/projects/create' \
     -H 'accept: application/json' \
     -H 'X-API-KEY: YOUR_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
           "owner": "sales@example.com",
           "meta": {
               "projectType": "three-d-model",
               "magicMode": "true",
               "customerName": "Joe Bloggs",
               "address": "123 Sample Street",
               "postcode": "AB12 3CD"
           }
         }'

Response

A successful call returns a JSON object containing a projectId which you should store in your own database for future reference. You can also use the ID to construct a link directly to the project using the following link structure:

https://easy-pv.co.uk/?project=[YOUR PROJECT ID HERE]