Outgoing Webhooks

Outgoing Webhooks

The outgoing webhook feature allows to send information about events like bill run lifecycle updates or changes to entities, such as customers, meters or sites to a specified external endpoint. This enables seamless integration with external systems, providing the ability to process and keep external information in sync with the updated data within our application.

Create an Outgoing Webhook

The Solarize App allows the creation of outgoing webhooks in the Notifications section under the settings menu. There, the endpoint and optional headers for the webhook can be specified as well as the type of events that should trigger it.

Supported Events

The following events can be selected to trigger an outgoing webhook.

EntityEvents
Sitesite.created
site.updated
site.deleted
Payment methodpayment_method.created
payment_method.updated
payment_method.deleted
Contractcontract.created
contract.updated
contract.deleted
Metermeter.created
meter.updated
meter.deleted
Customercustomer.created
customer.updated
customer.deleted
Bill runbill_run.create_progress
bill_run.create_error
bill_run.create_success
bill_run.complete_progress
bill_run.complete_error
bill_run.complete_success
bill_run.deleted

Payload Structure

The payload is a JSON object with the following structure:

{
  "id": "ef82...",
  "type": "customer.created",
  "userId": "4d62...",
  "timestamp": "2023-02-01T10:00:00.000Z",
  "accountId": "43cd...",
  "siteIds": ["bea2... "],
  "data": {/* Data of the affected Entity */},
}

The properties of the field data depend on the entity that triggered the event. For instance, if you receive an event for the creation of a customer (type = customer.created), then data will contain all properties of the entity Customer. You can find a list of entities in the Schemas section in the API Reference.