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.
http://localhost:16010/ProMarkREST/rest/General/employees/{emp_id}/savings
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Employee ID. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| savings | Object | The piggy-bank data collection. |
| accounts | Object[] | The payout accounts. |
| description | String | Account description. |
| id | String | Account ID. |
| savingsAccounts | Object[] | The savings accounts. |
| balance | Number | The account balance. |
| description | String | Account description. |
| format | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
| id | String | Account ID. |
| minimum | Number | The minimum balance that needs to remain on the account. It cannot go below this. |
| unit | Number[1-3] | Accounts unit (1: hours, 2: days, 3: pieces). |
| balance | Number | The SUM balance of all related accounts. |
| format | String | Account format ("HH:MM", "HH.CC", ".0", ".1", ".2", ".3"). |
| payable | Number | The maximum payable amount. |
| unit | Number[1-3] | Accounts unit (1: hours, 2: days, 3: pieces). |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |