Skip to main content

Energy Coordination API - Partner Endpoints (v1)

Download OpenAPI specification:Download

Events

Get All Events

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

Get Event By Id

Authorizations:
Bearer
path Parameters
eventId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "b00ba74c-1727-465c-82df-62faff7094d2",
  • "createdAt": "2024-04-11T12:53:44.6474127+00:00",
  • "payload": {
    }
}

Reports

Create a report

Authorizations:
Bearer
Request Body schema: application/json
eventId
string or null
Array of EnergyUsageReportPayload (object) or null

Responses

Request samples

Content type
application/json
{
  • "eventId": "650c1b1b-9acd-4628-ad83-0d8b095625d6",
  • "payloads": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "eventId": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Resources

Get Resource by Id

Authorizations:
Bearer
path Parameters
resourceId
required
string

Responses

Response samples

Content type
application/json
{
  • "resourceId": "1f6bcefe-8246-4ff4-971d-4b84c3fb493a",
  • "resourceType": "HotWaterTank",
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d",
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "meterPointId": null
}

Delete Resource

Returns 204 No Content if the resource was deleted successfully. Returns 404 Not Found if the resource to delete does not exist.

Authorizations:
Bearer
path Parameters
resourceId
required
string

Responses

Response samples

Content type
application/json
"string"

User

Get Users

Get all users.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

Create a User

Authorizations:
Bearer
Request Body schema: application/json
userId
string or null

Responses

Request samples

Content type
application/json
{
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Response samples

Content type
application/json
{
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Get User by Id

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Delete User

Returns 204 No Content if the user was deleted successfully. Returns 404 Not Found if the user to delete does not exist.

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
"string"

Create Multiple Users

Authorizations:
Bearer
Request Body schema: application/json
Array of objects or null (PostUserRequest)
Array
userId
string or null

Responses

Request samples

Content type
application/json
{
  • "users": [
    ]
}

Response samples

Content type
application/json
{
  • "users": [
    ]
}

User Locations

Get A User's Locations

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create User Location

Authorizations:
Bearer
path Parameters
userId
required
string
Request Body schema: application/json
locationId
string or null
locationType
string (LocationType)
Enum: "Unknown" "Residential" "Commercial" "Other"
object (Coordinate)
meterPointId
string or null
Deprecated
meterPointIds
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "locationType": "Residential",
  • "coordinates": null,
  • "meterPointId": null,
  • "meterPointIds": [
    ]
}

Response samples

Content type
application/json
{
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "locationType": "Residential",
  • "coordinates": null,
  • "meterPointId": null,
  • "meterPointIds": [ ],
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Get User Location By Location Id

Authorizations:
Bearer
path Parameters
userId
required
string
locationId
required
string

Responses

Response samples

Content type
application/json
{
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "locationType": "Residential",
  • "coordinates": null,
  • "meterPointId": null,
  • "meterPointIds": [ ],
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Update User Location

Authorizations:
Bearer
path Parameters
userId
required
string
locationId
required
string
Request Body schema: application/json
locationId
string or null
locationType
string (LocationType)
Enum: "Unknown" "Residential" "Commercial" "Other"
object (Coordinate)
meterPointId
string or null
Deprecated
meterPointIds
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "locationId": "string",
  • "locationType": "Unknown",
  • "coordinates": {
    },
  • "meterPointId": "string",
  • "meterPointIds": [
    ]
}

Response samples

Content type
application/json
{
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "locationType": "Residential",
  • "coordinates": null,
  • "meterPointId": null,
  • "meterPointIds": [ ],
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d"
}

Delete User Location

Returns 204 No Content if the location was deleted successfully. Returns 404 Not Found if the location to delete does not exist.

Authorizations:
Bearer
path Parameters
locationId
required
string

Responses

Response samples

Content type
application/json
"string"

Create Multiple User Locations

Create multiple locations for several users at once. "The request body should be an array of objects, each containing a user id and a create location request.

Authorizations:
Bearer
Request Body schema: application/json
Array of objects or null (PostLocationWithUserRequest)
Array
locationId
string or null
locationType
string (LocationType)
Enum: "Unknown" "Residential" "Commercial" "Other"
object (Coordinate)
meterPointId
string or null
Deprecated
meterPointIds
Array of strings or null
userId
string or null

Responses

Request samples

Content type
application/json
{
  • "locations": [
    ]
}

Response samples

Content type
application/json
{
  • "locations": [
    ]
}

User Resources

Create Vehicle Resource

Authorizations:
Bearer
path Parameters
userId
required
string
Request Body schema: application/json
resourceId
string or null
resourceType
string (ResourceType)
Enum: "Generic" "Vehicle" "Charger" "HotWaterTank" "HVAC" "SolarInverter"

Responses

Request samples

Content type
application/json
{
  • "resourceId": "51dd4b2c-86f7-4f9f-85d4-8a0b6b83f417",
  • "resourceType": "Vehicle"
}

Response samples

Content type
application/json
{
  • "resourceId": "1f6bcefe-8246-4ff4-971d-4b84c3fb493a",
  • "resourceType": "HotWaterTank",
  • "userId": "0a965bbd-3db0-49e0-899b-c057e5f7ca9d",
  • "locationId": "481f9d24-2a42-4b7f-a7a8-087343da0bd9",
  • "meterPointId": null
}

Get a User's Resources

Get all resources registered to a user. Returns both location bound resources and vehicles.

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "resources": [
    ]
}

User Resources | Location-bound

Get Location Bound Resources

Get all resources registered at a location.

Authorizations:
Bearer
path Parameters
locationId
required
string
userId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Create Location Bound Resource

Create a resource at a location.

Authorizations:
Bearer
path Parameters
userId
required
string
locationId
required
string
Request Body schema: application/json
resourceId
string or null
resourceType
string (ResourceType)
Enum: "Generic" "Vehicle" "Charger" "HotWaterTank" "HVAC" "SolarInverter"
meterPointId
string or null

Responses

Request samples

Content type
application/json
{
  • "meterPointId": "bef292be-3537-4b21-be38-70df71c6286b",
  • "resourceId": "1f6bcefe-8246-4ff4-971d-4b84c3fb493a",
  • "resourceType": "HotWaterTank"
}

Response samples

Content type
application/json
{
  • "resourceId": "string",
  • "resourceType": "Generic",
  • "locationId": "string",
  • "userId": "string",
  • "meterPointId": "string"
}

User Spark Program

Get User Enrollment

Get a user's enrollment status. Also returns when the user was enrolled.

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "isEnrolled": true,
  • "userId": "string",
  • "enrollmentId": "883e2903-3e2f-407c-ae2a-1274a4137945",
  • "enrollmentDate": "2019-08-24T14:15:22Z"
}

Enroll User

Enroll a user into the SPARK Program

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "isEnrolled": true,
  • "userId": "string",
  • "enrollmentId": "883e2903-3e2f-407c-ae2a-1274a4137945",
  • "enrollmentDate": "2019-08-24T14:15:22Z"
}

