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
| Field | Type | Description |
|---|---|---|
| emp_id | String | Employee ID for who to get balance. |
Query parameters
| Field | Type | Description |
|---|---|---|
endoptional | Date | End date interval for account simulation default = MAXDATE. |
startoptional | Date | Start date interval for account simulation default = TODAY. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| accounts | Object[] | Collection with account balance data. |
| balance | String | Balance value. Because BE function formats data already we have string here |
| description | String | Account description. |
| id | String | Account ID. |
| type | String | Account type |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "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
| 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. |
Error example:
HTTP/1.1 404 Not found{"response": {"errorCode": 5,"errorMessage": "No employees"}}