schedule.shiftapprove

Management of individual shifts.

SUPPORTED METHODS:

GET

Parameters

Type

Description

token (required)

Valid token

id (required)

integer

Shift id

CREATE

Parameters

Type

Description

token (required)

Valid token

id (required)

integer

Shift id

employee

integer

Employee id

absent

enum (0, 1)

Absent

0: Not absent
1: Absent

start_time

time

Start time

end_time

time

End time

UPDATE

Parameters

Type

Description

token (required)

Valid token

employee (accepted)

integer

Employee id

id (accepted)

integer

shift_ids (accepted)

integer

absent accepted)

enum (0, 1)

Absent

0: Not absent
1: Absent

start_time (accepted)

time

Start time

end_time (accepted)

time

End time

start_date (accepted)

date

Start date

end_date (accepted)

date

End date

DELETE

Parameters

Type

Description

token (required)

Valid token

id (required)

integer

DOCUMENTATION

GET
Retrieves an individual shift that needs approval.
Level 3 is required.

--

Example Request:

{
   "module":"schedule.shiftapprove",
   "method":"GET",
   "request":{
      "id":"409004026"
   }
}

Example response:

{
  "status": 1,
  "data": [
    {
      "employee": "2741245",
      "present": "0",
      "absent": "0",
      "early": "0",
      "late": "0",
      "ontime": "0",
      "worked_late": "0",
      "shift": "409004026",
      "confirmed_start": {
        "id": -2960,
        "month": 1,
        "day": 1,
        "wday": 4,
        "year": 1970,
        "weekday": "Thu",
        "mname": "Jan",
        "week": 1,
        "dayid": 5,
        "timeid": 9,
        "timeid_exact": 9,
        "formatted": "Jan 1, 1970",
        "iso8601": "1970-01-01T02:00:00+0200",
        "time": "2:00am",
        "timestamp": false,
        "hours": 2,
        "minutes": 0,
        "seconds": 0,
        "date": "1970-01-01 02:00:00",
        "day_of_year": "0",
        "week_adjusted": 1,
        "sp_wday": 5
      },
      "confirmed_end": {
        "id": -2960,
        "month": 1,
        "day": 1,
        "wday": 4,
        "year": 1970,
        "weekday": "Thu",
        "mname": "Jan",
        "week": 1,
        "dayid": 5,
        "timeid": 9,
        "timeid_exact": 9,
        "formatted": "Jan 1, 1970",
        "iso8601": "1970-01-01T02:00:00+0200",
        "time": "2:00am",
        "timestamp": false,
        "hours": 2,
        "minutes": 0,
        "seconds": 0,
        "date": "1970-01-01 02:00:00",
        "day_of_year": "0",
        "week_adjusted": 1,
        "sp_wday": 5
      },
      "start_time": {
        "id": 9,
        "time": "2:00am"
      },
      "end_time": {
        "id": 9,
        "time": "2:00am"
      }
    }
  ],
  "token": "xxxxxxx"
}

CREATE
Confirms an individual shift.
Level 3 is required.

--

Example Request:

{
   "module":"schedule.shiftapprove",
   "method":"CREATE",
   "request":{
      "id":"409004026"
   }
}

Example response:

{
  "status": 1,
  "data": {
    "id": "409003821",
    "created": "1496416510",
    "published": "1496416557",
    "edited": "1496416516",
    "deleted": "0",
    "schedule": "1068296",
    "type": "0",
    "needed": "0",
    "working": "1",
    "user": "2097936",
    "start_date": {
      "id": 2956,
      "month": 6,
      "day": 2,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 22,
      "dayid": 6,
      "timeid": 37,
      "timeid_exact": 37,
      "formatted": "Jun 2, 2017",
      "iso8601": "2017-06-02T09:00:00+0300",
      "time": "9:00am",
      "timestamp": 1496383200,
      "hours": 9,
      "minutes": 0,
      "seconds": 0,
      "date": "2017-06-02 09:00:00",
      "day_of_year": "152",
      "week_adjusted": 22,
      "sp_wday": 6
    },
    "end_date": {
      "id": 2956,
      "month": 6,
      "day": 2,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 22,
      "dayid": 6,
      "timeid": 69,
      "timeid_exact": 69,
      "formatted": "Jun 2, 2017",
      "iso8601": "2017-06-02T17:00:00+0300",
      "time": "5:00pm",
      "timestamp": 1496412000,
      "hours": 17,
      "minutes": 0,
      "seconds": 0,
      "date": "2017-06-02 17:00:00",
      "day_of_year": "152",
      "week_adjusted": 22,
      "sp_wday": 6
    },
    "length": 8,
    "title": "",
    "location": "0",
    "notes": " ",
    "confirmed": "1",
    "ref": "0",
    "start_timestamp": "2017-06-02 09:00:00",
    "end_timestamp": "2017-06-02 17:00:00",
    "perms": "2",
    "paidtime": 8,
    "start_time": {
      "id": 37,
      "time": "9:00am"
    },
    "end_time": {
      "id": 69,
      "time": "5:00pm"
    },
    "schedule_name": "1w -test1",
    "schedule_color": "23",
    "schedule_location_id": "0",
    "employees": [
      {
        "id": "2695460",
        "present": "1",
        "avatar": "0",
        "name": "Kimberly Moore",
        "status": "1",
        "wage": "",
        "notified_day": "0",
        "notified_hour": "0",
        "last_active": "0",
        "rate": null,
        "ratecard": null,
        "cost": 0
      }
    ],
    "employeesOnCall": null,
    "cost": {
      "staff": 1,
      "hours": 8,
      "dollars": 0
    },
    "repeats": "0"
  },
  "token": "xxxxxxx"
}

