SelfService - Get shifts you can swop with

API Url

Used in Self-service for loading employee shifts you can swop with. This is according to Self-service swop method and it's including favourite co-workers.

GET
http://localhost:16010/ProMarkREST/rest/SelfService/swop-shifts

Permissions: user

Query parameters

FieldTypeDescription
addEmpIdoptionalString

List of employee IDs for which to see swop-shifts

empIdoptionalString

Comma separated list of employee IDs. Used for filtering shifts.

fromoptionalDate

Show shifts from this date (ISO-8601). Default is TODAY.

tooptionalDate

Show shifts until this date (ISO-8601). Default is 'from' + 7 days (one week).

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    swopShiftsObject[]

Collection of shifts you can swop with.

      backColoroptionalString

Backcolor of shift as HEX.

      clockInoptionalDate

Shift start date-time as ISO-8601.

      clockOutoptionalDate

Shift end date-time as ISO-8601.

      dayProfileDescString

Day profile description.

      dayProfileIdString

Day profile ID of the shift.

      empIdString

Employee ID, owner of shift.

      empNameString

Employee full name.

      foreColoroptionalString

Forecolor of shift as HEX.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"swopShifts": [
{
"empId": "392",
"empName": "Michael Kors",
"attendanceDate": "2017-06-21",
"dayProfileId": "M002",
"dayProfileDesc": "Morning shift 10-16",
"clockIn": "2017-06-21T10:00:00.000",
"clockOut": "2017-06-21T16:00:00.000",
"foreColor": "F30C51",
"backColor": "568DF3"
}
]
},
"errorCode": 0
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.