General - Get account balance for an employee

API Url

Used to get all account balances for an employee.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{empNo}/account-balances

Permissions: user

Path parameters

FieldTypeDescription
empNoString

Employee number.

Query parameters

FieldTypeDescription
accountIdoptionalString

Optional list of Account IDs with comma separator. Can be used if 'onlyCategory'=false.

onlyCategoryoptionalBoolean

true = Return only the accounts specified on the employee category.
false = Return all accounts (can be filtered furthermore).

periodTypeoptionalNumber[1-4]

Type of period (1: Latest closed period, 2: Oldest open period, 3: Current period 4: Current and future periods).

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

    accountsObject[]

Collection with account balance data.

      balanceNumber

Balance value.

      departmentString

Department suffix.

      descriptionString

Account description.

      empNoString

Employee number.

      formatNumber

Account format (1: HH:MM, 4: HH.CC, 7: HH).

      groupString

Employee group.

      idString

Account ID.

      unitNumber

Account unit (1: Hours, 2: Days, 3: Pieces).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example with a single shift:

HTTP/1.1 200 OK
{
"response": {
"data": {
"accounts": [
{
"empNo": "100"
"id": "H002"
"department": "Welders"
"group": "Special"
"balance": 10
"description": "Remaining holiday"
"shortDescription" : "holiday remaining"
"unit": 1
"format": 1
}
]
},
"erorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"errorCode": 5,
"errorMessage": "No employees"
}
}