Create Cost Rate Time Cost
Create a new time-based cost interval for a specific cost rate within the current mandant. The request must include the cost rate UUID, the unit (in minutes), and the price.
Request
Method:
POSTPath:
/api/dynamic_pricing/cost_rate_time_cost
Body parameters
Mandatory:
Name |
Type |
Description |
|---|---|---|
cost_rate_uuid |
string |
UUID of the cost rate to attach this interval to. |
unit |
integer |
The duration unit for the cost in minutes. |
price |
float |
The cost applied per unit. |
Optional:
Name |
Type |
Description |
|---|---|---|
cost_rate_schedule_uuid |
string|null |
UUID of the schedule to attach this time cost to. |
Example request
curl --location --request POST 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_time_cost' \
--header 'x-api-token: <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"cost_rate_uuid": "<COST_RATE_UUID>",
"unit": 60,
"price": 2.5
}'
Response (200)
{
"status": "ok",
"uuid": "<INTERVAL_UUID>"
}
Error responses
400: Validation error or duplicate interval.
{
"status": "error",
"message": "The interval unit is configured twice!"
}
404: Cost rate or schedule not found.
{
"status": "error",
"message": "Cost rate not found"
}
OR
{
"status": "error",
"message": "Cost rate schedule not found"
}
500: Generic server error.
{
"status": "error",
"message": "Internal Server Error"
}