Create Recurring Pricing Config --------------------------------- Create a new recurring (weekday-based) pricing schedule for a cost rate. \ The cost rate must have ``dynamic_pricing`` set to ``1`` \ (recurring per weekday). The request must include the cost rate UUID, a \ schedule name, one or more weekdays, and a time range. On success, the \ response returns the created schedule. **Request** - Method: ``POST`` - Path: ``/api/dynamic_pricing/recurring_pricing_config`` **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 create the schedule for. * - name - string - Name of the recurring schedule. * - weekday - array of integers - Weekdays the schedule applies to. ``1`` = Monday … ``7`` = Sunday. * - start_time - string - Start time in ``H:i`` format (e.g., ``18:00``). * - end_time - string - End time in ``H:i`` format (e.g., ``22:00``). **Example request** .. code-block:: bash curl --location --request POST 'https://example.beenergised.cloud/api/dynamic_pricing/recurring_pricing_config' \ --header 'x-api-token: ' \ --header 'Content-Type: application/json' \ --data '{ "cost_rate_uuid": "", "name": "Weekday Evening", "weekday": [1, 2, 3], "start_time": "18:00", "end_time": "22:00" }' **Response (200)** .. code-block:: json { "status": "success", "data": { "uuid": "", "name": "Weekday Evening", "configs": [ { "weekday": 1, "start_time": "18:00", "end_time": "22:00" }, { "weekday": 2, "start_time": "18:00", "end_time": "22:00" }, { "weekday": 3, "start_time": "18:00", "end_time": "22:00" } ] } } **Error responses** - ``404``: Cost rate not found. .. code-block:: json { "status": "error", "message": "Cost rate not found" } - ``400``: Validation error \ (e.g., the cost rate does not use recurring weekday pricing). .. code-block:: json { "status": "error", "message": "" } - ``500``: Generic server error. .. code-block:: json { "status": "error", "message": "Internal Server Error" }