General - Get savings balance

API Url

Used to get savings account balance according to 'Payout savings' setup. This is the balance that an employee can payout.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{emp_id}/savings

Permissions: user

Path parameters

FieldTypeDescription
emp_idString

Employee ID.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    savingsObject

The piggy-bank data collection.

      accountsObject[]

The payout accounts.

        descriptionString

Account description.

        idString

Account ID.

        savingsAccountsObject[]

The savings accounts.

          balanceNumber

The account balance.

          descriptionString

Account description.

          formatString

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

          idString

Account ID.

          minimumNumber

The minimum balance that needs to remain on the account. It cannot go below this.

          unitNumber[1-3]

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

      balanceNumber

The SUM balance of all related accounts.

      formatString

Account format ("HH:MM", "HH.CC", ".0", ".1", ".2", ".3").

      payableNumber

The maximum payable amount.

      unitNumber[1-3]

Accounts 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:

HTTP/1.1 200 OK
{
"response": {
"data": {
"savings": {
"balance": 163440.0,
"unit": 1,
"format": "HH:MM",
"payable": 127440.0,
"accounts": [
{
"id": "N0300",
"description": "Overtidstimer til utbetaling",
"savingsAccounts": [
{
"id": "HVBO100",
"description": "Overtime Normal",
"unit": 1,
"format": "HH:MM",
"balance": 0.0,
"minimum": 7200.0
},
{
"id": "O002",
"description": "Overtime I",
"unit": 1,
"format": "HH:MM",
"balance": 86400.0,
"minimum": 0.0
},
{
"id": "O003",
"description": "Overtime II",
"unit": 1,
"format": "HH:MM",
"balance": 77040.0,
"minimum": 36000.0
}
]
}
]
}
},
"errorCode": 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.