Approval - Get custom approval registrations

API Url

Used for loading custom approval registrations of requested type. custom = (project, absence (AA and AH), time supplement and number supplement registrations)

GET
http://localhost:16010/ProMarkREST/rest/Approval/custom-registrations

Permissions: user

Query parameters

FieldTypeDescription
approvalGroupoptionalString

Approval Group ID. If not defined all valid approval groups are taken by default.

approvalStatusoptionalNumber

Approval status to filter data (1: Untreated, 2: Approved, 3: Rejected). In not defined then untreated transactions are returned.

Size range: 1-3
expandoptionalString

Expand specified properties (comma delimiter) with descriptions. (Not implemented yet)

fieldsoptionalString

List of fields to be returned in the collection. Used for limiting amount of data.(Not implemented yet)

fromoptionalDate

Start date for loading registrations.

tooptionalDate

End date for loading registrations.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    registrationsObject

Collection of employee approval registrations

      account1optionalString

Formatted value for custom account1, based on "Approval web-part Proportal 2018" setup

      account2optionalString

Formatted value for custom account2, based on "Approval web-part Proportal 2018" setup

      activityDescroptionalString

Activity description

      activityIdoptionalString

Activity id, if used

      approvalStatusNumber

Approval status

      avatarURIoptionalString

URI to the employee avatar picture.

      commentoptionalString

Comment if exists

      dim1DescroptionalString

Dimension1 description

      dim1IdoptionalString

Dimension1 value if used

      dim2DescroptionalString

Dimension2 description

      dim2IdoptionalString

Dimension2 value if used

      empIdString

Employee identifier

      empNameString

Employee first name

      empNoString

Employee No

      endTimeoptionalDate

End time

      formatoptionalString

Account format ("HH:MM", "HH.CC", ".1", ".2" and so on)

      initialsString

Employee initials.

      projectDescroptionalString

Project description

      projectIdoptionalString

Project id, if used

      registrationTimeDate

Registration Date and time as ISO-8601.

      regTypeString

Registration Type Id

      regtypeDescrString

Registration Type description

      rejectedHigherLeveloptionalBoolean

If it is rejected at higher level?

      signOffByoptionalString

Signof by

      signOffDateTimeoptionalDate

Sign off date time

      sortEmpNoString

Employee No used for sorting

      startTimeoptionalDate

Start time

      timeTypeDescroptionalString

Time type id, if exists

      timeTypeIdoptionalString

Time type id, if exists

      transSeqNumber

Transaction Sequence

      treatedByoptionalString

Approved by

      treatedByFirstoptionalString

First approver

      treatedTimeoptionalDate

Approved date time

      treatedTimeFirstoptionalDate

First Approved date time

      unitoptionalNumber

Accounts unit (1: hours, 2: days, 3: pieces).

      valueNumber

Registration value

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example for rest/Approval/custom-registrations?&approvalStatus=1&approvalGroup="XXX:"

HTTP/1.1 200 OK
{
"response": {
"data": {
"registrations": [
{
"empNo": "4880",
"sortEmpNo": "!!!!!4880",
"initials": "EAT",
"empName": "Extended Approval Test",
"transSeq": 2271899,
"registrationTime": "2018-01-03",
"regType": "AN",
"regTypeDescr": "Number supplement",
"timeTypeId": "STB",
"timeTypeDescr": "STB SecondAppr",
"value": 116,
"comment": "116~\u0003",
"unit": 3,
"format": "2",
"empId": "831",
"approvalStatus": 2
},
{
"empNo": "4880",
"sortEmpNo": "!!!!!4880",
"initials": "EAT",
"empName": "Extended Approval Test",
"transSeq": 2273705,
"registrationTime": "2018-01-24",
"regType": "AN",
"regTypeDescr": "Number supplement",
"timeTypeId": "AARSLEFF",
"timeTypeDescr": "Aarsleff",
"value": 102,
"projectId": "AARSLEFF",
"projectDescr": "Aarsleff project I",
"activityId": "ACT1",
"activityDescr": "Aarsleff activity 1",
"comment": "test~\u0003",
"unit": 3,
"format": "2",
"empId": "831",
"approvalStatus": 2,
},
{
"empNo": "4990",
"sortEmpNo": "!!!!!4880",
"initials": "EAI",
"empName": "Extended Approval II Test",
"transSeq": 2313713,
"registrationTime": "2018-02-13",
"regType": "AB",
"regTypeDescr": "Absence",
"timeTypeId": "CFP10",
"timeTypeDescr": "Bank H",
"startTime": "1994-01-01T07:00:00.000",
"endTime": "1994-01-01T15:00:00.000",
"value": 27000,
"comment": "",
"unit": 1,
"format": "1",
"empId": "866"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}