ProJect - Update registration
API Url
Used for simple update of project registrations. If you need to change project/activity/time type/dimensions then use PUT /rest/ProJect/employees/{emp_id}/registrations-wizard.
http://localhost:16010/ProMarkREST/rest/ProJect/registrations
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| values | Object | Collection with registration values. |
| approvalDept | String | Department secondary to approval group (not updatable). |
| approvalGroup | String | The approval group the registration belongs to (not updatable). |
| approvalStatus | Number | Approval status of the registration (0: No approval needed, 4: Pending approval, 5: Rejected, 2: Approved). Not updatable! |
| approvalTime | Date | Date-time when registration was approved/rejected (not updatable). |
| approvedBy | String | The user who approved the registration (not updatable). |
| attendanceDate | Date | Date when registration is inserted (not updatable). |
| copyTransSeq | Number | For internal use! It make it possible to register time for the same project/activity/time type from another day (not updatable). |
| endTime | Number | End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| favouriteObjectId | Number | The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'. |
| favouriteType | Number | Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time). 0-2 |
| inclTimeInTotals | Boolean | true = Registered time needs to be included in the total time being displayed (not updatable). |
| 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. Not updatable! |
| note | String | Comment / note on the registration. |
| readOnly | Boolean | true = Registration is read only (not updatable). |
| registeredTime | Number | Time to register expressed in seconds. |
| signOffBy | String | If the value starts with "*" then it was the employee that made the sign-off (not updatable). |
| signOffDateTime | Date | Date-time when registration was signed-off (not updatable). |
| signOffStatus | Number | Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off). |
| startTime | Number | Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| transSeq | Number | This is the unique transaction number. If it?s a new record the value must be -1. |
Request example for updating registrationtime:
{"request": {"data": {"values": [{"attendanceDate": "2017-05-15","readOnly": true,"registeredTime": 1440,"startTime": 0,"endTime": 0,"note": "","noLongerValid": false,"transSeq": 2171364,"copyTransSeq": 0,"favouriteType": 0,"favouriteObjectId": 0,"inclTimeInTotal": true,"approvalStatus": 0,"approvalGroup": "","approvalDept": "","approvedBy": "","approvalTime": null,"signOffStatus": 1,"signOffBy": "","signOffDateTime": null}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| 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. |
| copyTransSeq | Number | For internal use! It make it possible to register time for the same project/activity/time type from another day. |
| endTime | Number | End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| favouriteObjectId | Number | The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'. |
| favouriteType | Number | Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time). 0-2 |
| inclTimeInTotals | Boolean | true = Registered time needs to be included in the total time being displayed. |
| 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 | Comment / note on the registration. |
| readOnly | Boolean | true = Registration is read only. |
| registeredTime | Number | Time to register expressed in seconds. |
| signOffBy | String | If the value starts with "*" then it was the employee that made the sign-off. |
| signOffDateTime | Date | Date-time when registration was signed-off. |
| signOffStatus | Number | Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off). |
| startTime | Number | Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals. |
| transSeq | Number | This is the unique transaction number. It will be filled by the server for new transactions. |
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |