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.
http://localhost:16010/ProMarkREST/rest/ProJect/sign-offs
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
activityIdoptional | String | Activity Id. |
pieceWorkIdoptional | String | Piece work Id. |
projectIdoptional | String | Project id. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| singoffs | Object[] | Collection of signoff intervals. |
| empId | String | The employee ID. |
| end | Date | End date of interval for signOff period. |
| start | Date | 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
| Field | Type | Description |
|---|---|---|
| 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 | The error response object. |
dataoptional | Object | Error data object |
attendanceDateoptional | Date | Attendance date where error is (for codes 103, 104, 105, 106, 107). |
endTimeoptional | Number | Attendance end time in seconds after mid-night (for code 105). |
startTimeoptional | Number | Attendance start time in seconds after mid-night (for code 105). |
| errorCode | Number | 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)) |
| errorMessage | String | 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"}}