UPDATE
Updates an individual shift.
Level 3 is required.

--

Example Request:

{
   "module":"schedule.shiftapprove",
   "method":"UPDATE",
   "request":{
      "id":"409003821",
      "end_time":"11pm"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"94147",
      "created":"1338293250",
      "published":"1338345621",
      "edited":"1338293250",
      "deleted":"0",
      "schedule":"32409",
      "type":"0",
      "needed":"0",
      "working":"1",
      "user":"2",
      "start_date":{
         "id":"1126",
         "month":"5",
         "day":"29",
         "year":"2017",
         "weekday":"Tue",
         "mname":"May",
         "week":"22",
         "dayid":3,
         "formatted":"May 29, 2017"
      },
      "end_date":{
         "id":"1126",
         "month":"5",
         "day":"29",
         "year":"2017",
         "weekday":"Tue",
         "mname":"May",
         "week":"22",
         "dayid":3,
         "formatted":"May 29, 2017"
      },
      "length":8,
      "title":"",
      "location":"0",
      "notes":"",
      "confirmed":"0",
      "perms":"2",
      "paidtime":"8",
      "start_time":{
         "id":"33",
         "time":"08:00"
      },
      "end_time":{
         "id":"65",
         "time":"16:00"
      },
      "schedule_name":"Break Cover",
      "employees":[
         {
            "id":"3820",
            "name":"Aly",
            "status":"1",
            "wage":"10",
            "notified_day":"0",
            "notified_hour":"0",
            "last_active":"1338389744",
            "rate":"",
            "ratecard":"0",
            "cost":"80.00"
         }
      ],
      "cost":{
         "staff":1,
         "hours":8,
         "dollars":80
      },
      "repeats":"0",
      "staff":{
         "scheduled":[
            {
               "3820":"18.00"
            }
         ],
         "available":[
            {
               "4910":"10.00"
            },
            {
               "5215":"10.00"
            },
            {
               "1063":"0.00"
            },
            {
               "5412":"0.00"
            },
            {
               "5216":"0.00"
            }
         ],
         "sameday":null,
         "mintime":null,
         "overlap":[
            {
               "5141":"14.00"
            }
         ],
         "unavail":null,
         "vacation":[
            {
               "5019":"0.00"
            },
            {
               "4944":"0.00"
            }
         ],
         "overtime":null
      },
      "break":8,
      "conflicts":false
   },
   "token":"xxxxxxx"
}

DELETE
Unconfirm an individual shift.
Level 3 is required.

--

Example Request:

{
   "module":"schedule.shiftapprove",
   "method":"DELETE",
   "request":{
      "id":"409003821"
   }
}

Example response:

{
  "status": 1,
  "data": {
    "id": "409003821",
    "created": "1496416510",
    "published": "1496416557",
    "edited": "1496416516",
    "deleted": "0",
    "schedule": "1068296",
    "type": "0",
    "needed": "0",
    "working": "1",
    "user": "2097936",
    "start_date": {
      "id": 2956,
      "month": 6,
      "day": 2,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 22,
      "dayid": 6,
      "timeid": 37,
      "timeid_exact": 37,
      "formatted": "Jun 2, 2017",
      "iso8601": "2017-06-02T09:00:00+0300",
      "time": "9:00am",
      "timestamp": 1496383200,
      "hours": 9,
      "minutes": 0,
      "seconds": 0,
      "date": "2017-06-02 09:00:00",
      "day_of_year": "152",
      "week_adjusted": 22,
      "sp_wday": 6
    },
    "end_date": {
      "id": 2956,
      "month": 6,
      "day": 2,
      "wday": 5,
      "year": 2017,
      "weekday": "Fri",
      "mname": "Jun",
      "week": 22,
      "dayid": 6,
      "timeid": 69,
      "timeid_exact": 69,
      "formatted": "Jun 2, 2017",
      "iso8601": "2017-06-02T17:00:00+0300",
      "time": "5:00pm",
      "timestamp": 1496412000,
      "hours": 17,
      "minutes": 0,
      "seconds": 0,
      "date": "2017-06-02 17:00:00",
      "day_of_year": "152",
      "week_adjusted": 22,
      "sp_wday": 6
    },
    "length": 8,
    "title": "",
    "location": "0",
    "notes": " ",
    "confirmed": "0",
    "ref": "0",
    "start_timestamp": "2017-06-02 09:00:00",
    "end_timestamp": "2017-06-02 17:00:00",
    "perms": "2",
    "paidtime": 8,
    "start_time": {
      "id": 37,
      "time": "9:00am"
    },
    "end_time": {
      "id": 69,
      "time": "5:00pm"
    },
    "schedule_name": "1w -test1",
    "schedule_color": "23",
    "schedule_location_id": "0",
    "employees": [
      {
        "id": "2695460",
        "present": "0",
        "avatar": "0",
        "name": "Kimberly Moore",
        "status": "1",
        "wage": "",
        "notified_day": "0",
        "notified_hour": "0",
        "last_active": "0",
        "rate": null,
        "ratecard": null,
        "cost": 0
      }
    ],
    "employeesOnCall": null,
    "cost": {
      "staff": 1,
      "hours": 8,
      "dollars": 0
    },
    "repeats": "0"
  },
  "token": "xxxxxxx"
}