Create Cost Rate
Create a new cost rate for the current mandant. The request must include a name and currency. On success, the response returns the UUID of the newly created cost rate.
Request
Method:
POSTPath:
/api/dynamic_pricing/cost_rate
Body parameters
Mandatory:
Name |
Type |
Description |
|---|---|---|
name |
string |
Cost rate name. |
currency |
string |
Currency in ISO 4217 format (e.g., |
Optional: see Cost rate optional parameters.
Example request
curl --location --request POST 'https://example.beenergised.cloud/api/dynamic_pricing/cost_rate' \
--header 'x-api-token: <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Dynamic Pricing API cost rate",
"description": "Test description",
"automatic_stop_min": 10,
"automatic_stop_costs": 5.1,
"currency": "EUR",
"dynamic_pricing": 0,
"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"
}