Edit Timeline
Use this api to edit a timeline
Flow: Edit a timeline then validate it
URL : /internals/promotions/repeat/{id}/edit
Method : POST
Validate Rule
'promotion_timeline_id' => ['required', 'exists:promotion_timelines,id'],
'start_time' => ['required', 'date'],
'end_time' => ['required', 'date', 'after:start_time'],
Params Example
{
"promotion_timeline_id": 298,
"start_time": "2023-02-28 13:00:00",
"end_time": "2023-02-28 21:59:59"
}
Success Response
Code : 200 OK
Content example
{
"success": true,
"data": {
"id": 298,
"promotion_id": 187,
"start_time": "2023-02-28 13:00:00",
"end_time": "2023-02-28 21:59:59"
},
"error": [],
"errorCode": null
}
Error Response
Code : 400 BAD REQUEST
Content :
{
"success": false,
"data": null,
"error": [
"Time range overlap: [2023-02-28 13:00:00 -> 2023-04-27 21:59:59] [2023-03-30 13:00:00 -> 2023-03-31 13:00:00]"
],
"errorCode": 400
}