Delete User Enrollment

Remove a user from the SPARK Program

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
"string"

Get User Eligibility

Check if a user is eligible for the SPARK Program

Authorizations:
Bearer
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "userId": "string",
  • "isEligible": true
}

Get Eligible Users

Get all users who are eligible for the SPARK Program

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • "string"
]

Webhooks

Get All Webhooks

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "webhooks": [
    ]
}

Create a Webhook

Authorizations:
Bearer
Request Body schema: application/json
name
string or null
webhookSecret
string or null
webhookUrl
string or null
notificationTypes
Array of strings or null (NotificationType)
Enum: "Unknown" "PriceCurveCreated" "UserEligibilityUpdated"

Responses

Request samples

Content type
application/json
{
  • "name": "Example Webhook",
  • "webhookSecret": "CMJ0PqrOtGIat7j",
  • "webhookUrl": "https://example.com/api",
  • "notificationTypes": [
    ]
}

Response samples

Content type
application/json
{
  • "webhookId": "c5e739af-bd71-432c-9f18-f1fe7fdabc4c",
  • "webhookUrl": "https://example.com/api",
  • "webhookSecret": "CMJ0PqrOtGIat7j",
  • "name": "Example Webhook",
  • "notificationTypes": [
    ],
  • "enabled": true,
  • "status": "Healthy",
  • "modifiedDate": "2024-04-11T12:53:44.6498275+00:00",
  • "createdDate": "2024-04-11T12:53:44.649827+00:00",
  • "lastAnalyzedTimestamp": "2024-04-11T12:53:44.6498276+00:00"
}

Get a Webhook by Id

Authorizations:
Bearer
path Parameters
webhookId
required
string

Responses

Response samples

Content type
application/json
{
  • "webhookId": "c5e739af-bd71-432c-9f18-f1fe7fdabc4c",
  • "webhookUrl": "https://example.com/api",
  • "webhookSecret": "CMJ0PqrOtGIat7j",
  • "name": "Example Webhook",
  • "notificationTypes": [
    ],
  • "enabled": true,
  • "status": "Healthy",
  • "modifiedDate": "2024-04-11T12:53:44.6499495+00:00",
  • "createdDate": "2024-04-11T12:53:44.6499494+00:00",
  • "lastAnalyzedTimestamp": "2024-04-11T12:53:44.6499496+00:00"
}

Update a Webhook

Authorizations:
Bearer
path Parameters
webhookId
required
string
Request Body schema: application/json
webhookSecret
string or null
webhookUrl
string or null
notificationTypes
Array of strings or null (NotificationType)
Enum: "Unknown" "PriceCurveCreated" "UserEligibilityUpdated"
enabled
boolean
name
string or null

Responses

Request samples

Content type
application/json
{
  • "webhookSecret": "New secret",
  • "notificationTypes": [
    ],
  • "enabled": true,
  • "name": "New name"
}

Response samples

Content type
application/json
{
  • "webhookId": "c5e739af-bd71-432c-9f18-f1fe7fdabc4c",
  • "webhookUrl": "https://example.com/api",
  • "webhookSecret": "CMJ0PqrOtGIat7j",
  • "name": "Example Webhook",
  • "notificationTypes": [
    ],
  • "enabled": true,
  • "status": "Healthy",
  • "modifiedDate": "2024-04-11T12:53:44.6501467+00:00",
  • "createdDate": "2024-04-11T12:53:44.6501466+00:00",
  • "lastAnalyzedTimestamp": "2024-04-11T12:53:44.6501467+00:00"
}

Delete a webhook

Returns 204 No Content if the webhook was deleted successfully. Returns 404 Not Found if the webhook to delete does not exist.

Authorizations:
Bearer
path Parameters
webhookId
required
string

Responses

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "string",
  • "errors": {
    },
  • "property1": null,
  • "property2": null
}

Send a Test Event to a Webhook

Authorizations:
Bearer
path Parameters
webhookId
required
string

Responses

Enable or Disable a Webhook

Authorizations:
Bearer
path Parameters
webhookId
required
string
query Parameters
enabled
required
boolean

Responses