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: ``POST`` - Path: ``/api/dynamic_pricing/cost_rate_time_cost`` **Body parameters** Mandatory: .. list-table:: :widths: 25 15 60 :header-rows: 1 * - 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: .. list-table:: :widths: 25 15 60 :header-rows: 1 * - Name - Type - Description * - cost_rate_schedule_uuid - string|null - UUID of the schedule to attach this time cost to. **Example request** .. code-block:: bash curl --location --request POST 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate_time_cost' \ --header 'x-api-token: ' \ --header 'Content-Type: application/json' \ --data '{ "cost_rate_uuid": "", "unit": 60, "price": 2.5 }' **Response (200)** .. code-block:: json { "status": "ok", "uuid": "" } **Error responses** - ``400``: Validation error or duplicate interval. .. code-block:: json { "status": "error", "message": "The interval unit is configured twice!" } - ``404``: Cost rate or schedule not found. .. code-block:: json { "status": "error", "message": "Cost rate not found" } *OR* .. code-block:: json { "status": "error", "message": "Cost rate schedule not found" } - ``500``: Generic server error. .. code-block:: json { "status": "error", "message": "Internal Server Error" }