Supplement - Get supplement registrations for specific employee.
API Url
Used for loading supplement registrations for specific employees
http://localhost:16010/ProMarkREST/rest/Supplement/employees/{emp_id}/registrations
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Employee ID |
Query parameters
| Field | Type | Description |
|---|---|---|
expandoptional | String | 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'). |
fieldsoptional | String | List of fields to be returned in the collection. Used for limiting amount of data. |
filteroptional | String | Added just in case if it is required in future. |
fromoptional | Date | Start date for loading registrations. Default is TODAY. |
projectIdoptional | String | 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. |
readOnlyoptional | Boolean | true = Load registrations in read-only mode (better performance). Default is false. |
tooptional | Date | End date for loading registrations. Default is 'from'. |
typeoptional | Number | supplement type: 0 = Time supplement, 1 = Number supplement, ? = Both |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| registrations | Object | Collection of supplement registrations. |
activityoptional | String | Activity ID. If 'expand=activity' then it's the object containing id & description. |
descriptionoptional | String | Activity description. Only if 'expand=activity'. |
idoptional | String | Activity Id. Only if 'expand=activity'. |
| empId | String | Employee ID. |
extraInfooptional | Object | Collection of extra info (project dimensions). |
| dimension | Number | Dimension number. If 0, then record is not a reportin dimension. |
| info | String | Extra info ID. If 'expand=extraInfo' then it's the object containing id & description. |
descriptionoptional | String | Extra info description. Only if 'expand=extraInfo'. |
idoptional | String | Extra info Id. Only if 'expand=extraInfo'. |
| isFixedValue | Boolean | true = Answer needs to be selected from a fixed list. |
| value | String | Extra info value ID. If 'expand=extraInfoValue' then it's the object containing id & description. |
descriptionoptional | String | Extra info value description. Only if 'expand=extraInfoValue'. |
idoptional | String | Extra info value Id. Only if 'expand=extraInfoValue'. |
| isLocked | Boolean | true = Registrations, including notes, cannot be changed. |
pieceworkoptional | String | Piecework ID. If 'expand=piecework' then it's the object containing id & description. |
descriptionoptional | String | Piecework description. Only if 'expand=piecework'. |
idoptional | String | Piecework Id. Only if 'expand=piecework'. |
projectoptional | String | Project ID. If 'expand=project' then it's the object containing id & description. |
descriptionoptional | String | Project description. Only if 'expand=project'. |
idoptional | String | Project Id. Only if 'expand=project'. |
supplementoptional | String | If 'expand=supplement' then it's the object containing supplement information. |
dataTypeoptional | String | Supplement data type. Only if 'expand=supplement'. |
descriptionoptional | String | Supplement description. Only if 'expand=supplement'. |
formatoptional | String | Supplement fromat string. Only if 'expand=supplement'. Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
idoptional | String | Supplement id. Only if 'expand=supplement'. |
typeoptional | String | Supplement type. Only if 'expand=supplement'. |
unitoptional | String | Supplement unit. Only if 'expand=supplement'. |
unitStroptional | String | Supplement unit string. Only if 'expand=supplement'. |
supplementIdoptional | String | Supplement ID. Only if 'expand=supplement' is not defined. |
supplementTypeoptional | String | Supplement type 0 = Time supplement, 1 = Number supplement. Only if 'expand=supplement' is not defined. |
timeTypeoptional | String | Time type ID. If 'expand=timeType' then it's the object containing id & description. |
descriptionoptional | String | Time type description. Only if 'expand=timeType'. |
idoptional | String | Time type Id. Only if 'expand=timeType'. |
| values | Object | Collection with registration returned back from the server. |
| approvalDept | String | Department secondary to approval group. |
| approvalGroup | String | The approval group the registration belongs to. |
| approvalStatus | Number | Approval status of the registration (0: No approval needed, 4: Pending approval, 5: Rejected, 2: Approved). |
| approvalTime | Date | Date-time when registration was approved/rejected. |
| approvedBy | String | The user who approved the registration. |
| attendanceDate | Date | Date when registration is inserted. |
| displayValue | String | Display value. |
| noLongerValid | Boolean | 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. |
| note | String | Supplement note. |
| readOnly | Boolean | true = Registration is read only. |
| transSeq | Number | This is the unique transaction number. It will be filled by the server for new transactions. |
| value | Number | Registerered value. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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": ""}}