Update Cost Rate
Update an existing cost rate for the current mandant. The request must include the cost rate’s uuid, name, and currency. On success, the response returns the UUID of the updated cost rate.
Request
Method:
PUTPath:
/api/dynamic_pricing/cost_rate
Body parameters
Mandatory:
Name |
Type |
Description |
|---|---|---|
uuid |
string |
UUID of the cost rate to update. |
name |
string |
New/updated name. |
currency |
string |
Currency in ISO 4217 format (e.g., |
Optional: see Cost rate optional parameters.
Example request
curl --location --request PUT 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate' \
--header 'x-api-token: <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "<COST_RATE_UUID>",
"name": "Dynamic Pricing API cost rate (updated)",
"description": "Updated description",
"automatic_stop_min": 15,
"automatic_stop_costs": 6.5,
"currency": "EUR",
"dynamic_pricing": 1,
"company_id": 123
}'
Response (200)
{
"status": "ok",
"uuid": "<COST_RATE_UUID>"
}
Error responses
400: Invaliddynamic_pricingvalue.
{
"status": "error",
"message": "dynamic_pricing value is invalid"
}
500: Generic server error.
{
"status": "error",
"message": "Internal Server Error"
}