ProJect - Sign-off an interval

API Url

Used for doing project sign-off for 1 or more employees. The API will check if it's allowed to enter sigoffs for another employee.

POST
http://localhost:16010/ProMarkREST/rest/ProJect/sign-offs

Permissions: user

Query parameters

FieldTypeDescription
activityIdoptionalString

Activity Id.

pieceWorkIdoptionalString

Piece work Id.

projectIdoptionalString

Project id.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    singoffsObject[]

Collection of signoff intervals.

      empIdString

The employee ID.

      endDate

End date of interval for signOff period.

      startDate

Start date of interval for signOff period.

Request example for adding signoffs via time interval:

{
"request": {
"data": {
"signoffs": [
{
"empId": "804",
"start": "2017-06-22",
"end": "2017-06-22",
}
]
}
}
}

Success 200

FieldTypeDescription
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

The error response object.

  dataoptionalObject

Error data object

    attendanceDateoptionalDate

Attendance date where error is (for codes 103, 104, 105, 106, 107).

    endTimeoptionalNumber

Attendance end time in seconds after mid-night (for code 105).

    startTimeoptionalNumber

Attendance start time in seconds after mid-night (for code 105).

  errorCodeNumber

Error Code (101(SYS): System/program error, 102(NOK): Assorted or low-level error, 103(OSO): Signoff must also be removed from a later date than requested, 104(MHR): Missing registration time (ProJect or part.absence), 105(MRE): Missing registration (ProJect or part.absence), 106(MSO): Missing signoff on an earlier date than requested, 107(OLA): Overlapping registrations (ProJect or part.absence))

  errorMessageString

Error description.

Error example:

HTTP/1.1 422 Error example
{
"response": {
"errorCode": 103,
"errorMessage": "Signoff must also e removed from a later date than requested"
}
}