Skip to main content

Your first call - create a project

/projects/create

This

Youguide canwalks createyou through creating a new Easy PV project using theour Open API. 


Authentication

Endpoint:  

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

Headers:

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

  • Request structure

    AllEvery projectsproject request must haveinclude anthe following:

    Owner field:

    The owner, which must be specified in the request POST. The owner email mustshould be a membervalid email address of thean proEasy PV Pro team thatmember. ownsThis email will become the API key. The owner can then subsequently share theprimary project withowner. other   members of the team if they wish.

    AdditionalMeta informationobject: needs

    to be included in

    Use 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 usedobject to set additional project settings and information.

    • Mandatory fields: 
      • projectType Sets the design mode for the projectproject. (Allowed values: 
        • "three-d-modelmodel",
        • "quick-roofroof",
        • "roof-outlineoutline").
        • For
        3D
      • projects
      you
    • can also enable
    • Enable automatic roof scanning functionalityfor by3D includingprojects:
      • To enable roof scanning you must include the following attribute in the meta object.
        • "magicMode" : "true"true .

        • You

        can
      • run
      this
    • from
    • Optional fields:  
        • customerName
        • customerEmail
        • customerPhone
        • address
        • postcode
        • lat and lng - provide 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),latitude and put your keylongitude in the X-API-KEYdecimal header.degrees format
        • 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'POST 'https://sandbox.easy-pv.co.uk/api/v1/projects/create' \
         -H 'accept: application/json' \
         -H 'X-API-KEY: **********KEY***********'YOUR_API_KEY' \
         -H 'Content-Type: application/json' \
         -d '{
               "owner": "sales@midsummerenergy.co.uk"sales@example.com",
               "meta": {
                   "projectType": "three-d-model",
                   "magicMode": "true",
                   "customerName": "Joe Bloggs",
                   "address": "123 Sample Street",
                   "postcode": "AB12 3CD"
               }
             }'

    Response

    TheA endpointsuccessful willcall returnreturns a JSON object withcontaining a projectId property.which Youyou willshould almoststore certainly want to save this projectId withinin your own database.

    database

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

    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.