Supplement - Get supplement registrations for multiple employees.

API Url

Used for loading supplement registrations for one or more employees

GET
http://localhost:16010/ProMarkREST/rest/Supplement/registrations

Permissions: user

Query parameters

FieldTypeDescription
empIdoptionalString

Can contain 1 or more employee IDs (comma delimiter) to filter registrations on. If employee Id is not defined returns supplement registrations for all employees.

expandoptionalString

Expand specified properties (comma delimiter) with descriptions. Supported values are: 'all', 'supplementDescr', 'project', 'activity', 'timeType', 'piecework', 'extraInfo', 'extraInfoValue'. Supports also exclusions, so you can add a minus in front (eg. 'all,-extraInfo').

fieldsoptionalString

List of fields to be returned in the collection. Used for limiting amount of data.

filteroptionalString

Added just in case if it is required in future.

fromoptionalDate

Start date for loading registrations. Default is TODAY.

projectIdoptionalString

Can contain 1 or more project IDs (comma delimiter) to filter registrations on. If project id is not defined, check for all projects used by registrations.

readOnlyoptionalBoolean

true = Load registrations in read-only mode (better performance). Default is false.

tooptionalDate

End date for loading registrations. Default is 'from'.

typeoptionalNumber

supplement type: 0 = Time supplement, 1 = Number supplement, ? = Both

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    registrationsObject

Collection of supplement registrations.

      activityoptionalString

Activity ID. If 'expand=activity' then it's the object containing id & description.

        descriptionoptionalString

Activity description. Only if 'expand=activity'.

        idoptionalString

Activity Id. Only if 'expand=activity'.

      empIdString

Employee ID.

      extraInfooptionalObject

Collection of extra info (project dimensions).

        dimensionNumber

Dimension number. If 0, then record is not a reportin dimension.

        infoString

Extra info ID. If 'expand=extraInfo' then it's the object containing id & description.

          descriptionoptionalString

Extra info description. Only if 'expand=extraInfo'.

          idoptionalString

Extra info Id. Only if 'expand=extraInfo'.

        isFixedValueBoolean

true = Answer needs to be selected from a fixed list.

        valueString

Extra info value ID. If 'expand=extraInfoValue' then it's the object containing id & description.

          descriptionoptionalString

Extra info value description. Only if 'expand=extraInfoValue'.

          idoptionalString

Extra info value Id. Only if 'expand=extraInfoValue'.

      isLockedBoolean

true = Registrations, including notes, cannot be changed.

      pieceworkoptionalString

Piecework ID. If 'expand=piecework' then it's the object containing id & description.

        descriptionoptionalString

Piecework description. Only if 'expand=piecework'.

        idoptionalString

Piecework Id. Only if 'expand=piecework'.

      projectoptionalString

Project ID. If 'expand=project' then it's the object containing id & description.

        descriptionoptionalString

Project description. Only if 'expand=project'.

        idoptionalString

Project Id. Only if 'expand=project'.

      supplementoptionalString

If 'expand=supplement' then it's the object containing supplement information.

        dataTypeoptionalString

Supplement data type. Only if 'expand=supplement'.

        descriptionoptionalString

Supplement description. Only if 'expand=supplement'.

        formatoptionalString

Supplement fromat string. Only if 'expand=supplement'. Account format ("HH:MM", "HH.CC", ".1", ".2" and so on).

        idoptionalString

Supplement id. Only if 'expand=supplement'.

        typeoptionalString

Supplement type. Only if 'expand=supplement'.

        unitoptionalString

Supplement unit. Only if 'expand=supplement'.

        unitStroptionalString

Supplement unit string. Only if 'expand=supplement'.

      supplementIdoptionalString

Supplement ID. Only if 'expand=supplement' is not defined.

      supplementTypeoptionalString

Supplement type 0 = Time supplement, 1 = Number supplement. Only if 'expand=supplement' is not defined.

      timeTypeoptionalString

Time type ID. If 'expand=timeType' then it's the object containing id & description.

        descriptionoptionalString

Time type description. Only if 'expand=timeType'.

        idoptionalString

Time type Id. Only if 'expand=timeType'.

      valuesObject

Collection with registration returned back from the server.

        approvalDeptString

Department secondary to approval group.

        approvalGroupString

The approval group the registration belongs to.

        approvalStatusNumber

Approval status of the registration (0: No approval needed, 4: Pending approval, 5: Rejected, 2: Approved).

        approvalTimeDate

Date-time when registration was approved/rejected.

        approvedByString

The user who approved the registration.

        attendanceDateDate

Date when registration is inserted.

        displayValueString

Display value.

        noLongerValidBoolean

true = Registration is no longer valid. This could be due to change in project profiles, change of home depart back in time etc. Record cannot be changed, but it can be deleted, that is set the RegTime to zero.

        noteString

Supplement note.

        readOnlyBoolean

true = Registration is read only.

        transSeqNumber

This is the unique transaction number. It will be filled by the server for new transactions.

        valueNumber

Registerered value.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example with expand=all,-extrainfo,-extrainfoValue:

HTTP/1.1 200 OK
{
"response": {
"data": {
"registrations": [
{
"empId": "612",
"isLocked": false,
"extraInfo": [
{
"info": "DEPT:",
"value": "BAYPROJ",
"isFixedValue": true,
"dimension": 0
}
],
"values": [
{
"attendanceDate": "2017-08-02",
"value": 14400,
"displayValue": "14400",
"readOnly": false,
"note": "Time suppl. test by STB",
"noLongerValid": true,
"transSeq": 2189411,
"approvalStatus": 0
}
],
"supplement": [
{
"type": 0,
"id": "BH",
"description": "Time supplement BH",
"dataType": 7,
"unit": 1,
"unitStr": "Hours"
}
],
"project": [
{
"id": "STB",
"description": "STB"
}
],
"activity": [
{
"id": "10",
"description": "Customer visit"
}
],
"timeType": [
{
"id": "NORM",
"description": "Normal time"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}