Approval - Get employees pending approval

API Url

Load the list of employees pending approval with info like what type of registrations are pending approval & what's the impact on accounts.

GET
http://localhost:16010/ProMarkREST/web/Approval/employees

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.

Query parameters

FieldTypeDescription
filteroptionalString

Filter expression (json encoded) to be used for filtering the employees. See the Global Employee Filter for schema & structure.

fromoptionalDate

Start date (registration date)

includeAccountPostingsoptionalBoolean

TRUE = Include account postings for the registrations pending approval.

includeRegistrationCountoptionalBoolean

TRUE = Include counter on registration type for those pending approval.

includeRegistrationsoptionalBoolean

TRUE = Include all registrations pending approval.

skipoptionalNumber

How many employees to skip.

sortByoptionalString

Sort employees by specific fields.

takeoptionalNumber

How many employees to load.

tooptionalDate

End date (registration date)

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    employeesObject[]

Array of employees pending approval

      avatarURIoptionalString

URI pointing to the employee's avatar picture.

      empIdNumber

Unique ID of the employee.

      empNoString

Employee number.

      firstRegDateoptionalDate

First registration date pending approval within the selection.

      initialsoptionalString

Employee initials.

      lastRegDateoptionalDate

Last registration date pending approval within the selection.

      nameString

Employee full name.

      postingsoptionalObject[]

Object containing postings per account for the registrations pending approval.

        accountIdString

Unique ID of the account.

        descriptionString

Full description of the account.

        formatString

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

        shortDescriptionString

Raw short description of the account (may be empty).

        unitNumber

Unit of measure (1: hours, 2: days, 3: pieces).

        valueNumber

Sum of postings on the account, expressed in seconds.

      registrationCountsoptionalObject[]

Object containing counts per registration type.

        countNumber

Count of registration of this type pending approval.

        typeString

Registration type.

  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": {
"employees": [
{
"empId": 100,
"empNo": "001",
"name": "John Snow",
"initials": "JSN",
"firstRegDate": "2023-03-01",
"lastRegDate": "2023-03-14",
"registrationCounts": [
{
"type": "PR",
"value": 12
},
{
"type": "AB",
"value": 2
}
],
"postings": [
{
"accountId": "T001",
"description": "Total time",
"shortDescription": "Total",
"format": "HH:MM",
"unit": 1,
"value": 403200
}
]
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}