Skip to main content

Search Timeline

Use this api to search timelines

Flow: Search timelines by the filters in db

URL : /internals/promotions/repeat/{id}/search

Method : GET

Params : from_time, to_time, size, page

Params Example

from_time:2023-04-03 13:00:00
to_time:2023-04-06 13:00:00
size:5
page:2

Success Response

Code : 200 OK

Content example

{
"success": true,
"data": {
"total": 3,
"items": [
{
"id": 305,
"promotion_id": 187,
"start_time": "2023-04-03 13:00:00",
"end_time": "2023-04-04 13:00:00"
},
{
"id": 306,
"promotion_id": 187,
"start_time": "2023-04-04 13:00:00",
"end_time": "2023-04-05 13:00:00"
},
{
"id": 307,
"promotion_id": 187,
"start_time": "2023-04-05 13:00:00",
"end_time": "2023-04-06 13:00:00"
}
]
},
"error": [],
"errorCode": null
}

Empty Response

Code : 200 OK

Content :

{
"success": true,
"data": {
"total": 0,
"items": []
},
"error": [],
"errorCode": null
}

Error Response

Code : 400 BAD REQUEST

Content :

{
"success": false,
"data": null,
"error": {
"to_time": [
"The to time must be a date after from time."
]
},
"errorCode": 400
}