Update Recurring Pricing Config
Update an existing recurring (weekday-based) pricing schedule. The schedule is identified by its UUID in the path. The request must include the updated name, weekdays, and time range. On success, the response returns the updated schedule.
Request
Method:
PUTPath:
/api/dynamic_pricing/recurring_pricing_config/{uuid}
Path parameters
Name |
Type |
Description |
|---|---|---|
uuid |
string |
UUID of the recurring pricing schedule to update. |
Body parameters
Mandatory:
Name |
Type |
Description |
|---|---|---|
name |
string |
Updated name of the recurring schedule. |
weekday |
array of integers |
Weekdays the schedule applies to. |
start_time |
string |
Start time in |
end_time |
string |
End time in |
Example request
curl --location --request PUT 'https://example.beenergised.cloud/api/dynamic_pricing/recurring_pricing_config/<SCHEDULE_UUID>' \
--header 'x-api-token: <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Weekday Evening (updated)",
"weekday": [1, 2, 3, 4],
"start_time": "17:00",
"end_time": "23:00"
}'
Response (200)
{
"status": "success",
"data": {
"uuid": "<SCHEDULE_UUID>",
"name": "Weekday Evening (updated)",
"configs": [
{
"weekday": 1,
"start_time": "17:00",
"end_time": "23:00"
},
{
"weekday": 2,
"start_time": "17:00",
"end_time": "23:00"
},
{
"weekday": 3,
"start_time": "17:00",
"end_time": "23:00"
},
{
"weekday": 4,
"start_time": "17:00",
"end_time": "23:00"
}
]
}
}
Error responses
404: Cost rate not found.
{
"status": "error",
"message": "Cost rate not found"
}
400: Validation error (e.g., the cost rate does not use recurring weekday pricing).
{
"status": "error",
"message": "<validation message>"
}
500: Generic server error.
{
"status": "error",
"message": "Internal Server Error"
}