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.

PUT
http://localhost:16010/ProMarkREST/rest/ProJect/registrations

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    valuesObject

Collection with registration values.

      approvalDeptString

Department secondary to approval group (not updatable).

      approvalGroupString

The approval group the registration belongs to (not updatable).

      approvalStatusNumber

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

      approvalTimeDate

Date-time when registration was approved/rejected (not updatable).

      approvedByString

The user who approved the registration (not updatable).

      attendanceDateDate

Date when registration is inserted (not updatable).

      copyTransSeqNumber

For internal use! It make it possible to register time for the same project/activity/time type from another day (not updatable).

      endTimeNumber

End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

      favouriteObjectIdNumber

The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'.

      favouriteTypeNumber

Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time).

Size range: 0-2
      inclTimeInTotalsBoolean

true = Registered time needs to be included in the total time being displayed (not updatable).

      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. Not updatable!

      noteString

Comment / note on the registration.

      readOnlyBoolean

true = Registration is read only (not updatable).

      registeredTimeNumber

Time to register expressed in seconds.

      signOffByString

If the value starts with "*" then it was the employee that made the sign-off (not updatable).

      signOffDateTimeDate

Date-time when registration was signed-off (not updatable).

      signOffStatusNumber

Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off).

      startTimeNumber

Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

      transSeqNumber

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

FieldTypeDescription
    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.

      copyTransSeqNumber

For internal use! It make it possible to register time for the same project/activity/time type from another day.

      endTimeNumber

End time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

      favouriteObjectIdNumber

The unique ID of the favourite project/activity/time type record. Used in connection with 'favouriteType'.

      favouriteTypeNumber

Project/activity/time type is a favourite one if 'favouriteType' > 0 (0: Not favourite, 1: Favourite, 2: Favourite with default time).

Size range: 0-2
      inclTimeInTotalsBoolean

true = Registered time needs to be included in the total time being displayed.

      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

Comment / note on the registration.

      readOnlyBoolean

true = Registration is read only.

      registeredTimeNumber

Time to register expressed in seconds.

      signOffByString

If the value starts with "*" then it was the employee that made the sign-off.

      signOffDateTimeDate

Date-time when registration was signed-off.

      signOffStatusNumber

Sign-off status of the registration (0: Sign-off not required, 1: Sign-off pending, 3: Sign-off).

      startTimeNumber

Start time of registration expressed in seconds relative to 'attendanceDate'. Registrations can also be entered as time intervals.

      transSeqNumber

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

responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.