Returns a list of vacations.
SUPPORTED METHODS:
GET
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
start_date (accepted) | date | Start date |
end_date (accepted) | date | End date |
mode (accepted) | enum (manage, requested, upcoming, all_requested) | manage: Manage vacations requested: Requested vacations upcoming: Upcoming vacations |
user_id (accepted) | integer | Employee id |
sortby (accepted) | enum (employee_start, vacation_start) | Sort by employee_start - Employee start date vacation_start - Vacation start day |
deleted (accepted) | integer | Deleted |
force_user_timezone (accepted) | enum (0, 1) | 0: do not force user time zone 1: force users time zone |
location (accepted) | integer | Location |
position (accepted) | integer | Position |
DOCUMENTATION
GET
Retrieves a list of vacations.
Level 5 is required
--
Example Request:
{
"module":"schedule.vacations",
"method":"GET",
"request":{
"start_day":"May 10,2017",
"end_date":"May 15, 2017",
"mode":"manage"
}
}
Example Response:
{
"status":1,
"data":[
{
"id":"249",
"store":"11",
"date":"1336609553",
"requested_on":{
"id":"1107",
"month":"5",
"day":"10",
"year":"2017",
"weekday":"Thu",
"mname":"May",
"week":"19",
"dayid":5,
"formatted":"May 10, 2017"
},
"approved_on":"1336609556",
"status":"1",
"admin":"2",
"comments":"",
"notes":"",
"start_day":{
"id":"1110",
"month":"5",
"day":"13",
"year":"2017",
"weekday":"Sun",
"mname":"May",
"week":"19",
"dayid":1,
"formatted":"May 13, 2017"
},
"end_day":{
"id":"1116",
"month":"5",
"day":"19",
"year":"2017",
"weekday":"Sat",
"mname":"May",
"week":"20",
"dayid":7,
"formatted":"May 19, 2017"
},
"employee":"5112",
"employee_name":"Vikodin Ovisnic",
"total_days":6
},
{
"id":"250",
"store":"11",
"date":"1336610951",
"requested_on":{
"id":"1107",
"month":"5",
"day":"10",
"year":"2017",
"weekday":"Thu",
"mname":"May",
"week":"19",
"dayid":5,
"formatted":"May 10, 2017"
},
"approved_on":"1336611136",
"status":"1",
"admin":"2",
"comments":"test",
"notes":"",
"start_day":{
"id":"1111",
"month":"5",
"day":"14",
"year":"2017",
"weekday":"Mon",
"mname":"May",
"week":"20",
"dayid":2,
"formatted":"May 14, 2017"
},
"end_day":{
"id":"1111",
"month":"5",
"day":"14",
"year":"2017",
"weekday":"Mon",
"mname":"May",
"week":"20",
"dayid":2,
"formatted":"May 14, 2017"
},
"employee":"5118",
"employee_name":"Ian-SP22",
"total_days":0
},
{
"id":"266",
"store":"11",
"date":"1336655769",
"requested_on":{
"id":"1107",
"month":"5",
"day":"10",
"year":"2017",
"weekday":"Thu",
"mname":"May",
"week":"19",
"dayid":5,
"formatted":"May 10, 2017"
},
"approved_on":"1336656213",
"status":"1",
"admin":"2",
"comments":"",
"notes":"",
"start_day":{
"id":"1111",
"month":"5",
"day":"14",
"year":"2017",
"weekday":"Mon",
"mname":"May",
"week":"20",
"dayid":2,
"formatted":"May 14, 2017"
},
"end_day":{
"id":"1111",
"month":"5",
"day":"14",
"year":"2017",
"weekday":"Mon",
"mname":"May",
"week":"20",
"dayid":2,
"formatted":"May 14, 2017"
},
"employee":"1064",
"employee_name":"1338891764_Alicia M.",
"total_days":0
},
{
"id":"239",
"store":"11",
"date":"1336341769",
"requested_on":{
"id":"1104",
"month":"5",
"day":"7",
"year":"2017",
"weekday":"Mon",
"mname":"May",
"week":"19",
"dayid":2,
"formatted":"May 7, 2017"
},
"approved_on":"1336341774",
"status":"1",
"admin":"2",
"comments":"",
"notes":"",
"start_day":{
"id":"1112",
"month":"5",
"day":"15",
"year":"2017",
"weekday":"Tue",
"mname":"May",
"week":"20",
"dayid":3,
"formatted":"May 15, 2017"
},
"end_day":{
"id":"1112",
"month":"5",
"day":"15",
"year":"2017",
"weekday":"Tue",
"mname":"May",
"week":"20",
"dayid":3,
"formatted":"May 15, 2017"
},
"employee":"4949",
"employee_name":"Eric Owens",
"total_days":0
}
],
"token":"xxxxxxx"
}