General - Sign-off an interval

API Url

Used for doing protime registration sign-offs

POST
http://localhost:16010/ProMarkREST/rest/General/employees/{empId}/sign-offs

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    singoffsObject[]

Collection of signoff intervals.

      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": [
{
"from": "2018-11-25",
"to": "2018-12-08"
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Error 4xx

FieldTypeDescription
  errorCodeNumber

Error Code if any

  errorMessageString

Error description.

Error example:

HTTP/1.1 422 Error example
{
"response": {
"errorCode": 547,
"errorMessage": "This period is already signoff!"
}
}