What is a Sample API Request and Response

What is a Sample API Request and Response

This FAQ provides a sample API request and response to help you understand how to interact with Enact's system programmatically.

Sample Request:

METHOD: POST

URL: https://apitest.enact-systems.com/v2/lead/

Request Headers:

x-api-key: <NIMAIA API KEY> - platform to platform authentication key (Will be provided by Enact)


Request Body:

{
    "project_name": "Test API Project",
    "type": "R",
    "first_name": "Test",
    "last_name": "API",
    "email": "test@test.com",
    "phone": "(123) 123-1231",
    "account_id": "<account_id>", - unique client id -  specific to a customer account (it will be provided by Enact for each customer account)
    "address": "870 Peralta Ave, Berkeley, CA 94707, USA",
    "annual_electric_bill": "4000",
    "city":"Berkeley",
    "country":"USA",
    "project_owner_email": "someone@xyz.com",
    "project_owner_first_name": "John",
    "project_owner_last_name": "Doe",
    "state": "CA",
    "zip_code": "94707",
    "latitude": "37.89158467678897",
    "longitude": "-122.28592338361581"
}

Response:

{
    "message": "Project added successfully",
    "data": {
        "crn": "XXX-Y9C-WR8",
        "account_id": "<account_id>",
        "first_name": "Test",
        "last_name": "API",
        "address": "870 Peralta Ave, Berkeley, CA 94707, USA",
        "project_name": "Test API Project",
        "type": "R",
        "latitude": "37.89158467678897",
        "longitude": "-122.28592338361581",
        "city":"Berkeley",
        "state": "CA",
        "zip_code": "94707",
        "country": "USA",
        "email": "test@test.com",
        "phone": "(123) 123-1231",
        "project_owner_email": "someone@xyz.com",
        "project_owner_first_name": "John",
        "project_owner_last_name": "Doe",
        "source": "<account id>",
        "create_ts": "1743431183894"
    }
}