ProRoster - Create a stamp

API Url

Used for inserting a stamp

POST
http://localhost:16010/ProMarkREST/web/ProRoster/stamps

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.

    stampsObject[]
      absenceReasonoptionalObject[]
        codeString

The code of the absence reason

      attendanceProfileoptionalObject[]
        idString

The attendance profile's id

      attendanceTimeoptionalObject[]
        endTimeNumber

End time

        isLockedBoolean

TRUE if it is locked

        isRequiredBoolean

TRUE if it is required

        startTimeNumber

Start time

      dayProfileoptionalObject[]
        idString

The day profile id

      departmentoptionalObject[]
        idString

The department's id

      groupoptionalObject[]
        idString

The group's id

      normalTimeoptionalObject[]
        endTimeNumber

End time

        isLockedBoolean

TRUE if it is locked

        isRequiredBoolean

TRUE if it is required

        startTimeNumber

Start time

      typeNumber

The type of the stamp. 0: Shift 1: All day absence 2: Attendance profile

      valueTypesString[]

An array with the value types that will be inserted for the stamp

Request example:

{
"request": {
"data": {
"stamps": [{
"type": 0,
"valueTypes": [
"day-profile",
"normal-time",
"department"
],
"day-profile": [
{
"id": "BAY7-16"
}],
"normal-time": [
{
"startTime": 25200,
"endTime": 57600,
"isLocked": "false",
"isRequired": "false"
}],
"department":[{
"id": "17"
}]
}]
}
}
}

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"

Success example:

{
"response": {
"data": {
"stamps": [{
"stampId": 2164886755,
"type": 0,
"valueTypes": [
"day-profile",
"normal-time",
"department",
"group"
],
"day-profile": [
{
"id": "BAY7-16",
"description": "07: 00 - 16: 00, Bay test",
"normalTimeStart": 25200,
"normalTimeStop": 57600,
"isVariable": "false",
"hoursPerDay": 28800,
"inactive": "false",
"arrivalTimeStop": 86400,
"departureTimeStop": 86400,
"normalTimeIntervalFormatted": "07: 00 - 16: 00",
"arrivalTimeIntervalFormatted": "--:-- - 00: 00",
"departureTimeIntervalFormatted": "--:-- - 00: 00",
"hourPerDayFormatted": "08: 00"
}],
"normal-time": [
{
"startTime": 25200,
"endTime": 57600,
"isLocked": "false",
"isRequired": "false"
}],
"department":[{
"id": "17",
"sortId": "!!!!!!!!17",
"desc": "HR Department",
"description": "HR Department"
}]
}]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.