Update Cost Rate Session Fee
Update the session fee configuration for a cost rate.
If rate_cost_schedule_id is provided, the session fee is applied to the
specified schedule configuration. Otherwise the session fee is applied
to the base cost rate.
The schedule identifier can be either the internal numeric ID or the schedule UUID.
Request
Method:
PUTPath:
/api/dynamic_pricing/cost_rate_session_fee
Body parameters
Mandatory:
Name |
Type |
Description |
|---|---|---|
uuid |
string |
UUID of the cost rate. |
amount |
float |
Session fee amount. |
Optional:
Name |
Type |
Description |
|---|---|---|
grace_period |
integer|null |
Grace period in seconds before the session fee is applied. |
energy_threshold |
integer|null |
Minimum consumed energy in Wh before the session fee is applied. |
rate_cost_schedule_id |
string|integer|null |
Optional identifier of the schedule configuration. Can be a numeric internal ID or UUID. |
Example request
curl --location --request PUT \
'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_session_fee' \
--header 'x-api-token: <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "<COST_RATE_UUID>",
"amount": 1.3,
"grace_period": 50,
"energy_threshold": 600,
"rate_cost_schedule_id": "<SCHEDULE_UUID>"
}'
Response (200)
{
"status": "ok",
"message": "Session fee configuration was successfully saved"
}
Error responses
404: Cost rate not found.
{
"status": "error",
"message": "Cost rate not found"
}
400: Validation error.
{
"status": "error",
"message": "Session fee exceeds automatic stop"
}
500: Generic server error.
{
"status": "error",
"message": "Internal Server Error"
}