Update Cost Rate Energy Cost ----------------------------- Update an existing **energy cost interval**. **Request** - Method: ``PUT`` - Path: ``/api/dynamic_pricing/cost_rate_energy_cost`` **Body parameters** Mandatory: .. list-table:: :widths: 25 15 60 :header-rows: 1 * - Name - Type - Description * - uuid - string - UUID of the energy cost interval to update. * - unit - integer - Energy unit in Wh (e.g. 1 = per Wh). * - price - string|float - Price per unit. **Example request** .. code-block:: bash curl --location --request PUT \ 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_energy_cost' \ --header 'x-api-token: ' \ --header 'Content-Type: application/json' \ --data '{ "uuid": "", "unit": 1, "price": "0.30" }' **Response (200)** .. code-block:: json { "status": "ok", "message": "Energy cost was successfully updated.", "uuid": "29ccce27-3a3a-4308-831a-ed68b460e3bf" } **Error responses** - ``404``: Energy cost interval not found. .. code-block:: json { "status": "error", "message": "Cost rate interval not found" } - ``400``: Duplicate energy cost interval (same unit already exists). .. code-block:: json { "status": "error", "message": "Energy cost interval already exists" } - ``500``: Generic server error. .. code-block:: json { "status": "error", "message": "Internal Server Error" }