SignOff - Sign off or un-sign days

API Url

Set the sign-off state of a day interval for one or more subjects. The request and the response share one representation: every property of request.data other than 'select' is a writable field of the sign-off resource, named as it appears in the response.

                  Two rules shape what comes back. Signing a day is refused while                   any earlier day that requires a sign-off is still unsigned, and                   that subject is reported in 'failures' while the others succeed.                   Removing a sign-off cascades forward past the requested interval,                   because a signed day may never rest on an unsigned one -- so a                   removal can return MORE days than were asked for.                    One subject's failure never rolls back another's.
PUT
http://localhost:16010/ProMarkREST/web/SignOff/:resource/days

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.

Path parameters

FieldTypeDescription
resourceString

The subject type. Only "employees" today.

Query parameters

FieldTypeDescription
viewoptionalString

"days" returns one row per day in 'signOffs'. "summary" returns one row per subject in 'summaries' instead -- use it for mass sign-off, where 200 employees over a month is some 6200 day rows.

Default value: days

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    selectObject

What to act on.

      filteroptionalObject

Selection filter. See the Global Employee Filter for schema and structure. Its 'type' must be the employee filter type.

      fromDate

First day of the interval.

      idsoptionalString[]

Subject ids. Employee ids (internal emp_id), not employee numbers. Mutually exclusive with 'filter'; one of the two is required.

      tooptionalDate

Last day of the interval. Omit it on a removal to clear from 'from' forward.

    signedOffBoolean

TRUE signs off, FALSE removes the sign-off. Required, and there is no default -- an omitted or null 'signedOff' is a 400, not a removal.

Request example:

{
"request": {
"data": {
"signedOff": true,
"select": {
"ids": ["000123", "000124"],
"from": "2026-08-01",
"to": "2026-08-07"
}
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    failuresObject[]

One row per subject-day that was refused. Carries the same id + date identity as 'signOffs', so a grid can join it straight onto the rows it tried to change.

      dateoptionalDate

The day, or null when the failure is not about one day.

      errorCodeNumber

GE/BASE message number. 993 = an earlier day is still unsigned, 549 = future day not allowed for this category, 603 = the day is in a closed period (its open part is still signed), 591 = removal starts in a closed period (nothing removed), 994 = unexpected.

      errorMessageString

The refusal, already translated.

      idString

Subject id.

    signOffsObject[]

One row per day whose state the write settled. Absent when view=summary.

      atoptionalString

When, ignored if sent.

      byoptionalString

Who last changed the day, ignored if sent.

      dateDate

The day.

      idString

Subject id.

      signedOffBoolean

TRUE = the day is signed off.

    summariesObject[]

One row per subject. Only when view=summary.

      atoptionalString

When.

      byoptionalString

Who last changed a day in the interval.

      daysNumber

Days the write covered: relevant days signed off, or relevant days actually cleared.

      fromDate

First day covered -- the requested start.

      idString

Subject id.

      signedOffBoolean

The state the interval ended in.

      toDate

Last day covered. Past the requested end when a removal cascaded.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"signOffs": [
{
"id": "000123",
"date": "2026-08-01",
"signedOff": true,
"by": "dma",
"at": "2026-08-16T14:02:11+02:00"
}
],
"failures": [
{
"id": "000124",
"date": "2026-08-03",
"errorCode": 993,
"errorMessage": "Missing sign-off on an earlier date (2026-08-02)"
}
]
},
"message": {
"type": 2,
"code": 9999,
"text": "1 of 2 employees could not be signed off"
},
"errorCode": 0,
"errorMessage": ""
}
}

Summary example (view=summary):

HTTP/1.1 200 OK
{
"response": {
"data": {
"summaries": [
{
"id": "000123",
"from": "2026-08-01",
"to": "2026-08-31",
"signedOff": true,
"days": 21,
"by": "dma",
"at": "2026-09-01T08:30:00+02:00"
}
],
"failures": []
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
BadRequest

The body carries no data object, 'signedOff' is missing or null, '?view=' is not one of days/summary, neither 'ids' nor 'filter' was given, both were, 'from' is missing, the interval is inverted, or the filter is malformed or of a type this resource does not accept.