Service objects
Events
You will notice that events follow a pattern: resource.event
. Our goal is to provide a consistent system that makes things easier to anticipate and code against.
Filtering Events
Events can be filtered to only show a single type using the event_type
query parameter.
Event Types
This is a list of all the types of events that are currently available from events API endpoint.
We may add more at any time, so in developing and maintaining your code, you should not assume that only these types exist.
Event | Description |
---|---|
customer.create | Occurs whenever a customer is created. |
customer.delete | Occurs whenever a customer is deleted. |
customer.update | Occurs whenever a customer is updated. |
customer.create.failed | Occurs when customer creation has failed. |
customer.delete.failed | Occurs when customer deletion has failed. |
customer.update.failed | Occurs when customer update has failed. |
location.create | Occurs whenever a location is created. |
location.delete | Occurs whenever a location is deleted. |
location.update | Occurs whenever a location is updated. |
location.create.failed | Occurs when location creation has failed. |
location.delete.failed | Occurs when location deletion has failed. |
location.update.failed | Occurs when location update has failed. |
device.create | Occurs whenever a device is created. |
device.delete | Occurs whenever a device is deleted. |
device.update | Occurs whenever a device is updated. |
device.create.failed | Occurs when device creation has failed. |
device.delete.failed | Occurs when device deletion has failed. |
device.update.failed | Occurs when device update has failed. |
schedule.created | Occurs when a new schedule is created for a location (beta). |
tariff.expiring | Occurs when a contract term for a tariff element is expiring. |
tariff.expired | Occurs when a contract term for a tariff element has expired. |
tariff.fetch.failed | Occurs when attempts to sync a tariff element from an upstream data source (such as energy provider account) have failed. |
Subscribing to events via Webhooks
You can subscribe to receive a webhook notification when an event occurs in your FlatPeak account. To setup, visit the webhooks section in the Dashboard. There is also a documentation article explaining how to work with FlatPeak webhooks.
Was this page helpful?