Skip to main content

Cancellation

Traders may choose to cancel the flexibility they requested. This means that your resources should no longer follow any particular setpoint. They can go back to their baseline, or default steering mode.

Powernaut uses the same endpoints that are used for activation to inform your resources about this change. To indicate that the activations were cancelled, it will send null as setpoint.

MQTT​

The cancellation message is the same as an activation message but with null as the value for the setpoint. The message is sent to the setpoint topic (resource/{id}/commands/setpoint) used for activation.

The message that will be sent to to indicate the cancellation looks like this:

{
"timing": {
"start": "2024-07-01T14:00:00Z",
"end": "2024-07-01T14:15:00Z"
},
"value": null
}
tip

Please be mindful of the difference between {value: 0} and {value: null}. The first one sets an explicit setpoint with the value 0. The other one expects your resource to return to its baseline.

Webhooks​

When using webhooks, Powernaut sends the cancellation request to the same accepted endpoint that was configured in either the resource's or bid's webhooks settings.

The webhook will be called with the same message used in a regular activation.

{
"id": "5aaeae38-70f7-41e5-8e58-01b4d79fabb7"
}

This is the ID of the bid that has been accepted, you should look up the bid to receive the activation details as follows:

import requests

url = "https://api.powernaut.io/v1/connect/bids/5aaeae38-70f7-41e5-8e58-01b4d79fabb7"

payload = {}
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
note

Up to this point, your webhook behaves exactly the same as in a regular activation flow

The activation details can be found in the activation property of the response. Because this is a cancellation, the activation.value will be null.

{
activation: {
value: null,
},
resourceId: "6dcc8f5d-2786-4672-816c-5ce221db62f5",
// ... other fields for this bid
}
note

To ease the transition, Powernaut will include the baseline value during the first month after introducing the cancellation feature. This gives you time to update your integration logic. The change will be permanently adjusted at the end of May 2025.