schedule.shifts

Returns a list of shifts.

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
overnight (accepted)integerOvernight
start_limit (accepted)integerStart limit
Pagination offset
end_limit (accepted)integerEnd limit
Pagination - max number of entries per page
start_date (accepted)dateStart date
end_date (accepted)dateEnd date
mode (accepted)enum (overview, location, schedule, incomplete, employees, employee, open, openapproval, confirm, onnow, late, upcoming, recent)Mode
overview
location
schedule
incomplete
employees
employee
open
openapproval
confirm
onnow
late
tc_on (accepted)integerTimeclock on

null : Timeclock off
isset: Timeclock on
schedule (accepted)varcharSchedule

Array of schedule ids (eg. "234,563,770")
location (accepted)integerLocation id
employees (accepted)varcharEmployees

Array of employees ids (eg. "234,563,770")
detailed (accepted)integerDetailed

0: Not detailed
1: Detailed
budget (accepted)enum (0,1)Budget

0: Do not grab budget data
1: Grab budget data
vacation (accepted)enum(0,1)Vacation

0: Do not show vacation data
1: Show vacation data
filter_by_site (accepted)varcharFilter by remote site
filter_by_employee (accepted)varcharFilter by employee
filter_by_skill (accepted)varcharFilter by skill
filled (accepted)enum (0,1)Filled param for open shifts

DOCUMENTATION

GET
Retrieves a list of shifts.
Level 5 is required

--

Example Request:

{
   "module":"schedule.shifts",
   "method":"GET",
   "request":{
      "start_date":"Jul 7, 2016",
      "end_date":"Jul 13, 20176",
      "mode":"overview"
   }
}

Example Response:

{
    "status": 1,
    "token": "xxxxxxx",
    "data": [
        {
            "paidtime": 5,
            "confirmed_end_timestamp": null,
            "location": "0",
            "working": "0",
            "end_date": {
                "day_of_year": "190",
                "formatted": "Jul 10, 2016",
                "week_adjusted": 1,
                "timestamp": 1373500800,
                "weekday": "Wed",
                "mname": "Jul",
                "time": "5:00pm",
                "sp_wday": 4,
                "year": 2016,
                "wday": 3,
                "seconds": 0,
                "id": 1533,
                "dayid": 4,
                "week": 28,
                "minutes": 0,
                "day": 10,
                "timeid": 69,
                "hours": 17,
                "date": "2016-07-10 17:00:00",
                "month": 7,
                "timeid_exact": 69
            },
            "edited": "1373248531",
            "start_date": {
                "day_of_year": "190",
                "formatted": "Jul 10, 2016",
                "week_adjusted": 1,
                "timestamp": 1373482800,
                "weekday": "Wed",
                "mname": "Jul",
                "time": "12:00pm",
                "sp_wday": 4,
                "year": 2016,
                "wday": 3,
                "seconds": 0,
                "id": 1533,
                "dayid": 4,
                "week": 28,
                "minutes": 0,
                "day": 10,
                "timeid": 49,
                "hours": 12,
                "date": "2016-07-10 12:00:00",
                "month": 7,
                "timeid_exact": 49
            },
            "requests": [{
                "flag": "0",
                "name": "Fry",
                "request_id": "604785",
                "id": "240420"
            }],
            "type": "1",
            "length": 5,
            "ref": "0",
            "created": "1373248525",
            "repeats": "0",
            "start_timestamp": "2016-07-10 12:00:00",
            "confirmed_start_timestamp": null,
            "needed": "4",
            "end_time": {
                "time": "5:00pm",
                "id": 69
            },
            "schedule_color": "17",
            "notes": "",
            "deleted": "0",
            "start_time": {
                "time": "12:00pm",
                "id": 49
            },
            "end_timestamp": "2016-07-10 17:00:00",
            "traded": null,
            "id": "13251137",
            "confirmed": "0",
            "schedule_name": "Space",
            "cost": {
                "staff": 0,
                "dollars": 0,
                "hours": 0
            },
            "schedule": "134796",
            "perms": "2",
            "published": "1373362618",
            "title": "",
            "user": "240416"
        },
        {
            "paidtime": 4,
            "confirmed_end_timestamp": null,
            "location": "0",
            "working": "1",
            "end_date": {
                "day_of_year": "191",
                "formatted": "Jul 11, 2016",
                "week_adjusted": 1,
                "timestamp": 1373583600,
                "weekday": "Thu",
                "mname": "Jul",
                "time": "4:00pm",
                "sp_wday": 5,
                "year": 2016,
                "wday": 4,
                "seconds": 0,
                "id": 1534,
                "dayid": 5,
                "week": 28,
                "minutes": 0,
                "day": 11,
                "timeid": 65,
                "hours": 16,
                "date": "2016-07-11 16:00:00",
                "month": 7,
                "timeid_exact": 65
            },
            "edited": "1373362614",
            "start_date": {
                "day_of_year": "191",
                "formatted": "Jul 11, 2016",
                "week_adjusted": 1,
                "timestamp": 1373569200,
                "weekday": "Thu",
                "mname": "Jul",
                "time": "12:00pm",
                "sp_wday": 5,
                "year": 2016,
                "wday": 4,
                "seconds": 0,
                "id": 1534,
                "dayid": 5,
                "week": 28,
                "minutes": 0,
                "day": 11,
                "timeid": 49,
                "hours": 12,
                "date": "2016-07-11 12:00:00",
                "month": 7,
                "timeid_exact": 49
            },
            "type": "0",
            "length": 4,
            "ref": "0",
            "created": "1373362614",
            "employees": [{
                "name": "Amy",
                "id": "240423",
                "confirmed_end": null,
                "cost": 80,
                "last_active": "1372148963",
                "ratecard": "10758",
                "notified_day": "0",
                "confirmed_start": null,
                "status": "1",
                "notified_hour": "0",
                "rate": "20",
                "avatar": "1348494821",
                "wage": "0"
            }],
            "repeats": "0",
            "start_timestamp": "2016-07-11 12:00:00",
            "confirmed_start_timestamp": null,
            "needed": "0",
            "end_time": {
                "time": "4:00pm",
                "id": 65
            },
            "schedule_color": "23",
            "notes": "",
            "deleted": "0",
            "start_time": {
                "time": "12:00pm",
                "id": 49
            },
            "end_timestamp": "2016-07-11 16:00:00",
            "traded": "0",
            "id": "13251185",
            "confirmed": "0",
            "schedule_name": "Office",
            "cost": {
                "staff": 1,
                "dollars": 80,
                "hours": 4
            },
            "schedule": "134795",
            "perms": "2",
            "published": "1373362618",
            "title": "",
            "user": "240712"
        }
    ]
}