SelfService - Get account balance

API Url

Used to get account balances for an employee in SelfService. Accounts being included depend on setup.

GET
http://localhost:16010/ProMarkREST/rest/SelfService/employees/{emp_id}/accounts

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Employee ID for who to get balance.

Query parameters

FieldTypeDescription
endoptionalDate

End date interval for account simulation default = MAXDATE.

startoptionalDate

Start date interval for account simulation default = TODAY.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

    accountsObject[]

Collection with account balance data.

      balanceString

Balance value. Because BE function formats data already we have string here

      descriptionString

Account description.

      idString

Account ID.

      typeString

Account type

  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": [
{
"id": "A001",
"description": "Holidays",
"type": "Actual balance",
"balance": "1,1 Days",
}
]
},
"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"
}
}